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
- Open the Connectivity & firewall tab and turn on the public endpoint.
- Add the allowed IPs, such as
203.0.113.10or the range203.0.113.0/24. - Always connect with TLS and send the full host name as SNI.
rediss://default:PASSWORD@HOST:6379
redis-cli -h HOST -p 6379 --tls --sni HOST --askpassStudio 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.