Run Valkey on Windows (No Docker, No WSL)
Valkey is the open-source fork of Redis, maintained by the Linux Foundation under a BSD 3-Clause license. Same protocol, same data structures, same client libraries. If you're starting a new project and want an in-memory data store without Redis's licensing concerns, Valkey is the straightforward choice.
There's one problem on Windows: no Valkey binary exists. Not from the Valkey project, not from any third party, not anywhere. The Valkey team targets Linux and macOS exclusively. There is no Windows CI, no Windows build documentation, and no plan to add either. If you search for "Valkey on Windows," the only answer is Docker or WSL.
We changed that. We compiled Valkey from source in a Windows environment, worked through the platform-specific issues, and produced a native Windows binary. As far as we know, we're the only ones who have done this. You can run it through Layerbase Desktop or SpinDB.
Contents
- Why No One Has Built Valkey for Windows
- How We Built It
- Running Valkey on Windows with Layerbase
- Hosted Valkey with Layerbase Cloud
- Connecting to Valkey
- Valkey vs Redis on Windows
- Wrapping Up
Why No One Has Built Valkey for Windows
Valkey inherits its codebase from Redis, which was never designed for Windows. The code relies heavily on POSIX APIs: fork() for snapshotting, epoll for event handling, Unix signals for process management. Windows uses different primitives for all of these.
Redis at least had a Microsoft-maintained Windows port years ago (up to Redis 3.x). Valkey forked from Redis 7.x and has never had any Windows effort. The Valkey maintainers focus on Linux, where the vast majority of production deployments run. Building for Windows isn't on their roadmap.
The result: if you're a Windows developer who wants to use Valkey locally, your only official option is to run it inside a Linux environment on your machine. Until now.
How We Built It
Getting Valkey to compile and run on Windows required more than a straightforward cross-compile. We set up a Windows build environment using the Cygwin compatibility layer, which provides the POSIX APIs that Valkey depends on. The resulting binary runs as a native Windows process but bundles the necessary Cygwin runtime libraries.
This wasn't a simple ./configure && make. It took multiple iterations in a Windows VM to get the build working correctly, handle path translation between Windows and POSIX conventions, and verify that core operations (data persistence, client connections, pub/sub) work reliably. We test these binaries before shipping them through SpinDB.
Running Valkey on Windows with Layerbase
Option 1: Layerbase Desktop (GUI)
Layerbase Desktop gives you a visual interface for creating and managing database instances.
- Download Layerbase Desktop from layerbase.com/download
- Open the app and click Create Database
- Select Valkey as the engine
- Give it a name and click Create
The app downloads the custom Windows binary, configures the data directory, and starts the server. You can start, stop, and monitor the instance from the app.
Option 2: SpinDB (CLI)
SpinDB is the CLI that Layerbase Desktop is built on. One command gives you a running Valkey server. (What is SpinDB?)
Install SpinDB:
npm i -g spindbCreate and start a Valkey instance:
spindb create myvalkey -e valkey --startSpinDB downloads the custom Windows Valkey binary (cached after the first run), sets up a data directory, and starts the server.
Get the connection URL:
spindb url myvalkeyredis://127.0.0.1:6379Note the URL uses the redis:// scheme. Valkey speaks the Redis protocol, so every Redis client library connects to it unchanged.
Manage the instance:
spindb stop myvalkey
spindb start myvalkey
spindb listHosted Valkey with Layerbase Cloud
This post focuses on local Valkey on Windows, but Valkey is also available on Layerbase Cloud if you want a hosted instance instead of a local development server. Cloud Valkey runs on Linux infrastructure with TLS, backups, and connection details in the Quick Connect panel.
Use Layerbase Desktop or SpinDB when you want Valkey running directly on your Windows machine. Use Layerbase Cloud when you want a managed Valkey endpoint your app can reach from anywhere.
Connecting to Valkey
Valkey is wire-compatible with Redis. Use any Redis client library. The redis npm package works without any configuration changes:
import { createClient } from 'redis'
const client = createClient({ url: 'redis://127.0.0.1:6379' })
await client.connect()
// Valkey supports all Redis data structures
await client.set('framework', 'nextjs')
await client.hSet('session:abc', { userId: '42', role: 'admin' })
await client.lPush('queue:emails', 'welcome-email')
const framework = await client.get('framework')
console.log(framework) // "nextjs"
await client.close()With ioredis:
import Redis from 'ioredis'
const valkey = new Redis(6379, '127.0.0.1')
await valkey.set('key', 'value')
const result = await valkey.get('key')
console.log(result) // "value"
valkey.disconnect()If your code works with Redis, it works with Valkey. No driver changes, no configuration changes, no code changes.
Valkey vs Redis on Windows
Both Redis and Valkey run natively on Windows through Layerbase. The functional differences are minimal for local development. The main distinction is licensing:
- Redis changed its license in 2024. Redis 7.2 and earlier used BSD 3-Clause. Redis 7.4+ uses a dual license (RSALv2 + SSPLv1), and Redis 8+ offers a tri-license option (RSALv2, SSPLv1, or AGPLv3). The non-BSD licenses restrict certain commercial uses, particularly offering Redis as a managed service.
- Valkey is BSD 3-Clause licensed. No restrictions on use, modification, or distribution.
If you're choosing between them for a new project, Valkey avoids any licensing ambiguity. If you're already using Redis and don't have licensing concerns, both work identically through SpinDB.
For a deeper comparison, see our post on Redis vs Valkey.
Wrapping Up
Valkey has no official Windows support, and unlike Redis, it's never had any third-party Windows port either. We built one because developers on Windows shouldn't need Docker or WSL just to run a local cache server.
Layerbase Desktop gives you a GUI to manage it. SpinDB gives you the CLI. Layerbase Cloud gives you hosted Valkey when you want a managed endpoint instead of a local Windows process.
Valkey is one of 20+ engines available through SpinDB, Layerbase Desktop, and Layerbase Cloud. See the full list at layerbase.com/spindb.