Skip to main content

Server Configuration Flags

Dragonfly can be tuned and configured by a set of config flags. These flags can be:

  1. Passed to a Dragonfly as command line arguments. E.g, dragonfly --port=6379.
  2. Loaded from a file. E.g. dragonfly --flagfile=path_to_flags/flags.txt
  3. Can be set via env variables by adding the prefix DFLY_ followed by the flag name. E.g. export DFLY_port=6379 (note it's case sensitive)
  4. At runtime via CONFIG SET command. Not all flags can be configured at runtime.

You can try dragonfly --helpfull to get a list of all flags or --help=substring shows help for flags which include specified substring in either in the name, description or path.

Available flags


Redis port. 0 disables the port, -1 will bind on a random available port.

default: 6379


If true, the backend behaves like a cache, by evicting entries when getting close to maxmemory limit

default: false


Set cluster mode. Available options are: yes, emulated and empty "".

default: ""


Limit on maximum-memory that is used by the database. 0 - means the program will automatically determine its maximum memory usage.

default: 0


Number of databases.

default: 16


Bind address. If empty - binds on all interfaces. It's not advised due to security implications.

default: ""


Password for AUTH authentication.

default: ""


The filename to save/load the DB.

default: "dump-{timestamp}"


Cron expression for the time to save a snapshot, crontab style.



If true use DenseSet for an optimized set data structure.

default: true


If true use b+tree for zset implementation.

default: true


If set, the admin console TCP connection would be bind to the given address. This supports both HTTP and RESP protocols.

default: ""


If set, would enable admin access to console on the assigned port. This supports both HTTP and RESP protocols.

default: 0


Maximum io buffer length that is used to read client requests.

default: 65536


Maximum multi-bulk (array) length that is allowed to be accepted when parsing RESP protocol

default: 65536


When enabled, Dragonfly will try to migrate connections to the target thread on which they operate. Currently this is only supported for Lua script invocations, and can happen at most once per connection.

default: true


Allow non-tls connections on admin port.

default: false


Amount of memory to use for storing pub commands in bytes - per IO thread.

default: 134217728


Number of queued pipelined commands above which squashing is enabled, 0 means disabled.

default: 10


If true allows accessing http console on main TCP port.

default: true


Amount of memory to use for request cache in bytes per IO thread.

default: 67108864


Configures dragonfly connections with socket option TCP_NODELAY.

default: true


Starting thread id for handling server connections.

default: 0


Number of threads used for handing server connections.

default: 0


If true uses incoming cpu of a socket in order to distribute incoming connections.

default: false


The period in seconds of inactivity after which keep-alives are triggerred, the duration until an inactive connection is terminated is twice the specified time.

default: 300


Enable tls.

default: false


Certified authority signed certificates directory. Use c_rehash on the directory before specifying this flag.

default: ""


Certified authority signed certificate to validate tls connections.

default: ""


Cert file(public key) for tls connections.

default: ""


Private Key file for tls connections.

default: ""


Change the name of commands, format is: <cmd1_name>=<cmd1_new_name>, <cmd2_name>=<cmd2_new_name>)



Commands restricted to connections on the admin port.



When true, locks are done in the {hashtag} level instead of key level. Only use this with --cluster_mode=emulated|yes.

default: false


Enable eviction during heartbeat when memory is under pressure.

default: true


The maximum number of key-value pairs that will be deleted in each eviction when heartbeat based eviction is triggered under memory pressure.

default: 100


The maximum number of dashtable segments to scan in each eviction when heartbeat based eviction is triggered under memory pressure.

default: 4


If true - uses linux epoll engine underneath. Can fit for kernels older than 5.10.

default: false


If not empty - server writes its pid into the file).

default: ""


If not empty - specifies path for the Unix socket that will be used for listening for incoming connections.

default: ""


Set permissions for unixsocket, in octal value.

default: ""


If true, Will monitor for new releases on Dragonfly servers once a day.

default: true


Base frequency at which the server performs other background tasks. Warning: not advised to decrease in production.

default: 100


Memory page under utilization threshold. Ratio between used and committed size, below this, memory in this page will defragmented.

default: 0.8


Minimum percentage of used memory relative to maxmemory cap before running defragmentation.

default: 0.7


