Andrew SB
How To Use the Redis One-Click Application
How To Use the Redis One-Click Application
We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more →

How To Use the Redis One-Click Application

Posted Aug 4, 2015 11.3k views One-Click Install Apps Redis Caching Ubuntu

Redis is a scalable in-memory key-value store that excels at caching. DigitalOcean's Redis One-Click application allows you to quickly spin up a Droplet with Redis pre-installed. It aims to help get your application off the ground quickly.

Creating Your Redis Droplet

You can launch a new Redis instance by selecting Redis on 14.04 from the Applications menu during Droplet creation:

Once you have created the Droplet, connect to it via the web-based console in the DigitalOcean control panel or SSH:

ssh root@your.ip.address

Accessing Redis

Your Redis instance will be available at It is bound to the localhost by default and its configuration details can be found in /etc/redis/redis.conf. To connect to Redis's interactive shell, simply run:

  • redis-cli

Securing And Accessing Remotely

Enabling Authentication

Before allowing remote access to your Redis database, it is recommended to enable password authentication. To do so, open its configuration file located in /etc/redis/redis.conf and append a line beginning with "requirepass" and followed by your password. For example:

requirepass your_redis_password

In order for this to take effect, you must first restart Redis with:

  • sudo service redis restart

To verify that authentication has been enabled, enter the shell with redis-cli and attempt to run a query. You should be presented with an error:

  • CONFIG GET databases
  • (error) NOAUTH Authentication required.

To provide the password you set, run:

  • AUTH your_redis_password
  • OK

Your can also provide you password directly on the command line when starting the redis client:

  • redis-cli -a your_redis_password"

Enabling Remote Access

In order to enable access over the internet, comment out the line beginning with bind in /etc/redis/redis.conf. Find this:


and change it to this:

# bind

Then restart Redis to enable the change.

  • sudo service redis restart

Now you can connect to your Redis instance from a remote host using the command:

  • redis-cli -h redis_ip_address -p 6379 -a your_redis_password

Additional Security Steps

In addition to enabling authentication, setting up a firewall that only allows remote connections from specific IP addresses is a good security measure to implement. Managing an IP Tables firewall is made easy using UFW on Ubuntu. The following commands will erect a firewall which allows all outgoing connections from your server but only allow incoming connections via SSH or from the specified IP address (

  • sudo apt-get install ufw
  • sudo ufw default deny incoming
  • sudo ufw default allow outgoing
  • sudo ufw allow ssh
  • sudo ufw allow from
  • sudo ufw enable

For additional security recommendations, see Redis's security docs.

Further Information

The One-Click application simply provides you with Redis as a pre-installed base. It's up to you how you want to use it. Whether you are building out a cluster or you simply want to use it as a local cache for an app on the same host, we have a number of tutorials which should point you in the right direction:


Creative Commons License