How to start Redis in background?


Redis is an opensource in-memory key-value store . It supports data structures such as strings, hashes, lists, sets, sorted sets and many more. In default configuration Redis works in foreground.That means if you start redis it will run on foreground and prints the logs on console. This article explain how to start redis in background.

How to run Redis in background or as a daemon?

You need to open Redis configuration file “redis.conf” which is located at the root of the redis distribution, set configuration option “daemonize” to “yes” , as follows

After making these changes, restart redis with following

Redis will start running on background as a daemon. You can verify Redis is running by using the linux commands

From the outputs we can see that redis is running and listening on tcp port 6379

Feel free to contact us if you face any issue . Always happy to help ????

Leave a Reply

Your email address will not be published. Required fields are marked *