How to Install Redis on Windows 10

Redis doesn’t officially run on Windows, so the recommended way to install it on Windows 10 is through WSL (Windows Subsystem for Linux). Open PowerShell as administrator, run wsl --install, restart, and open Ubuntu. Then run sudo apt update and sudo apt install redis-server, start it with sudo service redis-server start, and test it with redis-cli ping. If it replies PONG, Redis is running, and apps on Windows can connect to it at localhost:6379.

You can also run Redis in Docker, or use a Windows-native Redis-compatible server. Here’s how each option works.

Which option should you use?

Option Best for Notes
WSL (Ubuntu) Most developers Real Redis, free, officially recommended by Redis for Windows
Docker Desktop People already using containers Easy to start, stop, and switch versions
Memurai Windows-only servers or services Runs natively as a Windows service. Free developer edition, paid for production.
Old Microsoft port (Redis 3.x) Not recommended Archived years ago, very outdated, and no security updates

Method 1: Install Redis with WSL

Step 1: Install WSL and Ubuntu

  1. Right-click Start and choose Windows PowerShell (Admin).
  2. Run wsl --install. This installs WSL and Ubuntu.
  3. Restart your PC when prompted.
  4. Open Ubuntu from the Start menu and create a Linux username and password.

WSL needs Windows 10 version 2004 or later. If wsl --install isn’t recognized, update Windows first.

Step 2: Install Redis

  1. In the Ubuntu window, update the package list:
    sudo apt update
  2. Install Redis:
    sudo apt install -y redis-server
  3. Start it:
    sudo service redis-server start
  4. Test it:
    redis-cli ping
    You should see PONG.
Windows Terminal with Ubuntu on WSL showing Redis installed, the service started, and redis-cli ping returning PONG
(1) Install redis-server in Ubuntu, and (2) a PONG reply confirms Redis is running. (Illustration)

Get the latest Redis version (optional)

Ubuntu’s package can lag behind the newest Redis release. To get the latest version, add Redis’s official repository:

sudo apt-get install -y lsb-release curl gpg
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install -y redis

Start Redis automatically

If systemd is enabled in your WSL distro (the default for new installs), run sudo systemctl enable --now redis-server. Otherwise, run sudo service redis-server start each time you open WSL.

Method 2: Run Redis in Docker

  1. Install Docker Desktop for Windows and make sure it uses the WSL 2 backend.
  2. Open PowerShell and run:
    docker run -d --name redis -p 6379:6379 redis
  3. Test it:
    docker exec -it redis redis-cli ping

Stop it with docker stop redis and start it again with docker start redis. Add -v redis-data:/data to the run command to keep your data between container restarts.

Method 3: Use a Windows-native alternative

Memurai is a Redis-compatible server built for Windows. It installs with a normal installer and runs as a Windows service. The free Developer edition works for local development. For production, check its license terms.

Connect to Redis from Windows apps

  • Use localhost (or 127.0.0.1) and port 6379 in your app’s Redis settings.
  • WSL 2 forwards localhost automatically in most setups. If it doesn’t, find the WSL IP with hostname -I in Ubuntu.
  • For a graphical tool, install Redis Insight, Redis’s free desktop app for browsing keys.

Secure your installation

  • Keep Redis bound to localhost (bind 127.0.0.1 in /etc/redis/redis.conf), which is the default.
  • Set a password with requirepass in the config file if anything else can reach it.
  • Never expose port 6379 to the internet.

Frequently asked questions

Is there an official Redis installer for Windows?

No. Redis is built for Linux and macOS. Redis recommends WSL or Docker on Windows.

Can I install Redis on Windows 11 the same way?

Yes. All three methods work the same on Windows 11.

How do I stop Redis in WSL?

Run sudo service redis-server stop, or redis-cli shutdown.

Why does redis-cli say “Could not connect to Redis”?

The server isn’t running. Start it with sudo service redis-server start and try again.