Remote Redis Connection Setup¶
Follow these steps to interact with an Azure Redis from a local machine.
Install command line tools¶
- The Redis command line interface
- A tool for SSL tunneling
Fetch access key¶
Go to the Azure portal and look up the target Redis resource. The resource page will have an "Access keys" link under the "Settings" section of the left navigation. Note the following information, which will be used to configure the local machine:
- Primary access key
- Host and port, e.g. my-resource.redis.cache.windows.net:6380
Save the access key to the REDISCLI_AUTH
environment variable, e.g. add the following line to ~/.zshrc
:
Configure Stunnel¶
If it doesn't exist already, create a Stunnel configuration file at /usr/local/etc/stunnel/stunnel.conf
.
Add the following entry to it:
Connect to Redis¶
- Uses the value of
REDISCLI_AUTH
for the password