Run Redis on Windows (No Docker, No WSL)
Short version: Redis OSS ships no native Windows binaries, and the usual answers are Memurai, Docker Desktop, or WSL2, all of which mean running Linux to get a key-value store. We compiled Redis from source for Windows and ship it through Layerbase Desktop and the Layerbase CLI, so lbase create myredis -e redis --start gives you a real Windows process on redis://127.0.0.1:6379. RDB persistence works; AOF persistence and Cluster mode do not.
Redis OSS does not ship native Windows binaries. That's not a bug or an oversight. The Redis maintainers have historically targeted Linux and macOS for the open-source server, and the official docs now point Windows users to Memurai, Redis' Windows compatibility partner, or to WSL.
If you search for "Redis on Windows," the common answers are: use Memurai, install Docker Desktop and run Redis in a Linux container, or enable WSL2 and run Redis inside a Linux subsystem. Those paths work. Docker and WSL still mean you're running Linux to use a key-value store. Docker Desktop adds a VM, a daemon, and several gigabytes of overhead. WSL2 is lighter but still requires managing a Linux distribution inside your Windows machine.
We took a different approach. We compiled Redis from source targeting Windows, tested it, and packaged it as a native binary. You can run it through Layerbase Desktop (a GUI) or the Layerbase CLI (formerly SpinDB). No containers, no Linux subsystem, no VM. Just Redis, running as a Windows process.
Contents
- Why Redis Doesn't Support Windows
- The Usual Workarounds
- Native Redis on Windows with Layerbase
- What About Layerbase Cloud?
- Connecting to Your Redis Instance
- What Works and What Doesn't
- Wrapping Up
Why Redis Doesn't Support Windows
Redis uses OS-level features that are deeply tied to Linux: fork() for background persistence, epoll for I/O multiplexing, and Unix domain sockets for local connections. Windows handles all of these differently. Microsoft maintained a Windows port of Redis years ago (Microsoft Open Technologies), but that project was archived and hasn't been updated since Redis 3.x. The current Redis codebase (8.x) has moved far beyond what that port covered.
The Redis team's position is straightforward: Redis OSS is optimized for Linux and macOS, and Redis itself does not ship native Windows OSS builds. If you're deploying Redis in production, it's almost certainly running on Linux anyway. But for local development on a Windows machine, the lack of a native Redis OSS build means extra friction.
The Usual Workarounds
Docker Desktop
The most common suggestion. Install Docker Desktop, pull the redis:7-alpine image, and run:
docker run -d --name redis -p 6379:6379 redis:7-alpineThis works, but it means:
- Docker Desktop requires a background VM (Hyper-V or WSL2 backend)
- Memory overhead from the Docker daemon and container runtime
- Port mapping between the container and your host
- Paid subscription required for companies above a certain size
- Redis is running inside a Linux container, not natively on Windows
WSL2
Enable Windows Subsystem for Linux, install Ubuntu (or another distro), and install Redis through apt:
wsl --install
# Inside WSL:
sudo apt update && sudo apt install redis-server
sudo service redis-server startThis gives you a real Linux environment, so Redis runs the way the maintainers intended. But you're managing a Linux distribution inside Windows, switching between file systems, and dealing with networking between WSL and Windows.
Both approaches add layers between you and Redis. If all you want is a local Redis server for development, those layers are overhead.
Native Redis on Windows with Layerbase
We built custom Windows binaries for Redis. The binary runs as a native Windows process. Your data lives on your Windows file system. Connection happens through localhost on the standard Redis port. No containers, no Linux layer.
Option 1: Layerbase Desktop (GUI)
Layerbase Desktop is a desktop app for managing local databases. Download the Windows installer, open the app, and create a new Redis instance with a few clicks.
- Download Layerbase Desktop from layerbase.com/desktop/download
- Open the app and click Create Database
- Select Redis as the engine
- Give it a name and click Create
The app handles downloading the binary, setting up the data directory, and starting the server. You get start/stop controls, connection details, and a visual overview of all your database instances.
Option 2: Layerbase CLI
If you prefer the terminal, the Layerbase CLI is the command-line tool that shares the same engine as Layerbase Desktop. Install it with npm and create a Redis instance in one command. (What is the Layerbase CLI?)
npm i -g layerbaseCreate and start a Redis instance:
lbase create myredis -e redis --startThe CLI downloads the Windows Redis binary (cached after the first run), creates a data directory, and starts the server. Check the connection URL:
lbase url myredisredis://127.0.0.1:6379Manage the instance:
lbase stop myredis # Stop the server
lbase start myredis # Start it again
lbase list # See all instancesWhat About Layerbase Cloud?
This post focuses on local Redis on Windows, but if you want the same database as a managed endpoint, hosted Redis on Layerbase Cloud runs on the free tier: $0, no card, and it scales to zero when idle.
Prefer the BSD-licensed fork? Valkey speaks the Redis protocol, works with the same client libraries, and is hosted on the same free tier.
Connecting to Your Redis Instance
Once Redis is running, connect from your application the same way you would on any platform. The connection URL is redis://127.0.0.1:6379 (the CLI assigns a different port if 6379 is already in use).
With the redis npm package:
import { createClient } from 'redis'
const client = createClient({ url: 'redis://127.0.0.1:6379' })
client.on('error', (err) => console.error('Redis client error:', err))
await client.connect()
await client.set('greeting', 'Hello from Windows')
const value = await client.get('greeting')
console.log(value) // "Hello from Windows"
await client.close()With ioredis:
import { Redis } from 'ioredis'
const redis = new Redis(6379, '127.0.0.1')
await redis.set('key', 'value')
const result = await redis.get('key')
console.log(result)
redis.disconnect()Every Redis client library works. The server speaks the same protocol regardless of the platform it's running on.
What Works and What Doesn't
Our Windows Redis binary supports the core feature set that matters for local development:
- All data structures (strings, lists, sets, sorted sets, hashes, streams)
- Pub/Sub
- Transactions (MULTI/EXEC)
- Lua scripting
- RDB persistence
- Standard TCP connections on localhost
Our Windows binary does not support AOF (append-only file) persistence. Some third-party Windows ports (like tporadowski/redis, based on Redis 5.0.14) do support AOF by replacing Unix fork() with a Windows-compatible background rewrite mechanism, but our binary focuses on the features above. RDB persistence is fully supported and more than sufficient for local development.
Redis Cluster mode is not supported in our Windows binary due to Windows networking constraints (the cluster bus port, firewall/NAT issues). This is a platform limitation, not a file I/O issue. For production clusters, you'll be running on Linux anyway.
FAQ
Can you run Redis on Windows without Docker or WSL?
Yes, with a binary compiled for Windows. Redis OSS does not publish one, so the mainstream advice is Memurai, a Linux container, or a Linux subsystem. We build the binary ourselves and both Layerbase Desktop and the Layerbase CLI download and run it for you.
Why does Redis not support Windows officially?
Because the codebase leans on Linux primitives: fork() for background persistence, epoll for I/O multiplexing, and Unix domain sockets for local connections. Microsoft maintained a port years ago, but it was archived at Redis 3.x and the current 8.x codebase has moved far past it. Production Redis runs on Linux, so that is where the maintainers spend their effort.
Does the Windows build support AOF persistence?
No. RDB snapshots work and are more than enough for local development, but append-only file persistence is not in our Windows binary. Some third-party ports built on Redis 5.0.14 replace fork() with a Windows-compatible background rewrite to get AOF; ours does not.
Does Redis Cluster work on Windows?
No, and this one is a platform constraint rather than a build choice: the cluster bus port runs into Windows networking, firewall, and NAT behavior. If you are running a production cluster you are on Linux anyway.
Which client libraries work?
All of them. The server speaks the same protocol regardless of the platform underneath it, so redis, ioredis, and everything else connect to redis://127.0.0.1:6379 unchanged. The CLI picks a different port if 6379 is already taken.
Should I use Valkey instead?
If licensing matters to your project, it is worth a look. Valkey is the BSD-licensed fork, speaks the same protocol, and works with the same client libraries. We ship a Windows binary for it too.
Wrapping Up
Redis not supporting Windows is a reasonable decision by the maintainers. Linux is where Redis runs in production, and that's where they focus their effort. But developers use Windows, and needing Docker or WSL just to run a local cache server during development is unnecessary friction.
We built these Windows binaries because we think running a database locally should be a one-step process on any platform. Layerbase Desktop gives you a GUI if you want one, and the Layerbase CLI gives you the command line if you don't. Either way, Redis runs natively on your Windows machine in seconds. If you want a hosted Redis-compatible endpoint instead, use Valkey on Layerbase Cloud.
Redis is one of 20+ engines available through the Layerbase CLI and Layerbase Desktop. Check out the full list at layerbase.com/docs/cli, or the Redis on Layerbase page for the Redis-specific details.
Keep reading
- Run Valkey on Windows (No Docker, No WSL)No official Valkey Windows binary exists anywhere. We manually compiled one so you can run Valkey natively on Windows without Docker or WSL.
- Northflank alternatives: a preview environment is not a database branchNorthflank gives every pull request its own stack, and the database in that stack starts empty unless you seed it or restore it from a backup you already had. Here is exactly how their forks work, what a copy-on-write branch does differently, what each one costs while a PR sits open, and the cases where Northflank is the right answer.
- Redis Cloud alternatives: pay for the modules, or stop paying for themRedis Cloud prices itself around the module story: search, JSON, time series, vector sets, Active-Active. If you use those, the bill is buying something real. If you use Redis as a cache, a session store, or a queue, you are paying the module premium for a key-value store. Here is what each tier buys, where a flat plan fits, and when to stay.
- Build the Redis backend for a WhatsApp botConversation state with TTLs, BullMQ queues for scheduled reminders, idempotency keys for retried webhooks, and per-recipient rate limits, all on one Redis-compatible Valkey.