Skip to main content
Version: v2.0 RC

Configuration flags

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

info

Some default values are overridden in our Docker image.

PostgreSQL with DocumentDB extension

FlagDescriptionEnvironment VariableDefault Value
--postgresql-urlPostgreSQL connection URLFERRETDB_POSTGRESQL_URLpostgres://127.0.0.1:5432/postgres

FerretDB uses pgx v5 library for connecting to PostgreSQL. Supported URL parameters are documented there:

Additionally:

  • pool_max_conns parameter is set to 50 if it is unset in the URL;
  • application_name is always set to "FerretDB";
  • timezone is always set to "UTC".

Interfaces

FlagDescriptionEnvironment VariableDefault Value
--listen-addrListen TCP address for MongoDB protocol
(set to empty value or - to disable)
FERRETDB_LISTEN_ADDR127.0.0.1:27017
(:27017 for Docker)
--listen-unixListen Unix domain socket path for MongoDB protocol
(set to empty value or - to disable)
FERRETDB_LISTEN_UNIX
--listen-tlsListen TLS address for MongoDB protocol (see here)
(set to empty value or - to disable)
FERRETDB_LISTEN_TLS
--listen-tls-cert-fileTLS cert file pathFERRETDB_LISTEN_TLS_CERT_FILE
--listen-tls-key-fileTLS key file pathFERRETDB_LISTEN_TLS_KEY_FILE
--listen-tls-ca-fileTLS CA file pathFERRETDB_LISTEN_TLS_CA_FILE
--listen-data-api-addrListen TCP address for HTTP Data API
(set to empty value or - to disable)
FERRETDB_LISTEN_DATA_API_ADDR
--proxy-addrProxy address for non-normal operation modeFERRETDB_PROXY_ADDR
--proxy-tls-cert-fileProxy TLS cert file pathFERRETDB_PROXY_TLS_CERT_FILE
--proxy-tls-key-fileProxy TLS key file pathFERRETDB_PROXY_TLS_KEY_FILE
--proxy-tls-ca-fileProxy TLS CA file pathFERRETDB_PROXY_TLS_CA_FILE
--debug-addrListen address for HTTP handlers for metrics, pprof, etc
(set to empty value or - to disable)
FERRETDB_DEBUG_ADDR127.0.0.1:8088
(:8088 for Docker)

Miscellaneous

FlagDescriptionEnvironment VariableDefault Value
-h, --helpShow context-sensitive help
--versionPrint version to stdout and exit
--modeOperation modeFERRETDB_MODEnormal
--state-dirPath to the FerretDB state directoryFERRETDB_STATE_DIR.
(/state for Docker)
--[no-]authEnable authenticationFERRETDB_AUTHenabled
--log-levelLog level: 'debug', 'info', 'warn', 'error'FERRETDB_LOG_LEVELinfo
--[no-]log-uuidAdd instance UUID to all log messagesFERRETDB_LOG_UUIDdisabled
--[no-]metrics-uuidAdd instance UUID to all metricsFERRETDB_METRICS_UUIDdisabled
--otel-traces-urlOpenTelemetry OTLP/HTTP traces endpoint URL (e.g. http://host:4318/v1/traces)
(set to empty value or - to disable)
FERRETDB_OTEL_TRACES_URLdisabled
--telemetryEnable or disable basic telemetryFERRETDB_TELEMETRYundecided