Skip to content

Configuration

FerrumKV is configured through command-line flags. Every flag also has a matching directive in the config file (ferrum.conf.example).

Command-line flags

FlagDefaultDescription
--config PATH(none)Load a config file (directives below)
--addr HOST:PORT127.0.0.1:6380RESP listening address
--dashboard-addr ADDR|off127.0.0.1:6381Web dashboard address, or off to disable
--aof-path PATH(disabled)Enable AOF persistence
--appendfsync POLICYeverysecalways / everysec / no
--client-timeout SECONDS0 (disabled)Per-connection idle timeout
--maxclients N(unlimited)Max concurrent client connections
--maxmemory BYTES0 (unlimited)Memory cap (512b / 64kb / 256mb / 1gb)
--maxmemory-policy POLICYnoevictionAny of the 16 policies
--maxmemory-samples N5Keys sampled per eviction round
--io-threads N0 (auto)Tokio worker threads
--loglevel LEVELinfooff / error / warn / info / debug / trace

Config file

bash
# ferrum.conf.example
bind 127.0.0.1
port 6380
dashboard-addr 127.0.0.1:6381
maxmemory 256mb
maxmemory-policy allkeys-ahe
appendonly yes
appendfsync everysec

Pass the file with --config ferrum.conf. Flags override config-file values. See ferrum-kv --help for the full list.