Connect quickly and securely by following a concise workflow that covers credential gathering, multiple connection methods (Redis Insight, redis-cli, and client libraries), and troubleshooting tips for the most common issues. Inline notes flag the best places for screenshots or code blocks so you can enhance the article visually later.
Prerequisites
Active Redis Cloud account
• At least one database created in your subscription
Console access
• Needed to view configuration and security details
Network access
• Ensure your IP or CIDR is allow-listed, or set up VPC Peering if you're using private connectivity
Step-by-Step Connection Guide
Gather Connection Credentials
In the Redis Cloud Console, open Configuration for your target database.
Navigate to Security → Password, and click the eye icon to unmask the password for the default user.
If Role-Based Access Control (RBAC) is enabled and the default user is disabled, use your custom username and password instead.
For a deeper walk through, the Manage Databases guide shows additional examples.
Launch the Connection Wizard
From the database list, click Connect next to the endpoint. This opens a wizard that generates ready-to-use connection strings for multiple environments.
Find your endpoint and port
From the Redis Cloud console, go to Databases, locate the database, and select Connect. The connection wizard shows the exact endpoint and port to use.
Do not assume that your database uses port 6379. Always use the endpoint and port shown in the connection wizard.
For Redis Cloud Pro, database traffic uses ports in the 10000–19999 range. Pro database ports can be assigned automatically or selected when the database is created.
Choose a Connection Method
Redis Insight
- Browser: Select Launch Redis Insight Web. This option is available for most Redis Cloud Essentials and Pro databases.
- Desktop: If not installed, click Download to get the Redis Insight desktop client. Once open, create a new connection by entering your host, port, username, and password.
Need help? Refer to the Redis Insight documentation for detailed usage instructions.
redis-cli
If you don’t already have redis-cli, install Redis Stack locally. Then copy the CLI command from the wizard, replacing <username> and <password> with your actual credentials:
redis-cli -u redis://<username>:<password>@<host>:<port>
The Redis Cloud Quick Start also covers the CLI method and initial setup tips.
Programming Language Clients
The wizard also provides ready-made connection code for common programming languages like Python, Node.js, Java, Go, .NET, and PHP.
Update the placeholders with your actual credentials and Redis Cloud endpoint:
import redis
r = redis.Redis(
host='your-db-host.redis.cloud',
port=12345,
username='default', # or your custom user
password='your-password',
ssl=True
)
if r.ping():
print("Connected to Redis!")Note: If your DB is not using TLS/SSL do not include ssl=true flag.
For more context on language-specific SDKs, review the guide linked above.
Troubleshooting Common Connection Issues
Connection Refused / Timeout
-
Confirm DNS resolution
Resolve the exact Redis Cloud endpoint:
dig <endpoint>or:
nslookup <endpoint>If the hostname does not resolve, troubleshoot DNS before changing Redis credentials or allow-list settings.
-
Test with redis-cli
For a TLS-enabled database:
redis-cli -h <endpoint> -p <port> --tlsFor a non-TLS database:
redis-cli -h <endpoint> -p <port>Use the same endpoint, port, TLS mode, username, and password as the application.
Do not use curl as a Redis connectivity test. Redis uses the RESP protocol, not HTTP.
A bare telnet <endpoint> <port> test is also not sufficient to prove a usable Redis connection. It can only indicate whether a TCP socket could be opened; it does not validate Redis protocol communication, TLS, or authentication.
-
Confirm the real outbound public IP
If the database uses a public endpoint with an IP/CIDR allow list, verify the public IP actually used by the failing workload for outbound traffic.
Do not assume that the IP shown in a hosting control panel, VM console, container dashboard, or application settings is the outbound NAT IP seen by Redis Cloud.
Confirm that the actual outbound IP or CIDR is included in the database's allow list.
-
Check outbound TCP restrictions
Shared hosting and managed platforms can restrict outbound connections even when DNS resolves successfully.
Ask the hosting provider:
“Is outbound TCP to <Redis Cloud endpoint> on port <NNNNN> permitted?”
-
Check connection limits
On Redis Cloud plans with a maximum connection limit, exhausting the available connections can cause newly launched application instances to receive Connection refused while existing application instances continue to work.
This can appear during autoscaling, for example when new AWS ECS or Fargate tasks start while existing tasks remain connected.
Check the database's current connection usage and plan connection limit before treating the failure as a routing or allow-list problem.
IPv6-only client environments
Redis Cloud public database endpoints are IPv4 endpoints. If the client environment is IPv6-only, it needs a network path that can reach IPv4 destinations, such as:
NAT64 with DNS64
An IPv6-to-IPv4 proxy or gateway
If DNS resolves but an IPv6-only workload cannot establish the Redis connection, confirm that IPv4 translation is available in the client network.
For Redis Software IPv6 configuration, see IPv6 in Redis Software: Configuration, Troubleshooting, and Best Practices.
Authentication Failure
- Double-check your username and password (they are case-sensitive).
- If using RBAC, verify that the role has permission to access the database.
TLS/SSL Errors
- Redis Cloud databases enforce encrypted connections. Use the
rediss://URI format or explicitly enable SSL/TLS in your client config. - TLS is available only for paid subscriptions.
- For configuration help, see Secure Your Redis Cloud Database
Environment Mismatch (Local vs Prod)
Test from the environment that is actually failing. A successful connection from a developer laptop does not prove that the production workload has the same DNS, routing, NAT, firewall, or allow-list path.
If local and production workloads use different outbound public IPs, ensure the correct production egress IP or CIDR is allow-listed.
Onboarding Progress
Previous: Choosing a Subscription and Creating Your First Database
Next: Managing Team Members and Roles
You can return to the Redis Cloud Onboarding Overview at any time to track your progress or revisit earlier steps.
0 comments
Please sign in to leave a comment.