Connect to a cache

Apps in the same Project connect over the internal network. Connecting from outside needs TLS and an allowed IP.

From services in the same Project

Use the internal name server-name.internal on port 6379. If you link the cache to a Container, we add a redis:// DATABASE_URL variable for you, plus DB_HOST, DB_PORT, DB_USER and DB_PASSWORD.

From your computer or an outside system

  1. Open the Connectivity & firewall tab and turn on the public endpoint.
  2. Add the allowed IPs, such as 203.0.113.10 or the range 203.0.113.0/24.
  3. Always connect with TLS and send the full host name as SNI.
Shell
rediss://default:PASSWORD@HOST:6379
redis-cli -h HOST -p 6379 --tls --sni HOST --askpass

Studio and import

In the Studio tab you can view keys and run commands from the Console, after signing in with the user name and password. The Import tab takes an .rdb or .rdb.gz file saved by Redis, Valkey or ThailandHosting Cache, or a .txt file of commands.

If something goes wrong

It says “server name is required”

The public endpoint always needs TLS with SNI. Use --tls --sni host-name or a rediss:// URL.

It says “client address is not allowed by the firewall rules”

Your IP isn’t in the firewall list yet. Add it in the Connectivity & firewall tab.

It says “OOM command not allowed”

The cache’s RAM is full. Resize it in the Size & flags tab, or delete keys you don’t need or give them an expiry.

Still stuck? Let our team help

Open a ticket from the Console. Tell us the site or service, what you did and the message on screen. Our reply comes back in the same ticket, so everything stays in one place.