Quickstart
This page starts a server, connects with redis-cli, runs a few commands across
different data types, and enables persistence. It assumes you already have a
frogdb-server binary or Docker image — see Installation
if you don’t yet. FrogDB speaks RESP2 and RESP3, and targets compatibility with
Redis 8.6.0 commands — see Compatibility
for exactly which commands and behaviors differ.
Start the server
Section titled “Start the server”# Start with defaults: 127.0.0.1:6379, persistence enabled, 1 shardfrogdb-server
# Or with a config filefrogdb-server --config frogdb.toml
# Bind to all interfaces, one shard per CPU corefrogdb-server -b 0.0.0.0 -s autodocker run -d --name frogdb \ -p 6379:6379 \ -v frogdb-data:/data \ frogdb:latestThis uses the image tag from Installation — build it locally first if you haven’t already.
services: frogdb: image: frogdb:latest ports: - "6379:6379" volumes: - frogdb-data:/data environment: FROGDB_SERVER__BIND: "0.0.0.0" FROGDB_PERSISTENCE__DATA_DIR: /data healthcheck: test: ["CMD", "redis-cli", "-p", "6379", "PING"] interval: 5s retries: 10
volumes: frogdb-data:docker compose up -dBy default the bare binary listens on 127.0.0.1:6379 with a single shard.
-s auto sizes the shard count to the number of CPU cores instead.
Connect
Section titled “Connect”redis-cli -p 6379Run some commands
Section titled “Run some commands”A string:
127.0.0.1:6379> SET greeting "Hello from FrogDB!"OK127.0.0.1:6379> GET greeting"Hello from FrogDB!"127.0.0.1:6379> INCR counter(integer) 1127.0.0.1:6379> EXPIRE greeting 60(integer) 1127.0.0.1:6379> TTL greeting(integer) 60A hash:
127.0.0.1:6379> HSET user:1 name "Ada" role "admin"(integer) 2127.0.0.1:6379> HGETALL user:11) "name"2) "Ada"3) "role"4) "admin"A sorted set:
127.0.0.1:6379> ZADD leaderboard 100 alice 85 bob(integer) 2127.0.0.1:6379> ZRANGE leaderboard 0 -1 WITHSCORES1) "bob"2) "85"3) "alice"4) "100"A list:
127.0.0.1:6379> LPUSH queue job1 job2(integer) 2127.0.0.1:6379> LRANGE queue 0 -11) "job2"2) "job1"This is a small slice of what’s supported — see the command matrix for the full, generated list of every command and its support status, and Compatibility for behavioral differences from Redis.
Persistence
Section titled “Persistence”Persistence is enabled by default, backed by RocksDB. The bare binary writes to
./frogdb-data (relative to the working directory it’s started from); the
Debian package’s default config points this at /var/lib/frogdb/data instead.
[persistence]enabled = truedata-dir = "./frogdb-data"durability-mode = "periodic" # async, periodic, or syncsync-interval-ms = 1000durability-mode controls when writes are flushed to disk: async batches
writes with no fixed interval, periodic (the default) flushes every
sync-interval-ms, and sync flushes every write before acknowledging it —
each mode trades some durability for throughput. See
Operations → Persistence for details on snapshots,
recovery, and choosing a durability mode.
Configuration
Section titled “Configuration”FrogDB reads configuration from a TOML file, FROGDB_<SECTION>__<FIELD>
environment variables, and CLI flags, in increasing order of precedence
(CLI flags win); most settings can also be changed at runtime with
CONFIG SET. See
Operations → Configuration for how those surfaces
combine.
Generate a default config file to see every setting and its default value:
frogdb-server --generate-config > frogdb.tomlAn excerpt:
[server]bind = "127.0.0.1"port = 6379num-shards = 1
[persistence]enabled = truedata-dir = "./frogdb-data"durability-mode = "periodic"sync-interval-ms = 1000
[memory]maxmemory = 0 # 0 = unlimitedmaxmemory-policy = "noeviction"See Configuration Reference for every field, or Example Config File for a complete generated file.
Client libraries
Section titled “Client libraries”Any RESP2/RESP3-capable Redis client library works with FrogDB over the standard
redis:// protocol; this guide uses redis-cli for simplicity. See
redis.io’s client list for
clients in your language.