Install and run
Prerequisites
Section titled “Prerequisites”- Zig 0.17.1 — the exact version is pinned in
build.zig.zon. makeand a C compiler.zig buildcompiles LuaJIT from thevendor/luajitsubmodule, and TLS pulls in AWS-LC through ztls, so both are built from source. No system TLS library is needed.
A pre-built binary is available from the releases page if you would rather skip the toolchain.
Build and run
Section titled “Build and run”# Clone with submodules — vendor/luajit is required for the buildgit clone --recurse-submodules https://github.com/barddoo/zedis.gitcd zedis
# Build the project (optimized, ReleaseFast)zig build --release=fast
# Run the serverzig build run --release=fastThe server listens on 127.0.0.1:6379 by default. It only reads a config file if
you pass one:
zig build run --release=fast -- ./zedis.confAlready cloned without submodules? Run git submodule update --init --recursive
before building.
Test it with redis-cli
Section titled “Test it with redis-cli”Any Redis client works; redis-cli is the shortest path:
redis-cli -h 127.0.0.1 -p 6379127.0.0.1:6379> SET mykey "Hello, Zedis!"OK127.0.0.1:6379> GET mykey"Hello, Zedis!"127.0.0.1:6379> INCR counter(integer) 1127.0.0.1:6379> TYPE mykeystringDocker
Section titled “Docker”Pre-built images are on Docker Hub:
docker run -p 6379:6379 barddoo/zedis| Tag | Base | Notes | Use case |
|---|---|---|---|
latest, x.x.x, x.x.x-debian, x.x.x-slim |
Debian Trixie slim | Larger, glibc base | Default; broader ecosystem |
x.x.x-alpine, alpine |
Alpine 3.20 | Smallest with shell | Size-sensitive deployments |
x.x.x-distroless |
Distroless static | No shell | Security-sensitive |
Persist data across restarts by mounting a volume:
docker run -p 6379:6379 -v zedis-data:/var/lib/zedis/data barddoo/zedisBring your own config:
docker run -p 6379:6379 -v ./zedis.conf:/etc/zedis/zedis.conf barddoo/zedisInside a container the KV budget defaults to 80% of the cgroup memory limit minus
fixed overhead, so --memory is respected without setting maxmemory by hand.
Outside a container it is a flat 256 MB plus a startup warning. See
memory architecture for how the budget is enforced.
- Configuration — every directive and its default, including TLS.
- Command compatibility before pointing a real workload at it.
- Persistence to choose between AOF and RDB.