This tutorial shows multiple ways to install the Redis server on Windows.

  • Using Docker
  • Using Windows Subsystem for Linux
  • Window Installer or Zip

How to install Redis server on Windows.

Following are the steps required to install Redis as a window Service

  • First, Download Redis for windows .
  • It downloads to the Redis-x64-5.0.14.1.msi file
  • Click on to install on windows.
  • Click next to proceed next steps.
  • In The Destination Folder, Give the path A:\Java\Redis\.
  • Next Screen, It asks for the Port to run Redis on box to 6379.
  • Give all default values and click the Next button
  • It installs as a window Services
  • Start the Redis server by Window + Run and type “Services.msc”.
  • It opens Services Window, selects Redis Services, and Right-click to start, restart and stop the server.

Install Redis using docker in Windows?

Redis can be installed using docker.

Check whether Redis is installed or not in windows

First, Open Command Line

change directory to the path A:\Java\Redis\ in terminal

cd A:\Java\Redis\

Run the below command to check the Redis version It gives an installed redis server version

A:\Java\Redis>redis-server -v
Redis server v=5.0.14.1 sha=ec77f72d:0 malloc=jemalloc-5.2.1-redis bits=64 build=5627b8177c9289c

next, type redis-cli on the command prompt to check cli is working or not

A:\Java\Redis>redis-cli
127.0.0.1:6379>

try running the ping command to print the hello world message

127.0.0.1:6379> ping "Hello World"
"Hello World"

How to run Redis Server as Daemon background in Windows

redis-server has daemonize option with yes value.

C:\Users\Kiran\Downloads\Redis-x64-5.0.14.1>redis-server --daemonize yes
[5416] 07 Mar 13:23:08.601 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[5416] 07 Mar 13:23:08.601 # Redis version=5.0.14.1, bits=64, commit=ec77f72d, modified=0, pid=5416, just started
[5416] 07 Mar 13:23:08.601 # Configuration loaded
[5416] 07 Mar 13:23:08.601 # Windows does not support daemonize. Start Redis as service
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 5.0.14.1 (ec77f72d/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 5416
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

[5416] 07 Mar 13:23:08.617 # Server initialized
[5416] 07 Mar 13:23:08.617 * DB loaded from disk: 0.000 seconds
[5416] 07 Mar 13:23:08.617 * Ready to accept connections

however, Windows does not support daemonize, We have to install as a Window Service.

It is not possible to install as daemon or background, If you installed Redis with Zip folder(not msi file)

You can install as a service with below command

redis-server --server-install

if the above command does not work, install Redis as a service