What you’ll need
- Redis installed and running locally (default port
6379unless you changed it). - An ngrok account.
- Your ngrok authtoken.
- A valid payment method added to your account (TCP endpoints are only available on the free plan after adding a valid payment method).
Security
Redis is often configured with no password onlocalhost.
A TCP tunnel exposes that port on the public internet, so anyone who can reach the tunnel can run Redis commands unless you protect the instance.
Before tunneling, enable authentication (requirepass or ACL users in Redis 6+), use a strong secret, and consider combining the tunnel with IP restrictions or other access controls on your endpoint.
For long-lived or production-style access, prefer site-to-site connectivity patterns.
Expose your Redis server
Use a TCP endpoint aimed at the port Redis listens on (commonly6379).
Connect to Redis
When ngrok shows the forwarding address, use your Redis client with that host and port. For example, withredis-cli:
<tcp-host> and <tcp-port> with the values from the ngrok agent output or dashboard.
TLS-terminated Redis (stunnel, cloud proxies, or Redis with TLS on a different local port) can still be forwarded the same way.
Point the TCP endpoint at the port where your TLS listener accepts connections.