Grow your Business Online​
Wesbytes Blue Logo

Wesbytes Knowledge Base

Search our articles or browse by category below

Configure Redis on Linux VPS Server in 2 Simple Steps

Last modified: July 2, 2022
You are here:
Estimated reading time: 1 min

As a database, cache, and message broker, Redis is an open-source in-memory data structure store. The reason Redis differs from conventional databases is that it can store higher-level data types including lists, sets, maps, and more. Redis is highly advised for use to enhance your VPS because to its user-friendly interfaces and amazing functionality.

We’ll show you how to set up your Redis server in your Linux VPS server in this article. Since the server will by default search for connections from all accessible interfaces on the server, customising it will enable the server to listen to the interface of your choice. Access your VPS server before making any configurations.

Step 1: Locate Configuration File

We must first find the file’s location and open it. The configuration file can be found in “/etc/redis/redis.conf” by default. Use your preferred text editor to open the file. Run the following command to open the file in a nano text editor.

sudo nano /etc/redis/redis.conf

Step 2: Configuration

After opening the configuration, locate the line that says “bind 127.0.0.1”. Change the IP address by entering the values of the interface you want the Redis server to listen to, such as the following example.

bind 192.168.43.2

To add more IP addresses, you may do so by having a space in between every IP address, like the following example.

bind 192.169.43.2 19.168.43.3

For the Redis server to listen to all the interfaces on the network, use the following command.

bind 0.0.0.0

Finally, after finishing your configuration, make save changes and close the file. To implement the changes, restart the Redis server using the following command.

sudo systemctl restart redis-server
Was this article helpful?
Dislike 0
Views: 6