Instalation Redis [Windows/Linux/Mac/Docker]
![Instalation Redis [Windows/Linux/Mac/Docker]](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1765187078698%2F3b34222c-0dc6-4aad-9162-75095a499bf8.png&w=3840&q=75)
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
Install WSL (if not already installed)
wsl --installIf you’re asked to restart, go ahead — don’t postpone it like that diet plan that starts “next Monday.” 🥲
Install Redis inside WSL
sudo apt update sudo apt install redis-serverStart Redis
redis-serverTest Redis connection
redis-cli pingExpected 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 / Platform | Installation Method | Difficulty |
| Windows | WSL or Docker | Easy |
| Linux | apt-get | Super easy |
| macOS | Homebrew | Easy |
| Docker | One command | Lightning 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.
