Enable Redis remote connection
1 min readMay 1, 2020
On your development server most of the time you expose database to connect remotely to edit, view, remove data. Similarly you can enable remote connection to you Redis instance on the server. You can do that with help of following configuration changes.
Step 1 : Edit Redis Configurations
sudo nano /etc/redis/redis.conf
Replace
bind 127.0.0.1
with
bind 0.0.0.0
Also, replace
protected-mode yes
with
protected-mode no
Step 2 : Allow traffic to Redis port
If you are using default Redis port which is 6379, use following commands directly else replace it with your port number
sudo ufw allow 6379
sudo ufw allow 6379/tcp
Step 3 : Restart Redis
sudo systemctl stop redis
sudo systemctl start redis
DONE!