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.
info
Some default values are overridden in our Docker image.
Flag | Description | Env Variable | Default Value |
---|---|---|---|
version | Print version to stdout and exit | FERRETDB_VERSION | |
log-level | Log level: debug , info , warn , error | FERRETDB_LOG_LEVEL | info |
log-uuid | Add instance UUID to all log messages | FERRETDB_LOG_UUID | |
metrics-uuid | Add instance UUID to all metrics | FERRETDB_METRICS_UUID | |
state-dir | Path to the FerretDB state directory | FERRETDB_STATE_DIR | . (/state for Docker) |
debug-addr | Debug address for /debug/metrics, /debug/pprof, and similar HTTP handlers | FERRETDB_DEBUG_ADDR | 127.0.0.1:8088 (:8088 for Docker) |
Listeners | |||
listen-addr | FerretDB address for incoming TCP connections | FERRETDB_LISTEN_ADDR | 127.0.0.1:27017 (:27017 for Docker) |
listen-unix | FerretDB Unix domain socket path. If empty - Unix socket is disabled | FERRETDB_LISTEN_UNIX | |
Handlers | |||
handler | FerretDB backend handler: 'dummy', 'pg', 'tigris' | FERRETDB_HANDLER | pg |
postgresql-url | PostgreSQL URL for pg handler | FERRETDB_POSTGRESQL_URL | postgres://127.0.0.1:5432/ferretdb |
tigris-url | Tigris URL for 'tigris' handler | FERRETDB_TIGRIS_URL | 127.0.0.1:8081 |
tigris-client-id | Tigris Client ID | FERRETDB_TIGRIS_CLIENT_ID | |
tigris-client-secret | Tigris Client secret | ferretdb_tigris_client_secret | |
tigris-token | Tigris token | FERRETDB_TIGRIS_TOKEN | |
TLS | |||
listen-tls | See Securing connections with TLS | FERRETDB_LISTEN_TLS | |
listen-tls-cert-file | See Securing connections with TLS | FERRETDB_LISTEN_TLS_CERT_FILE | |
listen-tls-key-file | See Securing connections with TLS | FERRETDB_LISTEN_TLS_KEY_FILE | |
listen-tls-ca-file | See Securing connections with TLS | FERRETDB_LISTEN_TLS_CA_FILE | |
Operation Modes | |||
mode | See Operation modes | FERRETDB_MODE | normal |
proxy-addr | See Operation modes/Proxy | FERRETDB_PROXY_ADDR | |
Telemetry | |||
telemetry | See Configure telemetry | FERRETDB_TELEMETRY | undecided |