English
Caching
Introduction
After connecting a server, you can go to the server's Applications page to install Memcached and Redis. By default, the server firewall blocks outside access to these services, so they can only be accessed from within your server.
WARNING
Redis and Memcached are installed without a password and are protected from outside access only by the server firewall. Do not open port 6379 (Redis) or 11211 (Memcached) to the Internet in the firewall; connect from outside over SSH as described below.
Connect from applications on the server
Applications running on the same server connect to Redis and Memcached at 127.0.0.1 on their default ports. Example configuration in a Laravel application's .env file:
ini
MEMCACHED_HOST=127.0.0.1
MEMCACHED_PORT=11211
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379External connection
When you use a GUI client (for example TablePlus or RedisInsight) or another external tool to connect to Redis/Memcached, you need to connect over SSH (an SSH tunnel):
- Add your SSH Key to the server for the
flashpaneluser. See SSH Keys. - In your GUI client, choose an SSH connection (Over SSH) and enter the server IP, the
flashpaneluser, and the matching private key. - Set the Redis host to
127.0.0.1and port6379(Memcached:11211).
Or create an SSH tunnel from the command line, then connect to 127.0.0.1:6379 on your computer:
bash
ssh -N -L 6379:127.0.0.1:6379 flashpanel@SERVER_IP