DiceDB is a fork of Valkey (a fork of Redis). DiceDB extends Valkey with additional capabilities while staying fully compatible with Valkey and Redis tooling and SDK ecosystem.
This is a quick start guide. For full documentation, visit dicedb.io.
DiceDB builds on Valkey, so you may still see Valkey references in logs, metrics, and parts of the codebase.
Note
DiceDB originally started as a Golang-based storage engine and offered reactivity and higher throughput as its core offering. That implementation is now archived: dice-legacy. Selected features from the legacy engine will be gradually ported into the current codebase.
The quickest and easiest way to start using DiceDB is with the official Docker image. It comes with everything pre-configured, so you can get up and running in seconds without worrying about setup details.
docker run \
--name dicedb-001 \
-p 6379:6379 -v $(pwd)/data:/data/ \
dicedb/dicedbThis command starts a DiceDB container with the spill module already enabled. By default, the spill module uses RocksDB and is configured with a maximum memory limit of 250MB.
If you prefer not to use the defaults and want to explicitly configure DiceDB, you can run DiceDB with explicit configuration
docker run \
--name dicedb-001 \
-p 6379:6379 -v $(pwd)/data:/data/ \
dicedb/dicedb \
dicedb-server \
--port 6379 \
--maxmemory 500mb \
--protected-mode noThis configuration sets:
- DiceDB max memory limit to 500MB
- Spill memory limit to 250MB
Once the container is running, connect to it, run the DiceDB CLI, and execute the commands.
$ docker exec -it dicedb-001 dicedb-cli
> ping
> set foo bar
> get foo
> incr counterDiceDB extends Valkey with the following key capabilities:
- dicedb-spill - transparently persists evicted keys to disk and restores them on cache misses, enabling larger working sets within fixed memory budgets.
DiceDB supports Linux, macOS, OpenBSD, NetBSD, and FreeBSD. Both little-endian and big-endian systems are supported, including 32-bit and 64-bit architectures.
Basic build:
make
make test
For additional build and configuration options, refer to DiceDB documentation.
Start server with default configuration:
./src/dicedb-server
Start with a configuration file:
./src/dicedb-server /path/to/valkey.conf
You can also pass configuration options directly:
./src/dicedb-server --port 9999 --replicaof 127.0.0.1 6379
./src/dicedb-server --loglevel debug
For advanced configuration, refer to DiceDB or Valkey documentation.
Use dicedb-cli or any compatible client.
Example:
./src/dicedb-cli
> ping
> set foo bar
> get foo
> incr counter
DiceDB has a strong vision and roadmap. If you find DiceDB useful, please consider supporting us by starring this repo and sponsoring us on GitHub.