How to run redis server on windows a step by step guide: Redis isn’t natively built for Windows, but you can get a solid Windows setup with a few reliable methods. Here’s a quick fact: most developers running Redis on Windows use Windows Subsystem for Linux WSL or a native Windows port to keep things simple and fast. In this guide, you’ll get a practical, step-by-step plan that covers multiple approaches so you can pick what fits your workflow.
Quick overview what you’ll learn
- Why Windows users often choose WSL or a Windows-native build
- Step-by-step setup for Redis via WSL recommended for most users
- Alternative: using Redis on Windows with Memurai or a Windows port
- Basic commands to start, stop, and test Redis
- Common pitfalls and troubleshooting tips
- Performance tips and best practices for a Windows dev environment
Useful URLs and Resources un clickable text
Redis official website – redis.io
Windows Subsystem for Linux WSL docs – docs.microsoft.com/en-us/windows/wsl
Memurai – memurai.com
Redis on Windows GitHub – github.com/microsoftarchive/redis
Redis CLI documentation – redis.io/docs/manual/commandline/redis-cli
Why Windows Users Often Choose WSL or a Windows Port
- Native Windows builds of Redis are not officially maintained, so many devs choose WSL to run Redis as if it were on a Linux box.
- WSL provides a familiar Linux environment, which means you can use apt, systemctl via service wrappers, and standard Linux tooling.
- For teams that require a true Windows-native experience, Memurai offers a compatible Redis-compatible in-memory data store with official Windows support.
Key points to consider
- Performance: WSL2 generally offers better performance than older WSL versions because it runs a real Linux kernel.
- Compatibility: Most tutorials, modules, and third-party tools assume Linux, so WSL helps you stay compatible.
- Maintenance: Windows-native Redis alternatives can simplify some dev workflows but may require learning their own quirks.
Setting Up Redis on Windows Using WSL Recommended
This method gives you a Linux-like Redis experience on Windows.
Step 1: Enable WSL and Install a Linux Distro
- Open PowerShell as Administrator.
- Run:
- wsl –install
- If you already have WSL, update to WSL2:
- wsl –set-default-version 2
- Install a Linux distro from the Microsoft Store Ubuntu is the easiest choice.
What you’ll do
- This creates a Linux environment inside Windows where Redis runs as it would on a Linux server.
Step 2: Install Redis in WSL
- Launch your Linux distro from the Start menu.
- Update package lists:
- sudo apt update
- Install Redis:
- sudo apt install redis-server
- Optional: install build tools if you plan to compile from source:
- sudo apt install build-essential
Step 3: Configure Redis Optional but Recommended
-
Edit the Redis config if you want to change defaults:
- sudo nano /etc/redis/redis.conf
-
Common tweaks: How To Restart A Service On Windows Server 2012 Using Task Manager: Quick Guide, Service Management, And Alternatives 2026
- supervised systemd for newer Linux distros: supervised systemd
- requirepass yourpassword enable password protection
- appendonly yes enable AOF for durability
-
Restart Redis to apply changes:
- sudo systemctl restart redis.service
-
If systemd isn’t wired up in WSL, you can run Redis directly:
- redis-server /etc/redis/redis.conf
Step 4: Start Redis and Test It
- Start Redis:
- sudo service redis-server start
- Check the status:
- sudo service redis-server status
- Test with the Redis CLI:
- redis-cli
- ping
- set test_key “hello”
- get test_key
Step 5: Optional: Configure Redis to Start on WSL Launch
- Create a simple systemd-compatible approach or a startup script in your Linux distro to launch Redis automatically when you open the WSL terminal.
Step 6: Integrate with Windows Apps
- You can reach Redis from Windows apps using the WSL IP:
- In WSL, run: ip addr show eth0 | grep -oP ‘?<=inet\s\d+.\d+{3}’
- Or use localhost, depending on your WSL network configuration newer WSL versions often forward localhost automatically.
Step 7: Security and Maintenance Tips
- Use a password: in /etc/redis/redis.conf, set requirepass yourpassword
- Enable persistence carefully: RDB vs AOF – AOF is more durable but heavier on I/O.
- Regularly back up your Redis data if you’re using Redis for non-production tasks or local dev data.
Alternative 1: Memurai Windows-native Redis-compatible
Memurai provides a Windows-native alternative to Redis, designed to run on Windows with official support. It aims to be Redis-compatible and is a good option if you want a true Windows experience without WSL.
Why choose Memurai
- Native Windows support with straightforward installation
- Compatibility with Redis CLI and most Redis commands
- Active dev and community around Windows-based workloads
Quick setup outline
- Download Memurai from the official site
- Run the installer and follow on-screen prompts
- Start Memurai service from Windows Services or using memurai.exe
- Connect from your app or Redis CLI using localhost:6379 or configured port
Basic commands to verify
- redis-cli -p 6379
- ping
- set sample “windows-native”
- get sample
Alternative 2: Native Windows Redis Port Community-Built
There are community builds of Redis for Windows. These aren’t officially maintained by Redis, but they can work fine for local development and learning.
- Download a trusted Windows port from a reputable source
- Install and start as a Windows service or run redis-server.exe directly
- Use redis-cli.exe to test
Caveats How to report a tos violation on a discord server a step by step guide 2026
- These builds may lag behind Linux in terms of features and bug fixes
- Security updates may not be as timely
- Use caution for production-like workloads
Basic Redis Commands You’ll Use Often
- PING: to check if Redis is alive
- SET key value: store a string value
- GET key: retrieve the value
- DEL key: delete a key
- HSET, HGET: hash operations
- LPUSH, LRANGE: list operations
- SADD, SMEMBERS: set operations
- ZADD, ZRANGE: sorted set operations
- CONFIG GET and CONFIG SET: tweak server settings
- MONITOR and INFO: observe server activity and statistics
Table: Common Redis Commands Quick Reference
| Command | Purpose | Example |
|---|---|---|
| PING | Health check | PING -> PONG |
| SET | Store value | SET mykey “value” |
| GET | Retrieve value | GET mykey |
| DEL | Delete key | DEL mykey |
| HSET | Hash field set | HSET user:1 name “Alice” |
| HGET | Hash field get | HGET user:1 name |
| LPUSH | Push to list | LPUSH mylist “item1” |
| LRANGE | Read list | LRANGE mylist 0 -1 |
| SADD | Add to set | SADD tags “redis” |
| SMEMBERS | List set members | SMEMBERS tags |
| ZADD | Add to sorted set | ZADD scores 100 “Alice” |
| ZRANGE | Range on sorted set | ZRANGE scores 0 -1 |
Performance tips
- Use Redis persistence thoughtfully; AOF with fsync always is safer but slower
- Enable Redis memory policies to avoid OOM errors
- On WSL, allocate enough memory to your Linux VM to improve performance
- Use the Redis CLI for quick tests rather than heavyweight clients for simple checks
Monitoring and troubleshooting
- Check logs at /var/log/redis/redis-server.log for Linux/WSL
- Use redis-cli MONITOR to watch commands in real time
- If Redis won’t start: verify port conflicts, permission issues, and config syntax
- Common WSL networking quirks: sometimes the WSL IP changes after restart; consider connecting via localhost if configured properly
Advanced topics optional
- Redis replication basics master/slave for local testing
- Basic Redis clustering concepts for learning scale-out architectures
- Securing Redis in a development environment passwords, binding to localhost, etc.
- Automating Redis startup with Windows Task Scheduler if using Memurai or Windows ports
Frequently Asked Questions
How do I start Redis on Windows without WSL?
You can use Memurai, a Windows-native Redis-compatible option, or a community-provided Windows port. Install the tool, run the service, and connect with redis-cli just like you would on Linux. How To Restore DNS Server In Windows 2003 Step By Step Guide: DNS Recovery, Backup, Troubleshooting, And Best Practices 2026
Is Redis on Windows stable for production use?
For production, Windows-native options like Memurai or running Redis via WSL2 in a Linux environment are recommended. Native Windows ports are mainly for development and testing scenarios.
Can I run Redis in Docker on Windows?
Yes. Running Redis in Docker Desktop on Windows is a common approach. You can pull the official Redis image and run it in a container, then access it via localhost.
What’s the simplest way to test Redis is working?
Install Redis or Memurai, start the server, then run:
- redis-cli
- ping
If you get PONG or a response to GET/SET, you’re good to go.
How do I enable persistence in Redis?
Edit /etc/redis/redis.conf and enable either RDB snapshots, AOF, or both. Then restart the server. For WSL, ensure the file paths and permissions are correctly set for Linux.
How can I secure Redis on Windows?
Use a password requirepass, bind Redis to localhost or limit access with firewall rules, and disable dangerous commands if you’re running a development server exposed to the internet. How to refresh a table in sql server a step by step guide to data reloads, statistics, and metadata 2026
How do I update Redis in WSL?
Use your Linux distro’s package manager:
- sudo apt update
- sudo apt upgrade
If you compiled from source, pull the latest code and recompile, then replace the binary.
Can Redis work with Windows apps like .NET or Node.js?
Yes. Redis clients exist for virtually all languages. You’ll typically connect to localhost:6379 unless you’ve configured a custom port.
What are common reasons Redis won’t start?
Port conflicts, misconfigured redis.conf, insufficient permissions, or missing dependencies. Check the log file and verify the configuration syntax.
How do I port Redis to a different Windows port?
In Redis config for WSL or Memurai, change the port directive port 6379 to your desired port, then restart the service.
Yes, you can run Redis server on Windows today using WSL, Docker, or a Windows-native port. This guide walks you through practical, step-by-step setups for the three main options, plus tips to keep things secure, fast, and reliable. You’ll find beginner-friendly paths and deeper dives for production-like setups, plus a ready-to-use checklist and a solid FAQ to clear up the most common questions. How to Remove Enter from Data in SQL Server: Remove Newlines, Carriage Returns, and Whitespace Efficiently 2026
- What you’ll get in this guide:
- A clear path for Windows users who prefer WSL2 Linux-based Redis
- A Docker-based approach for isolation and reproducibility
- A Windows-native option with Memurai for teams needing a native Windows service
- Practical security, persistence, and backup tips
- Quick troubleshooting and a comprehensive FAQ
Useful URLs and Resources un clickable text
- Redis Official Documentation – redis.io
- Memurai – memurai.com
- Windows Subsystem for Linux Documentation – docs.microsoft.com/en-us/windows/wsl/
- Docker Desktop for Windows – docker.com/products/docker-desktop
- Redis Insight – redis.com/redis-insight
- Redis Commands Reference – redis.io/commands
- Redis Community Forum – reddit.com/r/redis
- Redis Labs Blog – redislabs.com/blog
- Ubuntu for Windows WSL – ubuntu.com
- Microsoft Developer Network – docs.microsoft.com
Understanding Redis on Windows: Options and Tradeoffs
Redis is a top choice for caching, session storage, and real-time data processing. On Windows, you have three mainstream paths:
- WSL2 Windows Subsystem for Linux 2 with a Linux Redis
- Pros: Native Redis behavior under Linux. easy to install via apt. good parity with Linux deployments. minimal portability friction if you’re used to Linux.
- Cons: Needs WSL2 setup. networking can be a tad fiddly. persistence and startup can be a little manual.
- Docker on Windows
- Pros: Isolation, reproducibility, easy cleanup. works the same anywhere. simple to version and share configurations.
- Cons: Overhead of Docker. needs volume management for persistence. initial learning curve with containerization concepts.
- Memurai Windows-native Redis-compatible server
- Pros: Runs as a Windows service. straightforward Windows administration. simple access from Windows-native tooling.
- Cons: Not the official Redis project. some advanced Redis features or newer modules may lag behind. licensing considerations depending on edition.
Table: quick comparison
| Approach | Pros | Cons |
|---|---|---|
| WSL2 Ubuntu/Linux | Real Redis package. Linux feel. straightforward apt install | Requires WSL2 setup. networking quirks occasionally |
| Docker on Windows | Isolation, reproducibility, easy sharing | Docker overhead. persistence needs explicit volumes |
| Memurai Windows-native | Native Windows service. simple for Windows teams | Not official Redis. feature parity caveats |
Quick recommended path for beginners: If you don’t already have Docker or WSL2, start with WSL2. It gives you a genuine Redis experience in a Linux-like environment and is widely supported. If you want maximum portability or containerization fits your workflow, Docker is the best bet. If you need a true Windows service with minimal Linux tooling, Memurai is the simplest path. How to Recover a Deleted Table in SQL Server: Restore, Undelete, Backups, and Point-In-Time Techniques 2026
Quick Start with WSL2: Step-by-Step
Prerequisites
- Windows 10 19043+ or Windows 11
- Admin rights to install features and software
- Active internet connection
- Basic familiarity with Linux commands
Step 1 — Enable WSL2 and install a Linux distribution
- Enable WSL and Virtual Machine Platform:
- In PowerShell Run as Administrator:
- dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- In PowerShell Run as Administrator:
- Restart your PC.
- Install Ubuntu from the Microsoft Store Ubuntu 20.04 LTS or newer is fine.
- Launch Ubuntu once installed and complete the initial user setup.
Step 2 — Install Redis inside WSL2
- Open Ubuntu WSL and run:
- sudo apt update
- sudo apt install -y redis-server
- By default, Redis may be configured to run under systemd. In WSL, systemd isn’t always enabled by default, so it’s simpler to run Redis directly as a daemon:
- Edit the config if you want to tweak settings:
- sudo nano /etc/redis/redis.conf
- Change supervised to “no” if you’re not using systemd in WSL, and enable persistence options you care about appendonly yes, etc.
- Start Redis in the background:
- redis-server /etc/redis/redis.conf –daemonize yes
- Edit the config if you want to tweak settings:
- Test the service:
- redis-cli ping
- If it replies PONG, Redis is running.
Step 3 — Make sure Redis starts a bit more reliably in WSL How to Ping a Server Port Windows Discover the Easiest Way to Check Your Connection 2026
- Since WSL doesn’t start Linux services the same way a real Linux server does, you can add a small startup script in Windows to auto-start Redis on login:
- Create a file at C:\WSL\start-redis.sh with:
- #!/bin/bash
- wsl sudo service redis-server start
- Add a Windows Task Scheduler task to run this script at logon.
- Persistence and memory
- In /etc/redis/redis.conf, review:
- appendonly yes for durability
- dir /var/lib/redis
- maxmemory 256mb or more, depending on your needs
- maxmemory-policy allkeys-lru
- In /etc/redis/redis.conf, review:
- Accessing Redis from Windows
- You can use the WSL Redis CLI from Windows, e.g.:
- wsl redis-cli ping
- Or install a Windows Redis CLI redis-tools and connect to 127.0.0.1:6379.
- You can use the WSL Redis CLI from Windows, e.g.:
Step 4 — Security and best practices
- Bind to localhost only for local development:
- In /etc/redis/redis.conf, set:
- bind 127.0.0.1
- In /etc/redis/redis.conf, set:
- Require a password in Redis
- In redis.conf, set:
- requirepass yourstrongpassword
- In redis.conf, set:
- Enable persistence if needed:
- RDB via save parameters, or AOF:
- appendonly yes
- RDB via save parameters, or AOF:
- Regular backups
- Back up /var/lib/redis/dump.rdb and /var/lib/redis/appendonly.aof to a separate safe location.
Step 5 — Quick test and clean shutdown
- To stop Redis:
- redis-cli -a yourpassword shutdown
- To restart:
- redis-server /etc/redis/redis.conf –daemonize yes
Step 6 — What if you want Windows access without WSL?
- You can install redis-cli on Windows and connect to 127.0.0.1:6379. If you need a full Windows-native Redis experience, consider Memurai or Docker, which we cover next.
Quick Start with Docker on Windows
Step 1 — Install Docker Desktop for Windows How To Populate Your Discord Server The Ultimate Guide 2026
- Download and install Docker Desktop from the official site.
- Ensure WSL2 integration is enabled if you’re using the WSL2 backend.
Step 2 — Run a Redis container
- Open PowerShell or Windows Terminal and run:
- docker run –name redis -p 6379:6379 -d redis:7
- This pulls Redis 7 from Docker Hub and exposes port 6379 on your Windows host.
Step 3 — Verify the container
- Ping Redis from inside the container:
- docker exec -it redis redis-cli ping
- From Windows, test with your host Redis CLI if you’ve installed one or with:
- redis-cli -h 127.0.0.1 -p 6379 ping if you have a Windows Redis CLI installed
- You can also connect through Docker:
- docker exec -it redis redis-cli -a “” -p 6379 ping if you set a password, adjust accordingly
Step 4 — Enable persistence and production-like settings
- Use a volume to persist data:
- docker run –name redis -p 6379:6379 -v redisdata:/data -d redis:7 redis-server –appendonly yes
- If you want to customize redis.conf, mount it:
- docker run –name redis -p 6379:6379 -v /path/on/host/redis.conf:/usr/local/etc/redis/redis.conf -d redis:7 redis-server /usr/local/etc/redis/redis.conf
Step 5 — Security and access control
- Set a password via a custom configuration file redis.conf and mount it into the container:
- requirepass YourStrongPassword
- Consider TLS in production environments requires additional setup with stunnel or Redis with TLS support on newer builds.
Step 6 — Connecting from Windows How to pass parameters to view in sql server 2008: Parameterized Views, TVF, and Best Practices 2026
- With port 6379 exposed, you can connect from any Windows app or script using 127.0.0.1:6379, or configure a jump host for remote connections if needed.
Step 7 — Quick monitoring
- Use RedisInsight or a simple CLI probe:
- docker exec -it redis redis-cli info
Quick Start with Memurai Windows-native
Step 1 — Download and install Memurai
- Get Memurai Community or Developer edition.
- Run the installer and follow the prompts to install Memurai as a Windows service.
Step 2 — Start Memurai and verify
- Memurai typically starts as a Windows service automatically after install.
- Open a Command Prompt or PowerShell and test:
- redis-cli.exe ping
- You should see PONG if Memurai is healthy and reachable.
Step 3 — Basic configuration How to open a port in windows server 2026 firewall: Inbound rules, ports, and security best practices
- Memurai uses a redis.conf-like file. You can adjust:
- requirepass yourpassword
- bind 127.0.0.1
- maxmemory and eviction policies as needed
- Ensure data directory is appropriate for Windows, and enable AOF/RDB as desired.
Step 4 — Accessing and tooling
- You can use the standard redis-cli.exe shipped with Memurai or install your own Redis CLI and point it at 127.0.0.1:6379.
- For Windows-native dashboards, use RedisInsight to monitor metrics and keys.
Security and Best Practices for Windows Redis
- Always secure your instance with a strong password:
- Keep your data safe with persistence:
- RDB dumps dump.rdb and/or Append-Only File appendonly.aof
- Control access with bind 127.0.0.1 when you’re testing locally. for remote access, use a secure network setup and TLS in upgraded Redis builds.
- Set a sensible maxmemory and eviction policy when running in constrained environments.
- Regularly back up data directories and consider automated backup tooling for Docker volumes or WSL paths.
- Monitor health using INFO, RedisInsight, or Prometheus exporters.
Performance Tuning and Production Readiness
- Persistence strategy
- If you’re using Redis mainly as a cache, you can keep AOF disabled or tuned for performance.
- For durable session storage, enable AOF with a reasonable fsync policy appendfsync everysec.
- Memory management
- maxmemory
and a clear eviction policy allkeys-lru is common for caches.
- maxmemory
- Networking
- For development, binding to localhost is simplest. In production-ish environments, you’ll want to carefully manage firewall rules and TLS if exposing Redis beyond a private network.
- Monitoring and observability
- Use Redis INFO metrics, RedisInsight, and Prometheus exporters to keep an eye on memory, IOPS, and command latency.
- High availability HA
- Redis Sentinel or Redis Cluster is recommended for HA. In Windows environments with WSL, you’d typically bind to a single node or deploy a small cluster with Docker or a cloud-based Redis service for resilience.
Common Issues and Quick Fixes
- Issue: 127.0.0.1 refused or connection reset
- Check that Redis is actually running ps aux | grep redis or service status
- Ensure the port is not blocked by a firewall
- Confirm the bind address is correct in redis.conf
- Issue: Data not persisted after restart
- Verify that appendonly yes is set for AOF or that your RDB persistence settings are active
- Ensure the data directory is writable by the Redis process
- Issue: Slow startup in WSL2
- Increase WSL memory limit if necessary via .wslconfig
- Ensure you’re not starting Redis before the WSL environment is ready
- Issue: Docker volume data not found after restart
- Confirm the volume name and mount points. ensure the container uses the same volume
- Issue: Password authentication not working
- Double-check the password in redis.conf and ensure you’re passing the -a flag if using the CLI
Deployment Checklist Quick Reference How to Name Query a Specific DNS Server: DNS Query Targeting, DNS Server Selection, Dig NSLookup Examples 2026
- Choose a path: WSL2, Docker, or Memurai
- Install prerequisites WSL2, Ubuntu. Docker Desktop. Memurai binary
- Install and configure Redis with:
- requirepass or TLS as applicable
- appendonly yes if durability matters
- maxmemory and eviction policy
- Set up startup and automation WSL2 startup script, Docker compose, or Memurai service
- Verify connectivity from both the host and within the environment
- Set up backups and monitoring
- Prepare a rollback plan for production changes
Frequently Asked Questions
Is Redis on Windows officially supported?
Redis does not provide an official Windows port as of the latest updates. The recommended paths are WSL2 Linux Redis, Docker, or Windows-native options like Memurai for Windows environments.
Can I run Redis as a Windows service?
Yes, with Memurai you can run Redis-like services as a Windows service. WSL2-based Redis runs inside a Linux environment rather than as a Windows service, and you typically start it manually or via a Windows-scheduled task.
Which approach is best for beginners?
WSL2 is usually the simplest to get a real Redis experience with Linux tooling. Docker is best if you want portability and clean isolation. Memurai is best if you want a native Windows experience with familiar Windows tooling.
How do I install Redis on Ubuntu via WSL?
- Open WSL and run:
- Start: redis-server /etc/redis/redis.conf –daemonize yes
How can I connect from Windows to Redis running in WSL2?
- You can use a Windows Redis CLI installed on Windows, or run the Linux CLI via WSL:
- wsl redis-cli ping
- Or install redis-cli on Windows and connect to 127.0.0.1:6379
How do I secure Redis in Windows or WSL?
- Always set a password:
- Bind to localhost and use firewall rules to limit access
- Enable persistence only if durability is required
How do I enable persistence for Redis in Windows?
- In redis.conf, set:
- appendonly yes
- save 900 1
- Ensure the data directory is writable and backed up
Can Redis run on Windows without WSL or Docker?
Yes, via Memurai Windows-native. It’s a good option if you want a pure Windows experience without Linux tooling. How to Mute Someone in a Discord Server A Step by Step Guide 2026
How do I monitor Redis performance on Windows?
- Use RedisInsight, Redis CLI INFO commands, or Prometheus with a Redis exporter to track memory, keyspace hits, and latency.
What about upgrading Redis on Windows or WSL?
- For WSL, use your Linux package manager:
- sudo apt upgrade redis-server
- In Docker, pull a newer image and recreate the container with persisted data
- For Memurai, follow Memurai upgrade instructions applicable to your edition
Can I run Redis clusters or high-availability on Windows?
For production-grade HA, use Redis Sentinel or Redis Cluster, typically on Linux-based hosts or managed cloud services. WSL can host multiple nodes for testing, but it’s not a straightforward production-grade setup.
Conclusion
This guide gives you practical, step-by-step methods to run Redis on Windows using WSL2, Docker, or Memurai, plus essential configuration tips, security practices, and troubleshooting guidance. Pick the path that fits your workflow—WSL2 for a Linux-like Redis experience, Docker for isolation and portability, or Memurai for a native Windows service model. With the right setup, you’ll have a fast, reliable Redis instance on Windows that can support caching, session storage, pub/sub, and more.
Sources:
Is nordpass included with nordvpn: do you get nordpass with nordvpn, bundles, pricing, and setup tips How to Open SQL Server in Visual Studio 2017 A Step by Step Guide: Connect, LocalDB, SSDT 2026