Skip to main content

Command Palette

Search for a command to run...

Instalation Redis [Windows/Linux/Mac/Docker]

Updated
2 min read
Instalation Redis [Windows/Linux/Mac/Docker]

A Complete Guide to Installing Redis on Windows, Linux, Mac, and Docker

Before we begin, make sure you’re mentally prepared — Redis is fast, and we don’t want you to fall behind while installing it. 😆
In this article, you’ll learn how to install Redis across multiple operating systems so you can start building real-time, high-performance applications.


1. Installing Redis on Windows

Officially, Redis does not provide a native Windows build. But don’t worry — we can still run Redis using WSL (Windows Subsystem for Linux) or Docker. The recommended way is using WSL.

Install Redis via WSL

  1. Install WSL (if not already installed)

     wsl --install
    

    If you’re asked to restart, go ahead — don’t postpone it like that diet plan that starts “next Monday.” 🥲

  2. Install Redis inside WSL

     sudo apt update
     sudo apt install redis-server
    
  3. Start Redis

     redis-server
    
  4. Test Redis connection

     redis-cli ping
    

    Expected output:

     PONG
    

2. Installing Redis on Linux (Ubuntu/Debian)

Linux users get the easiest installation experience since Redis is available in official repositories.

Installation Commands

sudo apt update
sudo apt install redis-server

Start & Enable Redis

sudo systemctl enable redis-server
sudo systemctl start redis-server

Check Status

sudo systemctl status redis-server

Test Connection

redis-cli ping

If you see PONG, congratulations — Redis is ready! 🎉


3. Installing Redis on macOS

For macOS, we’ll use Homebrew. If you don’t have Homebrew installed, get it from https://brew.sh/

Install Redis

brew install redis

Start Redis Service

brew services start redis

Test Connection

redis-cli ping

If it returns PONG, Redis is now running faster than the weather changing in five minutes. 🌦


4. Installing Redis with Docker

If you prefer a modern and hassle-free setup, Docker is your best friend.

Pull and Run Redis

docker run --name redis-local -d -p 6379:6379 redis

Access the Redis CLI

docker exec -it redis-local redis-cli

Then test:

ping

Conclusion

You now have multiple ways to install Redis:

OS / PlatformInstallation MethodDifficulty
WindowsWSL or DockerEasy
Linuxapt-getSuper easy
macOSHomebrewEasy
DockerOne commandLightning fast ⚡

With Redis successfully installed, you’re ready to explore basic commands such as SET, GET, and EXPIRE, and begin real caching or pub/sub implementation.

More from this blog

B

Budiart Dev

2 posts

Shares insights on DevOps, Cloud Engineering, CI/CD, SRE, Kubernetes, and IaC—based on real-world experience building pipelines, solving incidents, and improving system performance.