Run Redis on Windows (No Docker, No WSL)

RedisWindowsDatabasesDeveloper Tools

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 SpinDB (a CLI). No containers, no Linux subsystem, no VM. Just Redis, running as a Windows process.

Contents

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:

bash
docker run -d --name redis -p 6379:6379 redis:7-alpine

This 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:

bash
wsl --install
# Inside WSL:
sudo apt update && sudo apt install redis-server
sudo service redis-server start

This 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.

  1. Download Layerbase Desktop from layerbase.com/download
  2. Open the app and click Create Database
  3. Select Redis as the engine
  4. 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: SpinDB (CLI)

If you prefer the terminal, SpinDB is the CLI that powers Layerbase Desktop. Install it with npm and create a Redis instance in one command. (What is SpinDB?)

bash
npm i -g spindb

Create and start a Redis instance:

bash
spindb create myredis -e redis --start

SpinDB downloads the Windows Redis binary (cached after the first run), creates a data directory, and starts the server. Check the connection URL:

bash
spindb url myredis
text
redis://127.0.0.1:6379

Manage the instance:

bash
spindb stop myredis   # Stop the server
spindb start myredis  # Start it again
spindb list           # See all instances

What About Layerbase Cloud?

This post focuses on local Redis on Windows. Redis is available through Layerbase Desktop and SpinDB for local development, but Layerbase Cloud does not currently offer hosted Redis.

If you want a managed Redis-compatible endpoint, use Valkey on Layerbase Cloud. Valkey speaks the Redis protocol, works with Redis client libraries, and is available as a hosted Cloud database.

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 (SpinDB assigns a different port if 6379 is already in use).

With the redis npm package:

typescript
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:

typescript
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.

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 SpinDB gives you the CLI 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 SpinDB and Layerbase Desktop. Check out the full list at layerbase.com/spindb.

Something not working?