Redis deployment configurations

Getting Redis up and running with the default out of box configuration file is straightforward and easy. Once you have it working, we recommend you follow the Learn how to Tune Redis learning path to improve Redis performance.

Single node configuration

By default Redis runs on localhost ( on port 6379. As a result, port 6379 becomes unavailable for binding with the public IP of the remote server. You need to set the bind configuration option in the redis.conf file to

For a single-node Redis server, set the following configuration options as shown in the redis.conf file:


port 6379
protected-mode yes
cluster-enabled no
daemonize yes
appendonly no

To connect to the remote Redis server, you need to use Redis Client (redis-cli) with:

  • -h option providing hostname
  • -p option providing the port number

Connect to the Redis server from local machine

Execute the steps below to connect to the remote Redis server from your local machine.

  1. Install redis-tools to interact with redis-server:

            sudo apt install redis-tools
  1. Connect to the redis-server through redis-cli:

            redis-cli -h <public-IP-address> -p 6379

The output from this command will be similar to:


        ubuntu@ip-172-31-38-39:~$ redis-cli -h -p 6379> 

  1. Authorize Redis with the password you set in the playbook.yaml file using AUTH. An example of authorizing Redis is shown below:

       > ping
(error) NOAUTH Authentication required.> AUTH 123456789
OK> ping

  1. Try out commands in the redis-cli. Shown here is the output from running some commands:

       > set name test
OK> get name


You have successfully installed Redis in a single-node configuration.