Valkey: The Redis Fork You Should Self-Host on a VPS in 2026
Valkey is an open-source, high-performance key-value store. It forked from Redis 7.2 in March 2024 after Redis Ltd changed Redis from BSD to dual SSPL/RSALv2 license. The Linux Foundation now backs Valkey with contributors from AWS, Google, Oracle, and Ericsson.
Why Valkey Exists
Redis was BSD-licensed for 15 years. In 2024, Redis Ltd changed the license to restrict cloud providers from offering Redis as a managed service. The community forked. Valkey keeps the BSD 3-clause license, free to use anywhere without licensing restrictions.
If you used Redis before, Valkey requires zero code changes. It is wire-compatible. Your existing Redis clients, libraries, and applications work with Valkey without modification.
Valkey vs Redis
| Feature | Valkey | Redis |
|---|---|---|
| License | BSD 3-Clause (free) | SSPL / RSALv2 (restrictive) |
| Wire compatibility | Full Redis protocol | N/A |
| Performance | Equal or better | Baseline |
| Backed by | Linux Foundation, AWS, Google | Redis Ltd |
| Self-hosting | No restrictions | License restricts some use cases |
Install Valkey on a VPS
Requirements: Linux VPS with 1+ GB RAM (Ubuntu 22.04+ or Debian 12), root access.
sudo apt update && sudo apt install -y build-essential tcl
git clone https://github.com/valkey-io/valkey.git
cd valkey && git checkout 8.0
make -j$(nproc)
sudo make install
Config file (/etc/valkey/valkey.conf):
bind 127.0.0.1
port 6379
maxmemory 256mb
maxmemory-policy allkeys-lru
appendonly yes
requirepass your-strong-password-here
Systemd service:
sudo tee /etc/systemd/system/valkey.service << EOF
[Unit]
Description=Valkey
After=network.target
[Service]
ExecStart=/usr/local/bin/valkey-server /etc/valkey/valkey.conf
Restart=always
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable valkey && sudo systemctl start valkey
Test: valkey-cli -a your-strong-password-here ping returns PONG.
Use Cases
- Caching: Store DB query results and API responses. A 256 MB instance handles millions of cached objects.
- Session storage: Faster than database-backed sessions. Supports TTL for automatic expiration.
- Rate limiting: Track API request counts with INCR and EXPIRE commands.
- Discord bot state: Store command cooldowns and temporary data faster than SQLite on high-frequency reads.
- Real-time leaderboards: Sorted sets give ranked leaderboards with O(log n) inserts.
Performance Tips
- Set maxmemory to 75% of your VPS RAM
- Use allkeys-lru eviction for caching workloads
- Enable io-threads for high throughput:
io-threads 4 - Disable AOF (
appendonly no) if you only use Valkey as a cache
Self-Host on Space-Node
A Valkey instance runs well on a 1-2 GB VPS. Space-Node plans start at 3.50 EUR/month with NVMe SSD storage and full root access. No managed service fees.
Why Valkey instead of Redis in 2026
Redis Inc. relicensed Redis 7.4 under the SSPL/RSALv2 in March 2024, removing the BSD license that allowed cloud providers to offer it as a managed service. The Linux Foundation forked Redis 7.2.4 (the last BSD version) into Valkey. AWS, Google Cloud, Oracle, and major distros (Debian, Fedora, Alpine) now ship Valkey as the default redis-server package.
| Aspect | Redis 8 (commercial) | Valkey 8 (BSD) |
|---|---|---|
| License | SSPL/RSALv2 | BSD-3 |
| Wire protocol | RESP3 | RESP3 |
| Client compatibility | unchanged | unchanged |
| Performance vs Redis 7.2 | ~5 % faster | 5-15 % faster (multi-thread I/O) |
| Cluster | yes | yes |
| Persistence (RDB+AOF) | yes | yes |
Existing Redis clients (redis-py, ioredis, go-redis) work without changes.
Install on Debian/Ubuntu
curl -fsSL https://download.valkey.io/key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/valkey.gpg
echo "deb [signed-by=/usr/share/keyrings/valkey.gpg] https://download.valkey.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/valkey.list
sudo apt update && sudo apt install -y valkey-server
For Docker:
services:
valkey:
image: valkey/valkey:8-alpine
command: ["valkey-server", "--save", "60", "1", "--appendonly", "yes"]
volumes:
- ./data:/data
ports:
- "127.0.0.1:6379:6379"
restart: unless-stopped
Bind to 127.0.0.1 only. If you need remote access, put it behind a Wireguard tunnel or set requirepass plus TLS.
valkey.conf settings that actually matter
maxmemory 1gb
maxmemory-policy allkeys-lru
save 900 1
save 300 10
appendonly yes
appendfsync everysec
io-threads 4
io-threads-do-reads yes
io-threads is the single biggest reason to pick Valkey over Redis 7.x: read-heavy workloads see ~30 % throughput gains.
Migration from Redis is zero-effort
systemctl stop redis-server
cp /var/lib/redis/dump.rdb /var/lib/valkey/
systemctl start valkey-server
If you used Redis Sentinel or Redis Cluster, Valkey reads the same configs.
Common breakage
| Symptom | Cause | Fix |
|---|---|---|
| Client reports "NOAUTH" | requirepass set, client missing password | match AUTH in client |
| Memory grows past maxmemory | wrong policy (noeviction) | switch to allkeys-lru |
| Cluster won't form | binding to 127.0.0.1 only | bind to LAN interface |
| Slow large value writes | AOF always | use everysec (default) |
