How to Install Redis on Windows Server 2025
Redis is an open-source, in-memory data structure store that functions as a cache, message broker, session store, rate limiter, leaderboard engine, and much more. Its sub-millisecond read/write latency makes it indispensable in modern application stacks. While Redis is natively a Linux daemon, Windows Server 2025 users have several legitimate options: Memurai (a Redis-compatible, fully native Windows service built on the Redis codebase), Redis via Windows Subsystem for Linux (WSL2), and Redis Stack (which extends Redis with search, JSON, and graph modules). This guide focuses on Memurai — the most operationally straightforward Redis-compatible solution for production Windows Server environments — while also covering the WSL2 approach for those who need the exact upstream Redis binary.
Prerequisites
- Windows Server 2025 (Standard or Datacenter), fully patched
- Administrator privileges
- At least 2 GB RAM available for Redis (tune
maxmemoryaccordingly) - WSL2 feature enabled if using the WSL2 approach (optional)
- A Memurai license key (Developer edition is free; Developer Pro and Enterprise are paid)
- Inbound firewall access decision for port 6379
Step 1 — Download and Install Memurai
Memurai is a Redis-compatible Windows service that passes the Redis compatibility test suite. Download the installer from https://www.memurai.com/get-memurai. The Developer edition is free for evaluation and light production use.
# Download Memurai installer (Developer edition)
$url = "https://www.memurai.com/downloads/memurai-developer-4.1.0.msi"
$dest = "C:Installersmemurai-developer-4.1.0.msi"
Invoke-WebRequest -Uri $url -OutFile $dest -UseBasicParsing
Run the MSI as Administrator. The installer:
- Installs Memurai binaries to
C:Program FilesMemurai. - Creates a default configuration at
C:Program FilesMemuraimemurai.conf. - Registers Memurai as a Windows service set to start automatically.
- Installs
memurai-cli(a fully compatibleredis-clireplacement) andmemurai-server.
Verify the service:
Get-Service -Name "Memurai"
# Status should be Running
Step 2 — Configure memurai.conf
Open the configuration file as Administrator. This file uses the same format as Redis’s redis.conf:
notepad "C:Program FilesMemuraimemurai.conf"
Key settings to review and adjust:
# Network binding
bind 127.0.0.1 192.168.1.50 # bind to localhost and the server's LAN IP
# bind 0.0.0.0 # listen on all interfaces (use with caution)
port 6379
# Authentication — ALWAYS set a strong password for any networked Redis/Memurai
requirepass "YourStr0ng!RedisP@ssword"
# Maximum memory limit (leave headroom for OS; this is NOT a hard OS cap)
maxmemory 2gb
# Eviction policy — what to do when maxmemory is reached
# allkeys-lru: evict least recently used keys (best for pure cache use cases)
# volatile-lru: only evict keys with TTL set
# noeviction: return errors instead of evicting (good for session stores)
maxmemory-policy allkeys-lru
# Persistence — RDB snapshot
save 900 1 # save if at least 1 key changed in 900 seconds
save 300 10 # save if at least 10 keys changed in 300 seconds
save 60 10000 # save if at least 10000 keys changed in 60 seconds
dbfilename dump.rdb
dir C:ProgramDataMemurai
# Persistence — Append Only File (AOF) — stronger durability guarantee
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec # sync to disk every second (balance of safety/speed)
# appendfsync always # sync on every write (safest, slowest)
# appendfsync no # OS decides (fastest, least safe)
# Connections
maxclients 1000
tcp-backlog 511
timeout 300
# Logging
loglevel notice
logfile C:ProgramDataMemuraimemurai.log
# Slow log — log queries slower than 10ms
slowlog-log-slower-than 10000 # microseconds
slowlog-max-len 128
After saving, restart Memurai to apply:
Restart-Service -Name "Memurai"
Get-Service -Name "Memurai"
Step 3 — Test Connectivity with memurai-cli (redis-cli Compatible)
The Memurai CLI is a drop-in replacement for redis-cli and accepts identical commands:
# Add Memurai bin directory to PATH
$env:PATH += ";C:Program FilesMemurai"
# Connect to the local instance with the password you set
memurai-cli -h 127.0.0.1 -p 6379 -a "YourStr0ng!RedisP@ssword"
# --- Inside the CLI ---
# Test connectivity
PING
# Response: PONG
# Basic key-value operations
SET mykey "Hello, Redis on Windows Server 2025!"
GET mykey
# Response: "Hello, Redis on Windows Server 2025!"
# Set a key with expiry (TTL in seconds)
SET session:user123 "active" EX 3600
TTL session:user123
# Increment a counter
SET page_views 0
INCR page_views
INCR page_views
GET page_views # returns "2"
# Working with hashes
HSET user:1001 name "Alice" email "[email protected]" role "admin"
HGET user:1001 name
HGETALL user:1001
# Lists
RPUSH queue:jobs "job1" "job2" "job3"
LLEN queue:jobs
LPOP queue:jobs
# Server information
INFO server
INFO memory
INFO persistence
INFO stats
Step 4 — Open Windows Firewall Port 6379
# Only open the port if remote clients need access
# (if Redis is only used locally, keep it closed)
New-NetFirewallRule `
-DisplayName "Memurai Redis 6379" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 6379 `
-Action Allow `
-Profile Domain,Private
# Restrict to the application server subnet for better security
New-NetFirewallRule `
-DisplayName "Memurai Redis 6379 AppSubnet" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 6379 `
-RemoteAddress "10.10.5.0/24" `
-Action Allow `
-Profile Domain,Private
Get-NetFirewallRule -DisplayName "Memurai Redis 6379" | Select-Object DisplayName, Enabled
Step 5 — Windows Service Management
# Start the service
Start-Service -Name "Memurai"
# Stop the service
Stop-Service -Name "Memurai"
# Restart the service
Restart-Service -Name "Memurai"
# Change startup type (should be Automatic for production)
Set-Service -Name "Memurai" -StartupType Automatic
# Check service recovery options (auto-restart on failure)
sc.exe failure Memurai reset= 86400 actions= restart/5000/restart/10000/restart/30000
Step 6 — Understanding Redis Data Types
Redis supports several fundamental data types, each optimised for specific use cases:
- Strings — Binary-safe scalars; support atomic increment/decrement (counters, rate limiters)
- Hashes — Field-value maps; ideal for storing objects like user profiles
- Lists — Doubly linked lists; perfect for queues, recent activity feeds
- Sets — Unordered collections of unique strings; tagging, unique visitors
- Sorted Sets (ZSets) — Sets with a floating-point score; leaderboards, time-series data
- Bitmaps — Bit-level operations on strings; feature flags, daily active users
- HyperLogLog — Probabilistic cardinality estimation (unique count) with ~0.81% error
- Streams — Append-only log structure; event sourcing, message queues
Step 7 — Install Redis Insight for GUI Management
Redis Insight is the official free GUI client from Redis Ltd., compatible with both Redis and Memurai. Download from https://redis.io/insight/ and install on the server or your workstation. Connect using:
- Host:
127.0.0.1(or server IP for remote) - Port:
6379 - Password: your
requirepassvalue
Redis Insight provides a browser interface for exploring keys, running CLI commands, viewing slow logs, and analysing memory usage by key pattern.
Step 8 — Alternative: Redis via WSL2
If you require the exact upstream Redis binary (for full Redis Stack modules, for example), install it through WSL2:
# Enable WSL2 feature (requires reboot)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Restart-Computer
# After reboot, install Ubuntu from PowerShell
wsl --install -d Ubuntu-24.04
wsl --set-default-version 2
# Inside WSL2 Ubuntu shell
sudo apt update && sudo apt install -y redis-server
sudo systemctl enable redis-server
sudo systemctl start redis-server
redis-cli PING # should return PONG
Conclusion
Memurai provides a robust, natively integrated Redis-compatible cache and data store for Windows Server 2025, eliminating the operational complexity of running Redis under WSL2 for most production scenarios. With requirepass authentication, maxmemory limits, a sensible eviction policy, and both RDB and AOF persistence enabled, your Memurai instance is well-hardened and production-ready. From here, explore Memurai’s clustering capabilities for horizontal scaling, use Redis Insight’s memory profiler to identify large or redundant keys, and integrate your application using any of Redis’s official client libraries — StackExchange.Redis for .NET, Jedis or Lettuce for Java, or redis-py for Python — all of which connect to Memurai transparently without code changes.