The ratio of wasted/committed memory above which we run defragmentation.

default: 0.2


When non-empty, keys which start with this prefix are not distributed across shards based on their value but instead via round-robin. Use cautiously! This can efficiently support up to a few hundreds of prefixes. Note: prefix is looked inside hash tags when cluster mode is enabled.

default: ""


Use single hop optimization for blocking commands.

default: true


Enables tiered storage if set. The string denotes the path and prefix of the files associated with tiered storage. For example, spill_file_prefix=/path/to/file-prefix.

default: ""


Maximum number of keys output by keys command.

default: 8192


If true uses O_DIRECT to open backing files.

default: false


Compress depth of the list. Default is no compression.

default: 0


Maximum listpack size, default is 8kb.

default: -2


If set, would enable open admin access to console on the assigned port, without authorization needed.

default: false


Memcached port:

default: 0


Max buffer for squashed commands per script:

default: 4096


Set multi exec atomicity mode: 1 for global, 2 for locking ahead, 3 for non atomic.

default: 2


Whether multi exec will squash single shard commands to optimize performance.

default: true


Number of database shards, 0 - to choose automatically.

default: 0


commands with flag denyoom will return OOM when the ratio between maxmemory and used memory is above this value.

default: 1.1


Password for authentication with master.

default: ""


Specifies a host and port which point to a target master to replicate. Format should be <IPv4>:<PORT> or host:<PORT> or [<IPv6>]:<PORT>.



Enable TLS on replication.

default: false


The compression level to use on zstd/lz4 compression.

default: 2


Set 0 for no compression, set 1 for single entry lzf compression,set 2 for multi entry zstd compression on df snapshot and single entry on rdb snapshot, set 3 for multi entry lz4 compression on df snapshot and single entry on rdb snapshot.

default: 3


Execute multi shards commands on replica synchronized.

default: false


Timeout for establishing connection to a replication master.

default: 20000


Timeout for re-establishing connection to a replication master.

default: 1000


Use partial sync to reconnect when a replica connection is interrupted.

default: true


Interval between acks in milliseconds.

default: 3000


Configure default flags for running Lua scripts:

  • Use allow-undeclared-keys to allow accessing undeclared keys,

  • Use disable-atomicity to allow running scripts non-atomically.

    Specify multiple values separated by space, for example allow-undeclared-keys disable-atomicity runs scripts non-atomically and allows accessing undeclared keys.

    default: ""


If enabled, call/pcall with discarded values are automatically replaced with acall/apcall.

default: false


If true, save in dragonfly-specific snapshotting format

default: true


Working directory

default: ""


Thread size for file workers when running in epoll mode, default is hardware concurrent threads.

default: 0


Maximum number of concurrent clients allowed.

default: 64000


Whether to load credentials and configuration from EC2 metadata.

default: false


Endpoint for s3 snapshots, default uses aws regional endpoint.

default: ""


Whether to sign the s3 request payload when uploading snapshots.

default: true


Whether to use https for s3 endpoints.

default: true


Add commands slower than this threshold to slow log. The value is expressed in microseconds and if it's negative disables the slowlog.

default: 10000


Slow log maximum length.

default: 20


Lua interpreters per thread

default: 10


Enables / disables tracking of hot keys debugging feature.

default: false


Maximal number of pending writes per thread.

default: 32


Path and name to aclfile.

default: ""


Specify the number of log entries. Logs are kept locally for each thread and therefore the total number of entries are acllog_max_len * threads

default: 32


Ip that cluster commands announce to the client.

default: ""


The length of the circular replication log per shard.

default: 1024


Can be on, off or auto.

default: "on"


Number of io threads in the pool.

default: 0


If true tries to register file descriptors.

default: false


Comma-separated list of files to load flags from.



Log messages go to stderr in addition to logfiles.

default: false


If specified, logfiles are written into this directory instead of the default logging directory.

default: ""


Log messages go to stderr instead of logfiles.

default: false


Log messages go to stdout instead of logfiles.

default: false


Approx. maximum log file size (in MB). A value of 0 will be silently overridden to 1.

default: 1800


Messages logged at a lower level than this don't actually get logged anywhere.

default: 0


Log messages at or above this level are copied to stderr in addition to logfiles. This flag obsoletes --alsologtostderr

default: 2