Skip to main content

Configuration flags and variables

FerretDB provides numerous configuration flags that you can customize to suit your needs and environment. You can always access them by using the --help flag. To make user experience cloud native, every flag has its environment variable equivalent. There is no configuration file.


Some default values are overridden in our Docker image.

FlagDescriptionEnv VariableDefault Value
versionPrint version to stdout and exitFERRETDB_VERSION
log-levelLog level: debug, info, warn, errorFERRETDB_LOG_LEVELinfo
log-uuidAdd instance UUID to all log messagesFERRETDB_LOG_UUID
metrics-uuidAdd instance UUID to all metricsFERRETDB_METRICS_UUID
state-dirPath to the FerretDB state directoryFERRETDB_STATE_DIR. (/state for Docker)
debug-addrDebug address for /debug/metrics, /debug/pprof, and similar HTTP handlersFERRETDB_DEBUG_ADDR127.0.0.1:8088 (:8088 for Docker)
listen-addrFerretDB address for incoming TCP connectionsFERRETDB_LISTEN_ADDR127.0.0.1:27017 (:27017 for Docker)
listen-unixFerretDB Unix domain socket path. If empty - Unix socket is disabledFERRETDB_LISTEN_UNIX
handlerFerretDB backend handler: 'dummy', 'pg', 'tigris'FERRETDB_HANDLERpg
postgresql-urlPostgreSQL URL for pg handlerFERRETDB_POSTGRESQL_URLpostgres://
tigris-urlTigris URL for 'tigris' handlerFERRETDB_TIGRIS_URL127.0.0.1:8081
tigris-client-idTigris Client IDFERRETDB_TIGRIS_CLIENT_ID
tigris-client-secretTigris Client secretferretdb_tigris_client_secret
tigris-tokenTigris tokenFERRETDB_TIGRIS_TOKEN
listen-tlsSee Securing connections with TLSFERRETDB_LISTEN_TLS
listen-tls-cert-fileSee Securing connections with TLSFERRETDB_LISTEN_TLS_CERT_FILE
listen-tls-key-fileSee Securing connections with TLSFERRETDB_LISTEN_TLS_KEY_FILE
listen-tls-ca-fileSee Securing connections with TLSFERRETDB_LISTEN_TLS_CA_FILE
Operation Modes
modeSee Operation modesFERRETDB_MODEnormal
proxy-addrSee Operation modes/ProxyFERRETDB_PROXY_ADDR
telemetrySee Configure telemetryFERRETDB_TELEMETRYundecided