---
title: "Environment variables"
description: "Every environment variable you can use to configure Metabase. Environment variables take precedence over settings in the admin panel."
url: "https://www.metabase.com/docs/latest/configuring-metabase/environment-variables"
version: "65"
---

> For the complete documentation index, see [llms.txt](https://www.metabase.com/docs/llms.txt).

# Environment variables

_This documentation was generated from source by running:_

```
clojure -M:ee:doc environment-variables-documentation
```

Many settings in Metabase can be viewed and modified in the Admin Panel, or set via environment variables. The environment variables always take precedence. Note that, unlike settings configured in the Admin settings of your Metabase, the environment variables won't get written into the application database.

## How to set environment variables

Setting environment variables can be done in various ways depending on how you're running Metabase.

JAR file:

```
# Mac, Linux and other Unix-based systems
export MB_SITE_NAME="Awesome Company"
# Windows Powershell
$env:MB_SITE_NAME="Awesome Company"
# Windows batch/cmd
set MB_SITE_NAME="Awesome Company"

java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar
```

Or set it as Java property, which works the same across all systems:

```
java -DMB_SITE_NAME="Awesome Company" -jar metabase.jar
```

Docker:

```
docker run -d -p 3000:3000 -e MB_SITE_NAME="Awesome Company" --name metabase metabase/metabase
```

## Environment variables on Metabase Cloud

If you're running Metabase Cloud, you can [contact support](https://www.metabase.com/help-premium) to adjust environment variables for your Metabase.

---

## List of environment variables

### `MB_ADMIN_EMAIL`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `admin-email`

The email address users should be referred to if they encounter a problem.

### `MB_AGGREGATED_QUERY_ROW_LIMIT`

- Type: integer
- Default: `10000`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `aggregated-query-row-limit`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `aggregated-query-row-limit`

Maximum number of rows to return for aggregated queries via the API.

Must be less than 1048575. See also MB_UNAGGREGATED_QUERY_ROW_LIMIT.

### `MB_AI_FEATURES_ENABLED`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `ai-features-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ai-features-enabled`

Whether AI features are enabled.

### `MB_AI_USAGE_MAX_RETENTION_DAYS`

- Type: integer
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `ai-usage-max-retention-days`.
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Number of days to retain rows in the ai_usage_log, metabot_conversation, metabot_message, agent_api_call_log, and api_key_usage_log tables. Minimum value is 30; set to 0 to retain data indefinitely.

Sets the maximum number of days Metabase preserves rows for the following application database tables:

- `ai_usage_log`
- `metabot_conversation`
- `metabot_message`
- `agent_api_call_log`
- `api_key_usage_log`

Once a day, Metabase deletes rows older than this threshold. The minimum value is 30 days (Metabase will treat entered values of 1 to 29 the same as 30).
If set to 0, Metabase will keep all rows. If you don't set this variable, Metabase keeps rows for 180 days.

### `MB_ALLOWED_IFRAME_HOSTS`

- Type: string
- Default: `youtube.com,
youtu.be,
loom.com,
vimeo.com,
docs.google.com,
calendar.google.com,
airtable.com,
typeform.com,
canva.com,
codepen.io,
figma.com,
grafana.com,
miro.com,
excalidraw.com,
notion.com,
atlassian.com,
trello.com,
asana.com,
gist.github.com,
linkedin.com,
twitter.com,
x.com`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `allowed-iframe-hosts`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `allowed-iframe-hosts`

Allowed iframe hosts. Includes a list of popular hosts by default; set to ' ' to disable the default list.

### `MB_ANALYTICS_PII_RETENTION_ENABLED`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `analytics-pii-retention-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `analytics-pii-retention-enabled`

Enable logging of embed path, query parameters, user attribute values, user agent, IP address, and Metabot conversation metadata for users of your internal data and embeds. This information will be shown in your usage analytics.

### `MB_ANON_TRACKING_ENABLED`

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `anon-tracking-enabled`

Enable the collection of anonymous usage data in order to help Metabase improve..

### `MB_API_KEY`

- Type: string
- Default: `null`

When set, this key is required for calls to /notify/ endpoints.

Middleware that enforces validation of the client via the request header X-Metabase-Apikey for /notify endpoints.
        If the header is available, then it's validated against MB_API_KEY.
        When it matches, the request continues; otherwise it's blocked with a 403 Forbidden response.
        MB_API_KEY is used only for /notify endpoints and isn't the same as Metabase API keys
        used for authenticating other API requests. MB_API_KEY can be an arbitrary string.

### `MB_APPLICATION_COLORS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: json
- Default: `{}`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `application-colors`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `application-colors`

Choose the colors used in the user interface throughout Metabase and others specifically for the charts. You need to refresh your browser to see your changes take effect.

To change the user interface colors:

```
{
 "brand":"#ff003b",
 "filter":"#FF003B",
 "summarize":"#FF003B"
}
```

To change the chart colors:

```
{
 "accent0":"#FF0005",
 "accent1":"#E6C367",
 "accent2":"#B9E68A",
 "accent3":"#8AE69F",
 "accent4":"#8AE6E4",
 "accent5":"#8AA2E6",
 "accent6":"#B68AE6",
 "accent7":"#E68AD0"
}
```

### `MB_APPLICATION_FAVICON_URL`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `app/assets/img/favicon.ico`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `application-favicon-url`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `application-favicon-url`

Upload a file to use as the favicon.

### `MB_APPLICATION_FONT`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `Lato`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `application-font`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `application-font`

Replace “Lato” as the font family.

### `MB_APPLICATION_FONT_FILES`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: json
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `application-font-files`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `application-font-files`

Tell us where to find the file for each font weight. You don’t need to include all of them, but it’ll look better if you do.

Example value:

```
[
  {
    "src": "https://example.com/resources/font-400",
    "fontFormat": "ttf",
    "fontWeight": 400
  },
  {
    "src": "https://example.com/resources/font-700",
    "fontFormat": "woff",
    "fontWeight": 700
  }
]
```

See [fonts](https://www.metabase.com/docs/latest/configuring-metabase/fonts.md).

### `MB_APPLICATION_LOGO_URL`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `app/assets/img/logo.svg`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `application-logo-url`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `application-logo-url`

Upload a file to replace the Metabase logo on the top bar.

Inline styling and inline scripts are not supported.

### `MB_APPLICATION_NAME`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `Metabase`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `application-name`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `application-name`

Replace the word “Metabase” wherever it appears.

### `MB_ATTACHMENT_ROW_LIMIT`

- Type: positive-integer
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `attachment-row-limit`.

Row limit in file attachments excluding the header.

### `MB_ATTACHMENT_TABLE_ROW_LIMIT`

- Type: positive-integer
- Default: `20`

Maximum number of rows to render in an alert or subscription image.

Range: 1-100. To limit the total number of rows included in the file attachment
        for an email dashboard subscription, use MB_ATTACHMENT_ROW_LIMIT.

### `MB_AUDIT_MAX_RETENTION_DAYS`

- Type: string
- Default: `null`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Number of days to retain data in audit-related tables. Minimum value is 30; set to 0 to retain data indefinitely.

Sets the maximum number of days Metabase preserves rows for the following application database tables:

- `query_execution`
- `audit_log`
- `view_log`

Twice a day, Metabase will delete rows older than this threshold. The minimum value is 30 days (Metabase will treat entered values of 1 to 29 the same as 30).
If set to 0, Metabase will keep all rows.

### `MB_BCC_ENABLED`

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `bcc-enabled`

Whether or not bcc emails are enabled, default behavior is that it is.

### `MB_BREAKOUT_BIN_WIDTH`

- Type: double
- Default: `10.0`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `breakout-bin-width`

When using the default binning strategy for a field of type Coordinate (such as Latitude and Longitude), this number will be used as the default bin width (in degrees).

### `MB_BREAKOUT_BINS_NUM`

- Type: integer
- Default: `8`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `breakout-bins-num`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `breakout-bins-num`

When using the default binning strategy and a number of bins is not provided, this number will be used as the default.

### `MB_CHECK_FOR_UPDATES`

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `check-for-updates`

Identify when new versions of Metabase are available.

### `MB_CONFIG_FROM_FILE_SYNC_DATABASES`

- Type: boolean
- Default: `true`

Whether to (asynchronously) sync newly created Databases during config-from-file initialization. By default, true,
  but you can disable this behavior if you want to sync it manually or use SerDes to populate its data model.

### `MB_CSP_IMG_ALLOWED_HOSTS`

- Type: string
- Default: ``
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `csp-img-allowed-hosts`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `csp-img-allowed-hosts`

Comma-separated list of hosts that images may load from (e.g. in dashboard text, entity descriptions, and custom visualizations) when `csp-img-enabled` is on. Empty by default, which restricts images to this Metabase instance and the map tile server used by map visualizations.

### `MB_CSP_IMG_ENABLED`

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `csp-img-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `csp-img-enabled`

Restrict the browser Content Security Policy so images can only load from this Metabase instance or the hosts listed in `csp-img-allowed-hosts`. Must be on to enable Custom Visualizations.

### `MB_CSV_FIELD_SEPARATOR`

- Type: string
- Default: `,`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `csv-field-separator`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `csv-field-separator`

Character to use as field separator in CSV exports. Defaults to comma (,). Common alternatives include semicolon (;) for European locales and tab (\t).

### `MB_CUSTOM_FORMATTING`

- Type: json
- Default: `{}`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `custom-formatting`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `custom-formatting`

Object keyed by type, containing formatting settings.

### `MB_CUSTOM_GEOJSON`

- Type: json
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `custom-geojson`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `custom-geojson`

JSON containing information about custom GeoJSON files for use in map visualizations instead of the default US State or World GeoJSON.

### `MB_CUSTOM_GEOJSON_ENABLED`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `custom-geojson-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `custom-geojson-enabled`

Whether or not the use of custom GeoJSON is enabled.

### `MB_CUSTOM_HOMEPAGE`

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `custom-homepage`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `custom-homepage`

Pick one of your dashboards to serve as homepage. Users without dashboard access will be directed to the default homepage.

### `MB_CUSTOM_HOMEPAGE_DASHBOARD`

- Type: integer
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `custom-homepage-dashboard`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `custom-homepage-dashboard`

ID of dashboard to use as a homepage.

### `MB_CUSTOM_VIZ_ENABLED`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `custom-viz-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `custom-viz-enabled`

Should custom visualizations be enabled for this instance?

### `MB_DASHBOARDS_SAVE_LAST_USED_PARAMETERS`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `dashboards-save-last-used-parameters`.

Whether dashboards should default to a user's last used parameters on load.

### `MB_DATA_SENSITIVITY_SCAN_ENABLED`

- Type: boolean
- Default: `false`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

When true, the analyze phase of sync labels every unlabeled field with a data_sensitivity category inferred from
  its name, types, and fingerprint, writing PUBLIC when nothing matches. Metadata only: the label does not mask or
  restrict anything. Labels set by a user are never overwritten.

Scans run with the scheduled analyze pass and with Sync database schema now on a database's admin
  page. Fields that already carry a label, including PUBLIC, are not rescanned.

### `MB_DB_CONNECTION_TIMEOUT_MS`

- Type: integer
- Default: `10000`

Consider metabase.driver/can-connect? / can-connect-with-details? to have failed if they were not able to
  successfully connect after this many milliseconds. By default, this is 10 seconds.

Timeout in milliseconds for connecting to databases, both Metabase application database and data connections.
  In case you're connecting via an SSH tunnel and run into a timeout, you might consider increasing this value as the
  connections via tunnels have more overhead than connections without.

### `MB_DB_QUERY_TIMEOUT_MINUTES`

- Type: integer
- Default: `20`

By default, this is 20 minutes.

Timeout in minutes for the database's query execution, both for the Metabase application database and any data connections.
  If you have long-running queries, you might consider increasing this value. Adjusting the timeout does not impact Metabase’s frontend.

  This setting does not apply to queries executed within transforms; those are governed by MB_TRANSFORM_TIMEOUT instead.

  Please be aware that other services (like Nginx) may still drop long-running queries.

### `MB_DEFAULT_MAPS_ENABLED`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `default-maps-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `default-maps-enabled`

Whether or not the default GeoJSON maps are enabled.

### `MB_DISABLE_AUTO_SYNC`

- Type: boolean
- Default: `false`

When true, suppresses automatically-triggered syncs: the scheduled sync-and-analyze and update-field-values jobs do not run (and new triggers are not registered), and adding a new database does not kick off an initial sync. Syncs originating from an explicit request — the Sync-now REST endpoints, or a transform finalizing its output table — are unaffected. For deployments that load database metadata from disk at startup and should not have Metabase re-discover it.

### `MB_DISABLE_CORS_ON_LOCALHOST`

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `disable-cors-on-localhost`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `disable-cors-on-localhost`

Prevents the server from sending CORS headers for requests originating from localhost.

### `MB_DOWNLOAD_ROW_LIMIT`

- Type: positive-integer
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `download-row-limit`.

Row limit in file exports excluding the header. Enforces 1048575 excluding header as minimum. xlsx downloads are inherently limited to 1048575 rows even if this limit is higher.

### `MB_EMAIL_FROM_ADDRESS`

- Type: string
- Default: `notifications@metabase.com`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-from-address`

The email address you want to use for the sender of emails.

### `MB_EMAIL_FROM_ADDRESS_OVERRIDE`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `notifications@metabase.com`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-from-address-override`

The email address you want to use for the sender of emails from your custom SMTP server.

### `MB_EMAIL_FROM_NAME`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-from-name`

The name you want to use for the sender of emails.

### `MB_EMAIL_MAX_RECIPIENTS_PER_MESSAGE`

- Type: integer
- Default: `50`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `email-max-recipients-per-message`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-max-recipients-per-message`

The maximum number of recipients allowed on a single email. Notifications with more recipients than
                this are split into multiple messages. This guards against SMTP providers (e.g. Amazon SES) that reject
                any message exceeding their per-message recipient cap. Defaults to 50; set to 0 to disable batching.

### `MB_EMAIL_MAX_RECIPIENTS_PER_SECOND`

- Type: integer
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `email-max-recipients-per-second`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-max-recipients-per-second`

The maximum number of recipients, summed across emails, that can be sent per second.
                Note that the final email sent before reaching the limit is able to exceed it, if it has multiple recipients.

### `MB_EMAIL_REPLY_TO`

- Type: json
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-reply-to`

The email address you want the replies to go to, if different from the from address.

### `MB_EMAIL_SMTP_HOST`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-host`

The address of the SMTP server that handles your emails.

### `MB_EMAIL_SMTP_HOST_OVERRIDE`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-host-override`

The address of the custom SMTP server that handles your emails.

### `MB_EMAIL_SMTP_PASSWORD`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-password`

SMTP password.

### `MB_EMAIL_SMTP_PASSWORD_OVERRIDE`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-password-override`

Custom SMTP server password.

### `MB_EMAIL_SMTP_PORT`

- Type: integer
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-port`

The port your SMTP server uses for outgoing emails.

### `MB_EMAIL_SMTP_PORT_OVERRIDE`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: integer
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-port-override`

The port your custom SMTP server uses for outgoing emails. Only ports 465, 587, and 2525 are supported.

### `MB_EMAIL_SMTP_SECURITY`

- Type: keyword
- Default: `none`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-security`

SMTP secure connection protocol. (tls, ssl, starttls, or none).

### `MB_EMAIL_SMTP_SECURITY_OVERRIDE`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: keyword
- Default: `ssl`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-security-override`

SMTP secure connection protocol for your custom server. (tls, ssl, or starttls).

### `MB_EMAIL_SMTP_USERNAME`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-username`

SMTP username.

### `MB_EMAIL_SMTP_USERNAME_OVERRIDE`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `email-smtp-username-override`

Custom SMTP server username.

### `MB_EMBEDDED_METABOT_ENABLED`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `embedded-metabot-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `embedded-metabot-enabled`

Whether Metabot is enabled for embedding.

### `MB_EMBEDDING_APP_ORIGIN [DEPRECATED]`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

> DEPRECATED: 0.51.0

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `embedding-app-origin`

Allow this origin to embed the full Metabase application.

Use `MB_EMBEDDING_APP_ORIGINS_INTERACTIVE` for the origins that can embed the full Metabase app, and `MB_EMBEDDING_APP_ORIGINS_SDK` for the origins that can use modular embedding and the modular embedding React SDK. If only `MB_EMBEDDING_APP_ORIGIN` is set, Metabase copies its value at every startup to the `embedding-app-origins-interactive` and `embedding-app-origins-sdk` settings, if your plan includes that kind of embedding. If you set `MB_EMBEDDING_APP_ORIGIN` together with either of these variables, Metabase stops at startup with an error.

### `MB_EMBEDDING_APP_ORIGINS_INTERACTIVE`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `embedding-app-origins-interactive`

Allow these space delimited origins to embed Metabase interactive.

### `MB_EMBEDDING_APP_ORIGINS_SDK`

- Type: string
- Default: ``
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `embedding-app-origins-sdk`

Allow Metabase SDK access to these space delimited origins.

### `MB_EMBEDDING_HOMEPAGE`

- Type: keyword
- Default: `hidden`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `embedding-homepage`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `embedding-homepage`

Embedding homepage status, indicating if it's visible, hidden or has been dismissed.

### `MB_EMBEDDING_SECRET_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `embedding-secret-key`

Secret key used to sign JSON Web Tokens for requests to `/api/embed` endpoints.

### `MB_ENABLE_EMBEDDING [DEPRECATED]`

> DEPRECATED: 0.51.0

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `enable-embedding`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-embedding`

Allow admins to securely embed questions and dashboards within other applications?

Use these variables instead: `MB_ENABLE_EMBEDDING_MODULAR` for modular embedding, guest embeds, and static embeds, `MB_ENABLE_EMBEDDING_SDK` for the modular embedding React SDK, and `MB_ENABLE_EMBEDDING_INTERACTIVE` for full-app embedding. If only `MB_ENABLE_EMBEDDING` is set, Metabase copies its value at every startup to the `enable-embedding-sdk`, `enable-embedding-interactive`, and `enable-embedding-static` settings. If the value is `true`, this also turns on modular embedding, guest embeds, and static embeds, unless you turn modular embedding off in the admin settings. If you set `MB_ENABLE_EMBEDDING` together with any of these variables, Metabase stops at startup with an error.

### `MB_ENABLE_EMBEDDING_INTERACTIVE`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-embedding-interactive`

Allow admins to embed Metabase via interactive embedding?

### `MB_ENABLE_EMBEDDING_MODULAR`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-embedding-modular`

Allow admins to embed Metabase via modular embedding and guest embeds?

### `MB_ENABLE_EMBEDDING_SDK`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-embedding-sdk`

Allow admins to embed Metabase via the SDK?

### `MB_ENABLE_EMBEDDING_SIDECAR`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-embedding-sidecar`

Do admins link to Metabase from their own app? Only reported for analytics.

### `MB_ENABLE_EMBEDDING_SIMPLE [DEPRECATED]`

> DEPRECATED: 0.65.0

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-embedding-simple`

Allow admins to embed Metabase via modular embedding?

Use `MB_ENABLE_EMBEDDING_MODULAR` instead, which controls modular embedding, guest embeds, and static embeds. Unless you turn modular embedding on or off in the admin settings, Metabase still reads this variable, and `true` turns on all three. If you set this variable together with `MB_ENABLE_EMBEDDING_MODULAR`, Metabase stops at startup with an error.

### `MB_ENABLE_EMBEDDING_STATIC [DEPRECATED]`

> DEPRECATED: 0.65.0

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-embedding-static`

Allow admins to embed Metabase via static embedding?

Use `MB_ENABLE_EMBEDDING_MODULAR` instead, which controls modular embedding, guest embeds, and static embeds. Unless you turn modular embedding on or off in the admin settings, Metabase still reads this variable, and `true` turns on all three. If you set this variable together with `MB_ENABLE_EMBEDDING_MODULAR`, Metabase stops at startup with an error.

### `MB_ENABLE_PASSWORD_LOGIN`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-password-login`

Allow logging in by email and password.

### `MB_ENABLE_PIVOTED_EXPORTS`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `enable-pivoted-exports`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-pivoted-exports`

Enable pivoted exports and pivoted subscriptions.

### `MB_ENABLE_PUBLIC_SHARING`

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-public-sharing`

Enable admins to create publicly viewable links (and embeddable iframes) for Questions and Dashboards?

### `MB_ENABLE_XRAYS`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `enable-xrays`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `enable-xrays`

Allow users to explore data using X-rays.

### `MB_EXPLORATIONS_WORKER_COUNT`

- Type: integer
- Default: `2`

How many exploration queries a single Metabase node runs at once.

### `MB_FINGERPRINT_MAX_FIELDS_PER_TABLE`

- Type: integer
- Default: `10000`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `fingerprint-max-fields-per-table`.

Maximum number of fields per table to fingerprint. If a table has more eligible fields than this, the rest are
  skipped during fingerprinting analysis -- loading that many fields into memory at once can exhaust the heap (this has
  OOM'd instances syncing document databases like MongoDB with very large or dynamic schemas).

### `MB_FOLLOW_UP_EMAIL_SENT`

- Type: boolean
- Default: `false`

Have we sent a follow up email to the instance admin?

### `MB_GEOJSON_ALLOWED_NETWORKS`

- Type: keyword
- Default: `null`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Controls which networks Metabase may connect to for custom map GeoJSON files.
Options:
- external-only (only globally reachable public addresses)
- allow-private (external + private networks but NOT loopback or link-local)
- allow-all (no restrictions).
Defaults to external-only on Metabase Cloud and allow-private when self-hosted.

Set this when custom maps must load GeoJSON from a server on this machine (allow-all), or to restrict them to public hosts (external-only). Defaults to external-only on Metabase Cloud and allow-private when self-hosted. Metabase refuses to start if this is set to anything but one of the three policies.

### `MB_GOOGLE_AUTH_AUTO_CREATE_ACCOUNTS_DOMAIN`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `google-auth-auto-create-accounts-domain`

When set, allow users to sign up on their own if their Google account email address is from this domain.

### `MB_GOOGLE_AUTH_CLIENT_ID`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `google-auth-client-id`

Client ID for Google Sign-In.

### `MB_GOOGLE_AUTH_ENABLED`

- Type: boolean
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `google-auth-enabled`

Is Google Sign-in currently enabled?

### `MB_GSHEETS`

- Type: json
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `gsheets`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `gsheets`

Information about Google Sheets Integration.

### `MB_HEALTH_CHECK_LOGGING_ENABLED`

- Type: boolean
- Default: `true`

Whether to log health check requests from session middleware.

### `MB_HELP_LINK`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: keyword
- Default: `metabase`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `help-link`

Keyword setting to control whitelabeling of the help link. Valid values are `:metabase`, `:hidden`, and `:custom`. If `:custom` is set, the help link will use the URL specified in the `help-link-custom-destination`, or be hidden if it is not set.

### `MB_HELP_LINK_CUSTOM_DESTINATION`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `https://www.metabase.com/help/premium`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `help-link-custom-destination`

Custom URL for the help link.

### `MB_HIDE_STACKTRACES`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `hide-stacktraces`

Prevent the exception middleware from including stacktraces in responses.

### `MB_HTTP_CHANNEL_ALLOWED_NETWORKS`

- Type: keyword
- Default: `external-only`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Controls which types of hosts are allowed as HTTP channel destinations.
Options:
- external-only (default - only external hosts)
- allow-private (external + private networks but NOT localhost)
- allow-all (no restrictions including localhost).
.

Set this when a notification webhook must reach a host on your private network (`allow-private`) or on this machine (`allow-all`). Default is `external-only`. Before Metabase 64, this variable was called `MB_HTTP_CHANNEL_HOST_STRATEGY`. Metabase still reads the old name and logs a warning at startup, so rename it to `MB_HTTP_CHANNEL_ALLOWED_NETWORKS`.

### `MB_HUMANIZATION_STRATEGY`

- Type: keyword
- Default: `simple`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `humanization-strategy`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `humanization-strategy`

To make table and field names more human-friendly, Metabase will replace dashes and underscores in them with spaces. We’ll capitalize each word while at it, so ‘last_visited_at’ will become ‘Last Visited At’.

### `MB_INDEX_UPDATE_THREAD_COUNT`

- Type: integer
- Default: `2`

Number of threads to use for batched index updates, including embedding requests.

Number of threads to use for batched index updates, including embedding requests

### `MB_INSTALL_ANALYTICS_DATABASE`

- Type: boolean
- Default: `true`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Whether or not we should install the Metabase analytics database on startup. Defaults to true, but can be disabled
  via environmment variable.

Setting this environment variable to false will prevent installing the analytics database, which is handy in a migration use-case where it conflicts with the incoming database.

### `MB_INTERESTINGNESS_MAX_FIELDS_PER_SYNC`

- Type: integer
- Default: `100000`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `interestingness-max-fields-per-sync`.

Maximum number of fields per database to score for dimension interestingness in one sync. The leftovers pass
  scores every field whose score is still NULL, which after a release that invalidates existing scores is every field
  in the database; this bounds how long one sync spends on that backfill, leaving the rest for the next sync. Unlike
  `scan-max-fields-per-table` and `fingerprint-max-fields-per-table` the skipped fields are not abandoned -- they stay
  NULL and so are picked up by the following sync, which is why this can be set far higher than those two.

### `MB_JDBC_DATA_WAREHOUSE_CONNECTION_POOL_CHECKOUT_TIMEOUT_MS`

- Type: integer
- Default: `0`

Number of milliseconds a query will wait for a free data-warehouse connection once the c3p0 pool has hit
  jdbc-data-warehouse-max-connection-pool-size before giving up. Maps to c3p0's `checkoutTimeout`. `0` waits
  indefinitely (the old, unbounded behavior); a positive value fails fast, which the query processor surfaces to the
  frontend as an HTTP 503 (Service Unavailable) rather than letting the request queue grow without limit.

When every data-warehouse connection is in use, additional queries wait for one to free up. This is the
  maximum time (in milliseconds) a query will wait before failing with a "service unavailable" (HTTP 503) error
  instead of queueing indefinitely. Raise it if you routinely run more concurrent queries than
  MB_JDBC_DATA_WAREHOUSE_MAX_CONNECTION_POOL_SIZE and would rather have them wait; set it to `0` to wait forever.

### `MB_JDBC_DATA_WAREHOUSE_CONNECTION_POOL_MAX_PENDING_CHECKOUTS`

- Type: integer
- Default: `0`

Maximum number of queries allowed to be waiting for a free data-warehouse connection at once, once the c3p0 pool has
  hit jdbc-data-warehouse-max-connection-pool-size. When this many queries are already queued waiting for a
  connection, further queries fail fast instead of joining the queue, which the query processor surfaces to the
  frontend as an HTTP 503 (Service Unavailable). `0` (the default) lets the queue grow without bound (the old
  behavior). Complements jdbc-data-warehouse-connection-pool-checkout-timeout-ms, which bounds how long each query
  waits; this bounds how many can wait at the same time.

When every data-warehouse connection is in use, additional queries wait for one to free up. This is the
  maximum number of queries that may be waiting at the same time before further queries fail immediately with a
  "service unavailable" (HTTP 503) error instead of joining the queue. Raise it to tolerate deeper bursts; set it to
  `0` to allow an unbounded queue.

### `MB_JDBC_DATA_WAREHOUSE_MAX_CONNECTION_POOL_SIZE`

- Type: integer
- Default: `15`

Maximum size of the c3p0 connection pool.

Change this to a higher value if you notice that regular usage consumes all or close to all connections.

  When all connections are in use then Metabase will be slower to return results for queries, since it would have to
  wait for an available connection before processing the next query in the queue.

  For setting the maximum,
  see [MB_APPLICATION_DB_MAX_CONNECTION_POOL_SIZE](#mb_application_db_max_connection_pool_size).

### `MB_JDBC_NETWORK_TIMEOUT_MS`

- Type: integer
- Default: `1800000`

By default, this is 30 minutes.

Timeout in milliseconds to wait for database operations to complete. This is used to free up threads that
        are stuck waiting for a database response in a socket read. See the documentation for more details:
        https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#setNetworkTimeout-java.util.concurrent.Executor-int-

### `MB_JWT_ATTRIBUTE_EMAIL`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `email`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-attribute-email`

Key to retrieve the JWT user's email address.

### `MB_JWT_ATTRIBUTE_FIRSTNAME`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `first_name`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-attribute-firstname`

Key to retrieve the JWT user's first name.

### `MB_JWT_ATTRIBUTE_GROUPS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `groups`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-attribute-groups`

Key to retrieve the JWT user's groups.

### `MB_JWT_ATTRIBUTE_LASTNAME`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `last_name`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-attribute-lastname`

Key to retrieve the JWT user's last name.

### `MB_JWT_ATTRIBUTE_TENANT`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `@tenant`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-attribute-tenant`

Key to retrieve the JWT user's tenant.

### `MB_JWT_ATTRIBUTE_TENANT_ATTRIBUTES`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `@tenant.attributes`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-attribute-tenant-attributes`

Key to retrieve the JWT user's tenant attributes.

### `MB_JWT_ENABLED`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-enabled`

Is JWT authentication enabled?

When set to true, will enable JWT authentication with the options configured in the MB_JWT_* variables.
        This is for JWT SSO authentication, and has nothing to do with Static embedding, which is MB_EMBEDDING_SECRET_KEY.

### `MB_JWT_GROUP_MAPPINGS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: json
- Default: `{}`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-group-mappings`

JSON containing JWT to Metabase group mappings.

JSON object containing JWT to Metabase group mappings, where keys are JWT groups and values are lists of Metabase groups IDs.

### `MB_JWT_GROUP_SYNC`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-group-sync`

Enable group membership synchronization with JWT.

### `MB_JWT_IDENTITY_PROVIDER_URI`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-identity-provider-uri`

URL for JWT-based login page.

### `MB_JWT_SHARED_SECRET`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-shared-secret`

String used to seed the private key used to validate JWT messages. A hexadecimal-encoded 256-bit key (i.e., a 64-character string) is strongly recommended.

### `MB_JWT_USER_PROVISIONING_ENABLED`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `jwt-user-provisioning-enabled`

Determines what happens when a user logs in via JWT and doesn't have a Metabase account.

When set to `true`, users who log in via JWT will automatically get a Metabase account if they don't have one, or get their existing account reactivated. When set to `false`, only users with active Metabase accounts can log in via JWT.

### `MB_LANDING_PAGE`

- Type: string
- Default: ``
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `landing-page`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `landing-page`

Enter a relative URL like /dashboard/1 or /collection/2.

### `MB_LANDING_PAGE_ILLUSTRATION`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `default`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `landing-page-illustration`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `landing-page-illustration`

Options for displaying the illustration on the landing page.

### `MB_LANDING_PAGE_ILLUSTRATION_CUSTOM`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `landing-page-illustration-custom`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `landing-page-illustration-custom`

The custom illustration for the landing page.

### `MB_LDAP_ATTRIBUTE_EMAIL`

- Type: string
- Default: `mail`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-attribute-email`

Attribute to use for the user's email. (usually 'mail', 'email' or 'userPrincipalName').

### `MB_LDAP_ATTRIBUTE_FIRSTNAME`

- Type: string
- Default: `givenname`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-attribute-firstname`

Attribute to use for the user's first name. (usually 'givenName').

### `MB_LDAP_ATTRIBUTE_LASTNAME`

- Type: string
- Default: `sn`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-attribute-lastname`

Attribute to use for the user's last name. (usually 'sn').

### `MB_LDAP_BIND_DN`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-bind-dn`

The Distinguished Name to bind as (if any), this user will be used to lookup information about other users.

### `MB_LDAP_ENABLED`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-enabled`

Is LDAP currently enabled?

### `MB_LDAP_GROUP_BASE`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-group-base`

Search base for groups. Not required for LDAP directories that provide a 'memberOf' overlay, such as Active Directory. (Will be searched recursively).

### `MB_LDAP_GROUP_MAPPINGS`

- Type: json
- Default: `{}`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-group-mappings`

JSON containing LDAP to Metabase group mappings.

### `MB_LDAP_GROUP_MEMBERSHIP_FILTER`

- Type: string
- Default: `(member={dn})`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-group-membership-filter`

Group membership lookup filter. The placeholders {dn} and {uid} will be replaced by the user's Distinguished Name and UID, respectively.

### `MB_LDAP_GROUP_SYNC`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-group-sync`

Enable group membership synchronization with LDAP.

### `MB_LDAP_HOST`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-host`

Server hostname.

### `MB_LDAP_PASSWORD`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-password`

The password to bind with for the lookup user.

### `MB_LDAP_PORT`

- Type: integer
- Default: `389`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-port`

Server port, usually 389 or 636 if SSL is used.

### `MB_LDAP_SECURITY`

- Type: keyword
- Default: `none`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-security`

Use SSL, TLS or plain text.

### `MB_LDAP_SYNC_USER_ATTRIBUTES`

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-sync-user-attributes`

Should we sync user attributes when someone logs in via LDAP?

### `MB_LDAP_SYNC_USER_ATTRIBUTES_ALLOWLIST`

- Type: csv
- Default: ``
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-sync-user-attributes-allowlist`

Comma-separated list of user attributes to sync for LDAP users. Only these attributes are synced; leave blank to sync none.

### `MB_LDAP_SYNC_USER_ATTRIBUTES_BLACKLIST`

- Type: csv
- Default: `userPassword,dn,distinguishedName`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-sync-user-attributes-blacklist`

Comma-separated list of user attributes to skip syncing for LDAP users.

### `MB_LDAP_TIMEOUT_SECONDS`

- Type: double
- Default: `15.0`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-timeout-seconds`

Maximum time, in seconds, to wait for LDAP server before falling back to local authentication.

### `MB_LDAP_TRUST_STORE`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-trust-store`

Path to a JKS trust store of CA certificates used to validate the LDAP server's TLS certificate. Leave blank to use the JVM default trust store.

### `MB_LDAP_USER_BASE`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-user-base`

Search base for users. (Will be searched recursively).

### `MB_LDAP_USER_FILTER`

- Type: string
- Default: `(&(objectClass=inetOrgPerson)(|(uid={login})(mail={login})))`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-user-filter`

User lookup filter. The placeholder '{login}' will be replaced by the user supplied login.

### `MB_LDAP_USER_PROVISIONING_ENABLED`

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ldap-user-provisioning-enabled`

Determines what happens when a user logs in via LDAP and doesn't have a Metabase account.

When set to `true`, users who log in via LDAP will automatically get a Metabase account if they don't have one, or get their existing account reactivated. When set to `false`, only users with active Metabase accounts can log in via LDAP.

### `MB_LICENSE_TOKEN_MISSING_BANNER_DISMISSAL_TIMESTAMP`

- Type: csv
- Default: `[]`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `license-token-missing-banner-dismissal-timestamp`

The array of last two ISO8601 dates when an admin dismissed the license token missing banner.

### `MB_LLM_ALLOWED_NETWORKS`

- Type: keyword
- Default: `external-only`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Controls which networks Metabase may connect to for LLM provider base URLs. Set through the environment only; on Metabase Cloud the default applies.
Options:
- external-only (default; only globally reachable public addresses)
- allow-private (external + private networks but NOT loopback or link-local)
- allow-all (no restrictions).
The Metabase AI service and LLM proxy are deployment configuration and may always use private addresses.

Set this when a self-hosted vLLM server is on your private network (allow-private) or on this machine (allow-all). There is no admin UI for it, and a value stored in the application database is ignored. With a JVM-wide HTTP(S) proxy, Metabase checks destination addresses available through local DNS; the deployment proxy must enforce destination restrictions on its outbound connections. Proxy-only DNS is supported. Metabase enforces destination addresses at connection time for direct requests.

### `MB_LLM_ANTHROPIC_API_BASE_URL`

- Type: string
- Default: `https://api.anthropic.com`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-anthropic-api-base-url`

The Anthropic API base URL.

Backed by the anthropic connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_ANTHROPIC_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-anthropic-api-key`

The Anthropic API Key.

Backed by the anthropic connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_AZURE_API_BASE_URL`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-azure-api-base-url`

The base URL of the Azure resource's OpenAI- or Anthropic-compatible surface, e.g. `https://<resource>.services.ai.azure.com/openai`.

Backed by the azure connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_AZURE_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-azure-api-key`

The API key for the Azure resource hosting your models.

Backed by the azure connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_AZURE_DEPLOYMENT_NAME`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-azure-deployment-name`

The name of the model deployment served by the Azure connection configured from the environment.

Backed by the azure connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_AZURE_MODEL_FAMILY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-azure-model-family`

Whether the Azure deployment configured from the environment serves an `openai` or an `anthropic` model. Defaults to `openai`.

Backed by the azure connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_BEDROCK_ACCESS_KEY_ID`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-bedrock-access-key-id`

The AWS Access Key ID for Amazon Bedrock. On a self-hosted Metabase, leave unset together with the secret access key to authenticate with the AWS default credentials chain (IRSA, EKS Pod Identity, or instance profile); on Metabase Cloud both keys are required.

Backed by the bedrock connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_BEDROCK_REGION`

- Type: string
- Default: `us-east-1`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-bedrock-region`

The AWS region for Amazon Bedrock (e.g. us-east-1).

Backed by the bedrock connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection. On a self-hosted Metabase, setting only the region enables Bedrock with the AWS default credentials chain, with no access keys configured. [The Bedrock models you can pick depend on the region](https://www.metabase.com/docs/latest/ai/providers.md#the-bedrock-models-you-can-pick-depend-on-the-region).

### `MB_LLM_BEDROCK_SECRET_ACCESS_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-bedrock-secret-access-key`

The AWS Secret Access Key for Amazon Bedrock. On a self-hosted Metabase, leave unset together with the access key ID to authenticate with the AWS default credentials chain (IRSA, EKS Pod Identity, or instance profile); on Metabase Cloud both keys are required.

Backed by the bedrock connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_BEDROCK_SESSION_TOKEN`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-bedrock-session-token`

The AWS Session Token for Amazon Bedrock. Only needed for temporary credentials.

Backed by the bedrock connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_CONNECTION_TIMEOUT_MS`

- Type: integer
- Default: `10000`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-connection-timeout-ms`

TCP connection timeout in milliseconds for LLM API requests. A provider that is down or unreachable should fail fast instead of holding a worker thread forever.

### `MB_LLM_DEEPSEEK_API_BASE_URL`

- Type: string
- Default: `https://api.deepseek.com`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-deepseek-api-base-url`

The DeepSeek API base URL. Both the Anthropic-compatible Messages surface (`/anthropic/v1/messages`) and the model catalog (`/models`) are served off this root, so do not include `/anthropic` or `/v1`.

Backed by the deepseek connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_DEEPSEEK_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-deepseek-api-key`

The DeepSeek API Key.

Backed by the deepseek connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_FAST_MODE`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-fast-mode`

Run Metabot in the provider's fast mode when the selected model supports it. Fast mode responds faster at a higher price per token; on Anthropic it requires an account enrolled in the fast-mode research preview and is not available with a Priority Tier commitment.

### `MB_LLM_GOOGLE_API_BASE_URL`

- Type: string
- Default: `https://aiplatform.googleapis.com`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-google-api-base-url`

The Gemini Enterprise Agent Platform API base URL. Leave unset to derive it from the location.

Backed by the google connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_GOOGLE_LOCATION`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-google-location`

The Google Cloud location for the Gemini Enterprise Agent Platform (e.g. us-central1). Defaults to global.

Backed by the google connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_GOOGLE_OAUTH_ACCESS_TOKEN`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-google-oauth-access-token`

A short-lived OAuth2 access token for the Gemini Enterprise Agent Platform (e.g. from `gcloud auth print-access-token`). Useful for testing.

Backed by the google connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_GOOGLE_PROJECT_ID`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-google-project-id`

The Google Cloud project ID for the Gemini Enterprise Agent Platform.

Backed by the google connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_GOOGLE_SERVICE_ACCOUNT_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-google-service-account-key`

A Google Cloud service account key JSON for the Gemini Enterprise Agent Platform. Takes precedence over the OAuth access token when both are set.

Backed by the google connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_METABOT_PROVIDER`

- Type: string
- Default: `anthropic/claude-sonnet-4-6`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-metabot-provider`

The AI provider connection and model for Metabot. Format: connection-key/model-name, e.g. `anthropic/claude-haiku-4-5`, `openai/gpt-5.4`, `openrouter/anthropic/claude-haiku-4.5`. The connection key names an entry in the `llm-providers` setting and defaults to the provider type.

### `MB_LLM_MINI_MODEL`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-mini-model`

The AI provider connection and model used for quick background tasks, such as naming Metabot conversations, in the same connection-key/model-name format as `llm-metabot-provider`. Defaults to the fastest model offered by the connection Metabot runs on.

### `MB_LLM_MISTRAL_API_BASE_URL`

- Type: string
- Default: `https://api.mistral.ai/v1`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-mistral-api-base-url`

The Mistral API base URL used for Chat Completions.

Backed by the mistral connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_MISTRAL_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-mistral-api-key`

The Mistral API Key.

Backed by the mistral connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_MOONSHOT_API_BASE_URL`

- Type: string
- Default: `https://api.moonshot.ai/v1`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-moonshot-api-base-url`

The Moonshot AI API base URL used for Chat Completions. Repoint this to use the `.cn` platform; keys are not interchangeable between the two.

Backed by the moonshot connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_MOONSHOT_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-moonshot-api-key`

The Moonshot AI API Key.

Backed by the moonshot connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_OLLAMA_API_BASE_URL`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-ollama-api-base-url`

The base URL of your Ollama server's OpenAI-compatible API, e.g. `http://localhost:11434/v1`, or `https://ollama.com/v1` for Ollama Cloud.

Backed by the ollama connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list. A value set by this environment variable shadows that connection's base URL.

### `MB_LLM_OLLAMA_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-ollama-api-key`

The API key for Ollama Cloud, with MB_LLM_OLLAMA_API_BASE_URL set to https://ollama.com/v1. For self-hosted servers, only needed behind an authenticated proxy.

Backed by the ollama connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_OLLAMA_REQUEST_TIMEOUT_MS`

- Type: integer
- Default: `300000`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-ollama-request-timeout-ms`

Socket timeout in milliseconds for requests to your Ollama server.

### `MB_LLM_OPENAI_API_BASE_URL`

- Type: string
- Default: `https://api.openai.com`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-openai-api-base-url`

The OpenAI API base URL.

Backed by the openai connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_OPENAI_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-openai-api-key`

The OpenAI API Key.

Backed by the openai connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_OPENAI_MODEL`

- Type: string
- Default: `gpt-5.4`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-openai-model`

The OpenAI Model (e.g. 'gpt-5.5', 'gpt-5.4-mini').

### `MB_LLM_OPENROUTER_API_BASE_URL`

- Type: string
- Default: `https://openrouter.ai/api`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-openrouter-api-base-url`

The OpenRouter API base URL used for Chat Completions.

Backed by the openrouter connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_OPENROUTER_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-openrouter-api-key`

The OpenRouter API Key.

Backed by the openrouter connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_PROVIDERS`

- Type: json
- Default: `[]`

JSON array of configured LLM provider connections. Each entry has a `key` (a URL-safe slug identifying the connection), a `type` (the provider type, e.g. `anthropic`), a display `name`, and a `config` map of that provider type's credential fields.

Connections are normally managed from the admin AI settings page. Setting this environment variable puts the whole list under environment control and makes it read-only in the UI.

Configuring a provider through the single-provider variables (`MB_LLM_ANTHROPIC_API_KEY` and friends) is equally supported, and is the simpler option when you only need one connection per provider and would rather not hand-write JSON. Each such provider becomes a read-only connection whose key is the provider type, resolved from the environment on every read, so editing one of those variables is picked up on the next restart. A provider configured this way takes precedence over a stored connection with the same key.

### `MB_LLM_REQUEST_TIMEOUT_MS`

- Type: integer
- Default: `120000`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-request-timeout-ms`

Socket (inter-byte read) timeout in milliseconds for LLM API requests. For streaming responses this bounds the gap between successive chunks, NOT the total response time. Picked generously: extended thinking can pause for tens of seconds between chunks. Without it, a hung read inside the stream blocks the worker indefinitely — observed in production when an upstream proxy held the connection open without sending data.

### `MB_LLM_VLLM_API_BASE_URL`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-vllm-api-base-url`

The base URL of your vLLM server's OpenAI-compatible API, e.g. `http://vllm.internal:8000/v1`.

Backed by the vllm connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_VLLM_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-vllm-api-key`

The API key for your vLLM server. Only needed when the server was started with `--api-key`.

Backed by the vllm connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_VLLM_REQUEST_TIMEOUT_MS`

- Type: integer
- Default: `300000`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-vllm-request-timeout-ms`

Socket timeout in milliseconds for requests to your vLLM server.

### `MB_LLM_XAI_API_BASE_URL`

- Type: string
- Default: `https://api.x.ai/v1`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-xai-api-base-url`

The xAI API base URL used for Chat Completions.

Backed by the xai connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_XAI_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-xai-api-key`

The xAI API Key.

Backed by the xai connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_ZAI_API_BASE_URL`

- Type: string
- Default: `https://api.z.ai/api/paas/v4`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-zai-api-base-url`

The Z.AI API base URL used for Chat Completions.

Backed by the zai connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LLM_ZAI_API_KEY`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `llm-zai-api-key`

The Z.AI API Key.

Backed by the zai connection in the admin AI settings provider list: reads and writes go through the llm-providers connection list, and a value set by this environment variable shadows this one field of that connection.

### `MB_LOAD_ANALYTICS_CONTENT`

- Type: boolean
- Default: `true`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Whether or not we should load Metabase analytics content on startup. Defaults to match `install-analytics-database`,
  which defaults to true, but can be disabled via environment variable.

Setting this environment variable to false can also come in handy when migrating environments, as it can simplify the migration process.

### `MB_LOADING_MESSAGE`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: keyword
- Default: `doing-science`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `loading-message`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `loading-message`

Choose the message to show while a query is running. Possible values are "doing-science", "running-query", or "loading-results".

### `MB_LOGIN_PAGE_ILLUSTRATION`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `default`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `login-page-illustration`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `login-page-illustration`

Options for displaying the illustration on the login page.

### `MB_LOGIN_PAGE_ILLUSTRATION_CUSTOM`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `login-page-illustration-custom`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `login-page-illustration-custom`

The custom illustration for the login page.

### `MB_MAP_TILE_SERVER_ALLOWED_NETWORKS`

- Type: keyword
- Default: `null`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Controls which networks Metabase may connect to for map tile servers.
  Options:
  - allow-private (external + private networks but NOT loopback or link-local)
  - external-only (only globally routable public addresses)
  - allow-all (no restrictions).
  Defaults to external-only on Metabase Cloud and allow-private when self-hosted.

Allowed network for the map tile server.

### `MB_MAP_TILE_SERVER_URL`

- Type: string
- Default: `https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `map-tile-server-url`

The map tile server URL template used in map visualizations, for example from OpenStreetMaps or MapBox. This URL is visible to clients, so do not include private keys.

### `MB_MAX_UNAUTHENTICATED_REQUEST_BODY_BYTES`

- Type: integer
- Default: `4194304`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Maximum size in bytes of an HTTP request body from a caller who is not authenticated. Larger requests are rejected with HTTP 413 before the body is read.

Applies to requests without a valid session, API key or token. The body is bounded before authentication is checked, so this is the most memory an anonymous request can make the server buffer. It covers login, setup, password reset, SSO callbacks, and public or embedded queries; none of those legitimately send more than a few hundred kilobytes. Authenticated requests are not limited.

### `MB_MCP_APPS_CORS_CUSTOM_ORIGINS`

- Type: string
- Default: ``
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `mcp-apps-cors-custom-origins`

Custom CORS origins for self-hosted MCP clients, space-separated.

### `MB_MCP_APPS_CORS_ENABLED_CLIENTS`

- Type: csv
- Default: `[]`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `mcp-apps-cors-enabled-clients`

Popular MCP clients enabled for CORS, stored as CSV client keys (e.g. claude, vscode).

### `MB_METABOT_ADVANCED_PERMISSIONS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `metabot-advanced-permissions`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `metabot-advanced-permissions`

Whether the AI feature access admin page shows granular, per-tool group permissions instead of a single on/off toggle per group.

### `MB_METABOT_CHAT_TURN_ASYNC_TIMEOUT_MS`

- Type: positive-integer
- Default: `1800000`

Maximum duration of a Metabot chat turn in milliseconds.

### `MB_METABOT_ENABLED`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `metabot-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `metabot-enabled`

Whether Metabot is enabled for regular usage.

### `MB_METABOT_ICON`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `metabot`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `metabot-icon`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `metabot-icon`

The icon for Metabot. Set to `metabot` for the default icon, or a data URI for a custom uploaded image (up to 1MB).

### `MB_METABOT_NAME`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `Metabot`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `metabot-name`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `metabot-name`

The display name for Metabot, shown throughout the Metabase UI.

### `MB_METABOT_QUERY_EXECUTION_ENABLED`

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `metabot-query-execution-enabled`

Whether Metabot can run queries and read their results. Result rows are sent to the LLM provider.

### `MB_METABOT_RECENT_VIEWS_ENABLED`

- Type: boolean
- Default: `true`

Whether the user's recently viewed items are included in the Metabot system prompt.

### `MB_METABOT_SHOW_ILLUSTRATIONS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `metabot-show-illustrations`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `metabot-show-illustrations`

Whether to show Metabot illustrations in the UI.

### `MB_METABOT_SLACK_SIGNING_SECRET`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `metabot-slack-signing-secret`

Signing secret for verifying requests from the Metabot Slack app.

### `MB_METABOT_SQL_EXECUTION_ENABLED`

- Type: boolean
- Default: `true`

Whether Metabot can also run SQL queries it wrote, for questions a notebook query can't express. Applies only when Metabot can run queries, and only on databases where the user may write SQL.

### `MB_MFA_CHALLENGE_SIGNING_KEY`

- Type: string
- Default: `null`

Key used to sign MFA challenge tokens. Generated automatically on first use.

### `MB_MFA_ENFORCEMENT`

- Type: keyword
- Default: `off`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `mfa-enforcement`

Controls whether two-factor authentication is available to users. :off disables it entirely; :optional allows users to enroll voluntarily, :required mandates users enroll.

### `MB_MFA_REQUIREMENT_DEADLINE`

- Type: timestamp
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `mfa-requirement-deadline`

Time after which mfa-enforcement will take effect for all users.

### `MB_NATIVE_QUERY_AUTOCOMPLETE_MATCH_STYLE`

- Type: keyword
- Default: `substring`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `native-query-autocomplete-match-style`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `native-query-autocomplete-match-style`

Matching style for native query editor's autocomplete. Can be "substring", "prefix", or "off". Larger instances can have performance issues matching using substring, so can use prefix matching,  or turn autocompletions off.

### `MB_NESTED_FIELD_COLUMNS_VALUE_LENGTH_LIMIT`

- Type: integer
- Default: `50000`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `nested-field-columns-value-length-limit`.

Maximum length of a JSON string before skipping it during sync for JSON unfolding. If this is set too high it could lead to slow syncs or out of memory errors.

### `MB_NO_DATA_ILLUSTRATION`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `default`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `no-data-illustration`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `no-data-illustration`

Options for displaying the illustration when there are no results after running a question.

### `MB_NO_DATA_ILLUSTRATION_CUSTOM`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `no-data-illustration-custom`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `no-data-illustration-custom`

The custom illustration for when there are no results after running a question.

### `MB_NO_OBJECT_ILLUSTRATION`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `default`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `no-object-illustration`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `no-object-illustration`

Options for displaying the illustration when there are no results after searching.

### `MB_NO_OBJECT_ILLUSTRATION_CUSTOM`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `no-object-illustration-custom`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `no-object-illustration-custom`

The custom illustration for when there are no results after searching.

### `MB_NON_TABLE_CHART_GENERATED`

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `non-table-chart-generated`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `non-table-chart-generated`

Whether a non-table chart has already been generated. Required for analytics to track instance activation journey.

### `MB_NOT_BEHIND_PROXY`

- Type: boolean
- Default: `false`

Indicates whether Metabase is running behind a proxy that sets the source-address-header for incoming requests.

### `MB_NOTIFICATION_LINK_BASE_URL`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`

By default "Site Url" is used in notification links, but can be overridden.

The base URL where dashboard notitification links will point to instead of the Metabase base URL.
        Only applicable for users who utilize interactive embedding and subscriptions.

### `MB_NOTIFICATION_SYSTEM_EVENT_THREAD_POOL_SIZE`

- Type: integer
- Default: `5`

The size of the thread pool used to send system event notifications.

### `MB_NOTIFICATION_TEMP_FILE_SIZE_MAX_BYTES`

- Type: integer
- Default: `10485760`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

The maximum file size that will be created when storing notification query results on disk.
  Note this is in BYTES. Default value is 10485760 which is `10 * 1024 * 1024`. To disable this size limit set the
  value to 0.

### `MB_NOTIFICATION_THREAD_POOL_SIZE`

- Type: integer
- Default: `3`

The size of the thread pool used to send notifications.

If Metabase stops sending notifications like alerts, it may be because long-running
  queries are clogging the notification queue. You may be able to unclog the queue by
  increasing the size of the thread pool dedicated to notifications.

### `MB_OIDC_ALLOWED_NETWORKS`

- Type: keyword
- Default: `allow-all`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

What networks are OIDC requests allowed to? Possible values: 'allow-all' (default), 'allow-private', or 'external-only'.

Set this to tighten which networks OIDC discovery and token requests may reach; it defaults to allow-all. Other values: external-only and allow-private

### `MB_OIDC_PROVIDERS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: json
- Default: `[]`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `oidc-providers`

JSON containing OIDC provider configurations.

### `MB_OIDC_USER_PROVISIONING_ENABLED`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `oidc-user-provisioning-enabled`

Determines what happens when a user logs in via OIDC and doesn't have a Metabase account.

When set to `true`, users who log in via OIDC will automatically get a Metabase account if they don't have one, or get their existing account reactivated. When set to `false`, only users with active Metabase accounts can log in via OIDC.

### `MB_PERSISTED_MODEL_REFRESH_CRON_SCHEDULE`

- Type: string
- Default: `0 0 0/6 * * ? *`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `persisted-model-refresh-cron-schedule`

cron syntax string to schedule refreshing persisted models.

### `MB_PERSISTED_MODELS_ENABLED`

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `persisted-models-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `persisted-models-enabled`

Allow persisting models into the source database.

### `MB_PIVOT_MAX_RESULT_ROWS`

- Type: integer
- Default: `200000`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `pivot-max-result-rows`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `pivot-max-result-rows`

Maximum number of rows a pivot query can return. Overrides MB_AGGREGATED_QUERY_ROW_LIMIT for pivot queries.

Applies to pivot queries only. When MB_USE_NATIVE_PIVOT_TABLES is on and the driver supports native pivots, this is a hard cap on the number of rows a pivot query returns. Otherwise it only approximates the cap, and larger pivots can exceed it. Must be less than 1048575.

### `MB_PREMIUM_EMBEDDING_TOKEN`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `premium-embedding-token`

Token for premium features. Go to the MetaStore to get yours!

### `MB_QUERY_CACHING_EARLY_REFRESH_RATIO`

- Type: double
- Default: `0.1`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `query-caching-early-refresh-ratio`

Refresh cached results this fraction of their cache duration before they expire, so requests keep being served from cache instead of waiting for a recomputation. Set to 0 to only refresh once results have expired.

### `MB_QUERY_CACHING_MAX_KB`

- Type: integer
- Default: `2000`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `query-caching-max-kb`

The maximum size of the cache, per saved question, in kilobytes.

### `MB_QUERY_CACHING_MAX_TTL`

- Type: double
- Default: `3024000.0`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `query-caching-max-ttl`

The absolute maximum time to keep any cached query results, in seconds.

### `MB_QUEUE_BACKEND`

- Type: string
- Default: `null`

Which queue backend to use. Valid values: `quartz`, `memory`. When unset, defaults to `quartz`, or to `memory` when the task scheduler is disabled (`MB_DISABLE_SCHEDULER`).

### `MB_QUEUE_MAX_RETRIES`

- Type: integer
- Default: `5`

Maximum number of times a failed queue message will be retried before being dropped.

### `MB_QUEUE_NO_LISTENER_MAX_AGE_MS`

- Type: integer
- Default: `86400000`

How long (in milliseconds) a Quartz queue message with no listener anywhere in the cluster is kept before the reaper drops it. With node-affinity, such a message is never acquired and just waits in the store; this bounds that wait so a message for a queue no node handles (e.g. a new queue whose node was rolled back) does not linger forever. Generous by default (1 day) so a node can restart or be re-upgraded and still deliver it.

### `MB_REDIRECT_ALL_REQUESTS_TO_HTTPS`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `redirect-all-requests-to-https`

Force all traffic to use HTTPS via a redirect, if the site URL is HTTPS.

### `MB_REMOTE_SYNC_AUTO_IMPORT`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-auto-import`

Whether to automatically import from the remote git repository. Only applies if remote-sync-type is :read-only.

### `MB_REMOTE_SYNC_AUTO_IMPORT_RATE`

- Type: integer
- Default: `5`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-auto-import-rate`

If remote-sync-type is :read-only and remote-sync-auto-import is true, the rate (in minutes) at which to check for updates to import. Defaults to 5.

### `MB_REMOTE_SYNC_BRANCH`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-branch`

The remote branch to sync with, e.g. `main`.

### `MB_REMOTE_SYNC_CHECK_CHANGES_CACHE_TTL_SECONDS`

- Type: integer
- Default: `60`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-check-changes-cache-ttl-seconds`

Time-to-live in seconds for the remote changes check cache. Default is 60 seconds.

### `MB_REMOTE_SYNC_GIT_TIMEOUT_SECONDS`

- Type: integer
- Default: `60`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-git-timeout-seconds`

Network timeout (in seconds) for remote git operations such as fetch, push, clone, and ls-remote. A stalled connection would otherwise hang a sync indefinitely.

### `MB_REMOTE_SYNC_TASK_TIME_LIMIT_MS`

- Type: integer
- Default: `300000`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-task-time-limit-ms`

How long a remote sync task may go without proving its process is alive (via heartbeat, or progress on rows without one) before it is treated as dead and superseded. A slow but live task is never affected. The task itself is aborted after ten times this limit.

### `MB_REMOTE_SYNC_TOKEN`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-token`

An Authorization Bearer token allowing access to the git repo over HTTP.

### `MB_REMOTE_SYNC_TRANSFORMS`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-transforms`

Whether to sync transforms via remote-sync. When enabled, transforms, transform tags, transform tests, Python libraries, and transforms folders are synced.

### `MB_REMOTE_SYNC_TYPE`

- Type: keyword
- Default: `read-only`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-type`

Git synchronization type - :read-write or :read-only.

### `MB_REMOTE_SYNC_URL`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `remote-sync-url`

The location of your git repository, e.g. `https://github.com/acme-inco/metabase.git`.

### `MB_REPORT_TIMEZONE`

- Type: string
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `report-timezone`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `report-timezone`

Connection timezone to use when executing queries. Defaults to system timezone.

### `MB_RESET_TOKEN_TTL_HOURS`

- Type: integer
- Default: `48`

Number of hours a password reset is considered valid.

### `MB_RETRY_INITIAL_INTERVAL`

- Type: integer
- Default: `500`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `retry-initial-interval`

The initial retry delay in milliseconds.

### `MB_RETRY_JITTER_FACTOR`

- Type: double
- Default: `0.1`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `retry-jitter-factor`

The jitter factor of the retry delay.

### `MB_RETRY_MAX_INTERVAL_MILLIS`

- Type: integer
- Default: `30000`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `retry-max-interval-millis`

The maximum delay between attempts.

### `MB_RETRY_MAX_RETRIES`

- Type: integer
- Default: `6`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `retry-max-retries`

The maximum number of retries for an event.

### `MB_RETRY_MULTIPLIER`

- Type: double
- Default: `2.0`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `retry-multiplier`

The delay multiplier between attempts.

### `MB_SAML_APPLICATION_NAME`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `Metabase`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-application-name`

This application name will be used for requests to the Identity Provider.

### `MB_SAML_ATTRIBUTE_EMAIL`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-attribute-email`

SAML attribute for the user's email address.

### `MB_SAML_ATTRIBUTE_FIRSTNAME`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-attribute-firstname`

SAML attribute for the user's first name.

### `MB_SAML_ATTRIBUTE_GROUP`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-attribute-group`

SAML attribute for group syncing.

### `MB_SAML_ATTRIBUTE_LASTNAME`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-attribute-lastname`

SAML attribute for the user's last name.

### `MB_SAML_ATTRIBUTE_TENANT`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-attribute-tenant`

SAML attribute for the user's tenant slug.

### `MB_SAML_ENABLED`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-enabled`

Is SAML authentication configured and enabled?

### `MB_SAML_GROUP_MAPPINGS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: json
- Default: `{}`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-group-mappings`

JSON containing SAML to Metabase group mappings.

### `MB_SAML_GROUP_SYNC`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-group-sync`

Enable group membership synchronization with SAML.

### `MB_SAML_IDENTITY_PROVIDER_CERTIFICATE`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-identity-provider-certificate`

Encoded certificate for the identity provider. Depending on your IdP, you might need to download this,
open it in a text editor, then copy and paste the certificate's contents here.

### `MB_SAML_IDENTITY_PROVIDER_ISSUER`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-identity-provider-issuer`

This is a unique identifier for the IdP. Often referred to as Entity ID or simply 'Issuer'. Depending
on your IdP, this usually looks something like `http://www.example.com/141xkex604w0Q5PN724v`.

### `MB_SAML_IDENTITY_PROVIDER_SLO_URI`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-identity-provider-slo-uri`

If SAML single logout (SLO) is enabled, Metabase will make an HTTP-Redirect SLO request to this endpoint when a user logs out of Metabase.

### `MB_SAML_IDENTITY_PROVIDER_URI`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-identity-provider-uri`

This is the URL where your users go to log in to your identity provider. Depending on which IdP you're
using, this usually looks like `https://your-org-name.example.com` or `https://example.com/app/my_saml_app/abc123/sso/saml`.

### `MB_SAML_KEYSTORE_ALIAS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-keystore-alias`

Alias for the key that Metabase should use for signing SAML requests.

### `MB_SAML_KEYSTORE_PASSWORD`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `changeit`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-keystore-password`

Password for opening the keystore.

### `MB_SAML_KEYSTORE_PATH`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-keystore-path`

Absolute path to the Keystore file to use for signing SAML requests.

### `MB_SAML_SLO_ENABLED`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-slo-enabled`

If enabled, Metabase will redirect users to your configured SAML Single Logout endpoint when they log out of Metabase.

### `MB_SAML_USER_PROVISIONING_ENABLED`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `saml-user-provisioning-enabled`

Determines what happens when a user logs in via SAML and doesn't have a Metabase account.

When set to `true`, users who log in via SAML will automatically get a Metabase account if they don't have one, or get their existing account reactivated. When set to `false`, only users with active Metabase accounts can log in via SAML.

### `MB_SCAN_MAX_FIELDS_PER_TABLE`

- Type: integer
- Default: `10000`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `scan-max-fields-per-table`.

Maximum number of fields per table to scan for field values. If a table has more active fields than this, the rest
  are skipped when scanning field values -- scanning that many fields would load them all into memory and, on non-SQL
  drivers like MongoDB, issue a warehouse request per field.

### `MB_SCIM_ENABLED`

- Type: boolean
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `scim-enabled`

Is SCIM currently enabled?

### `MB_SDK_ENCRYPTION_VALIDATION_KEY`

- Type: string
- Default: `null`

Used for encrypting and checking whether SDK requests are signed.

### `MB_SEARCH_LANGUAGE`

- Type: string
- Default: `null`

When using the appdb engine against postgresql, override the language used for stemming in to_tsvector.
  Value must be a valid configured language option in your database such as 'english' or 'simple'.

### `MB_SEARCH_TYPEAHEAD_ENABLED`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `search-typeahead-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `search-typeahead-enabled`

Enable typeahead search in the Metabase navbar?

### `MB_SEND_EMAIL_ON_FIRST_LOGIN_FROM_NEW_DEVICE`

- Type: boolean
- Default: `true`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Should we send users a notification email the first time they log in from a new device? (Default: true). This is
  currently only configurable via environment variable so users who gain access to an admin's credentials cannot
  disable this Setting and access their account without them knowing.

This variable also controls the geocoding service that Metabase uses to know the location of your logged in users.
        Setting this variable to false also disables this reverse geocoding functionality.

### `MB_SEND_NEW_SSO_USER_ADMIN_EMAIL`

- Type: boolean
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `send-new-sso-user-admin-email`

Should new email notifications be sent to admins, for all new SSO users?

### `MB_SERIALIZATION_SKIP_SCHEMA_VALIDATION`

- Type: boolean
- Default: `false`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Whether to import questions whose queries this Metabase's query schema rejects. Defaults to false.

On import, Metabase validates every question against the query format this version understands, and refuses any it cannot read. Set this to true to skip that validation. Skipping it will not necessarily make the import succeed. Import may still fail on a later step.

### `MB_SESSION_COOKIE_SAMESITE`

- Type: keyword
- Default: `lax`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `session-cookie-samesite`

Value for the session cookie's `SameSite` directive.

See [Embedding Metabase in a different domain](https://www.metabase.com/docs/latest/embedding/full-app-embedding.md#embedding-metabase-in-a-different-domain).
        Read more about [Full app embedding](https://www.metabase.com/docs/latest/embedding/full-app-embedding.md).
        Learn more about [SameSite cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie#samesitesamesite-value).

### `MB_SESSION_COOKIES`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `session-cookies`

When set, enforces the use of session cookies for all users which expire when the browser is closed.

The user login session will always expire after the amount of time defined in MAX_SESSION_AGE (by default 2 weeks).
        This overrides the “Remember me” checkbox when logging in.
        Also see the Changing session expiration documentation page.

### `MB_SESSION_TIMEOUT`

- Type: json
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `session-timeout`

Time before inactive users are logged out. By default, sessions last indefinitely.

Has to be in the JSON format `"{"amount":120,"unit":"minutes"}"` where the unit is one of "seconds", "minutes" or "hours".

### `MB_SETUP_EMBEDDING_AUTOENABLED`

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `setup-embedding-autoenabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `setup-embedding-autoenabled`

Indicates if embedding has enabled automatically during the setup because the user was interested in embedding.

### `MB_SETUP_LICENSE_ACTIVE_AT_SETUP`

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `setup-license-active-at-setup`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `setup-license-active-at-setup`

Indicates if at the end of the setup a valid license was active.

### `MB_SHOW_DATABASE_SYNCING_MODAL`

- Type: boolean
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `show-database-syncing-modal`

Whether an introductory modal should be shown after the next database connection is added. Defaults to false if any non-default database has already finished syncing for this instance.

### `MB_SHOW_GOOGLE_SHEETS_INTEGRATION`

- Type: boolean
- Default: `null`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Whether or not to show the user a button that sets up Google Sheets integration.

When enabled, we show users a button to authenticate with Google to import data from Google Sheets.

### `MB_SHOW_HOMEPAGE_DATA`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `show-homepage-data`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `show-homepage-data`

Whether or not to display data on the homepage. Admins might turn this off in order to direct users to better content than raw data.

### `MB_SHOW_HOMEPAGE_XRAYS`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `show-homepage-xrays`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `show-homepage-xrays`

Whether or not to display x-ray suggestions on the homepage. They will also be hidden if any dashboards are pinned. Admins might hide this to direct users to better content than raw data.

### `MB_SHOW_METABASE_LINKS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `show-metabase-links`

Whether or not to display Metabase links outside admin settings.

### `MB_SHOW_STATIC_EMBED_TERMS`

- Type: boolean
- Default: `true`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `show-static-embed-terms`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `show-static-embed-terms`

Check if the static embedding licensing should be hidden in the static embedding flow.

### `MB_SITE_LOCALE`

- Type: string
- Default: `en`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `site-locale`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `site-locale`

The default language for all users across the Metabase UI, system emails, pulses, and alerts. Users can individually override this default language from their own account settings.

### `MB_SITE_NAME`

- Type: string
- Default: `Metabase`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `site-name`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `site-name`

The name used for this instance of Metabase.

### `MB_SITE_URL`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `site-url`

This URL is used for things like creating links in emails, auth redirects, and in some embedding scenarios, so changing it could break functionality or get you locked out of this instance.

This URL is critical for things like SSO authentication, email links, embedding and more.
        Even difference with `http://` vs `https://` can cause problems.
        Make sure that the address defined is how Metabase is being accessed.
        If left unset, Metabase learns this value from the request headers of the first authenticated
        admin, so an operator who completes setup in a browser doesn't have to configure it. Deployments
        that provision headlessly, run multi-tenant, or otherwise never sign in as an admin should set
        `MB_SITE_URL` explicitly.

### `MB_SLACK_APP_TOKEN`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `slack-app-token`

Bot user OAuth token for connecting the Metabase Slack app. This should be used for all new Slack integrations starting in Metabase v0.42.0.

### `MB_SLACK_BUG_REPORT_CHANNEL`

- Type: string
- Default: `metabase-bugs`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `slack-bug-report-channel`

The name of the channel where bug reports should be posted.

### `MB_SLACK_CONNECT_ATTRIBUTE_TEAM_ID`

- Type: string
- Default: `https://slack.com/team_id`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `slack-connect-attribute-team-id`

Slack OIDC claim for the team/workspace ID.

### `MB_SLACK_CONNECT_AUTHENTICATION_MODE`

- Type: string
- Default: `link-only`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `slack-connect-authentication-mode`

Controls whether Slack can be used for SSO login or just account linking. Valid values: "sso" or "link-only" (default).

### `MB_SLACK_CONNECT_CLIENT_ID`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `slack-connect-client-id`

Client ID for your Slack app. Get this from https://api.slack.com/apps.

### `MB_SLACK_CONNECT_CLIENT_SECRET`

- Type: string
- Default: `null`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `slack-connect-client-secret`

Client Secret for your Slack app.

### `MB_SLACK_CONNECT_ENABLED`

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `slack-connect-enabled`

Is Slack Connect authentication configured and enabled?

### `MB_SLACK_CONNECT_SIGNING_SECRET_VERSION`

- Type: integer
- Default: `0`

Monotonically increasing version number for the Slack signing secret. Incremented each time the signing secret is rotated. Slack-connect auth identities are stamped with this version and only valid when it matches the current value. Legacy identities without a version are treated as version 0 for backwards compatibility.

### `MB_SLACK_CONNECT_USER_PROVISIONING_ENABLED`

- Type: boolean
- Default: `true`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `slack-connect-user-provisioning-enabled`

When a user logs in via Slack Connect, create a Metabase account for them automatically if they don't have one.

### `MB_SLACK_FILES_CHANNEL [DEPRECATED]`

> DEPRECATED: 0.54.0

- Type: string
- Default: `metabase_files`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `slack-files-channel`

The name of the channel to which Metabase files should be initially uploaded.

Since 0.54.0, Metabase doesn't use a files channel for Slack, so you can remove this variable, and no other variable replaces it.

### `MB_SMTP_OVERRIDE_ENABLED`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: boolean
- Default: `false`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `smtp-override-enabled`

Whether to use the custom SMTP server rather than the standard settings.

### `MB_SOURCE_ADDRESS_HEADER`

- Type: string
- Default: `X-Forwarded-For`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `source-address-header`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `source-address-header`

Identify the source of HTTP requests by this header's value, instead of its remote address.

### `MB_SQL_JDBC_FETCH_SIZE`

- Type: integer
- Default: `500`

Fetch size for result sets. We want to ensure that the jdbc ResultSet objects are not realizing the entire results
  in memory.

### `MB_SQL_TOOLS_PARSER_BACKEND`

- Type: keyword
- Default: `sqlglot`

Parser backend of `sql-tools` module.

### `MB_SSH_HEARTBEAT_INTERVAL_SEC`

- Type: integer
- Default: `180`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `ssh-heartbeat-interval-sec`

Controls how often the heartbeats are sent when an SSH tunnel is established (in seconds).

### `MB_START_OF_WEEK`

- Type: keyword
- Default: `sunday`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `start-of-week`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `start-of-week`

This will affect things like grouping by week or filtering in GUI queries. It won't affect most SQL queries, although it is used to set the WEEK_START session variable in Snowflake.

### `MB_SUBSCRIPTION_ALLOWED_DOMAINS`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: string
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `subscription-allowed-domains`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `subscription-allowed-domains`

Allowed email address domain(s) for new Dashboard Subscriptions and Alerts. To specify multiple domains, separate each domain with a comma, with no space in between. To allow all domains, leave the field empty. This setting doesn’t affect existing subscriptions.

### `MB_SURVEYS_ENABLED`

- Type: boolean
- Default: `true`

Enable or disable surveys.

### `MB_SYNC_LEAF_FIELDS_LIMIT`

- Type: integer
- Default: `1000`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `sync-leaf-fields-limit`.

Maximum number of leaf fields synced per collection of document database. Currently relevant for Mongo. Not to be confused with total number of synced fields. For every chosen leaf field, all intermediate fields from root to leaf are synced as well.

### `MB_SYNC_MAX_FIELDS_PER_TABLE`

- Type: integer
- Default: `10000`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `sync-max-fields-per-table`.

Maximum number of fields per table to sync as :model/Field rows. If a table's warehouse schema has more fields than
  this, only the first (by name) are synced and the rest are skipped -- keeps document databases with very large or
  dynamic schemas (e.g. MongoDB) from creating an unbounded number of Fields.

### `MB_SYNCHRONOUS_BATCH_UPDATES`

- Type: boolean
- Default: `false`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `synchronous-batch-updates`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `synchronous-batch-updates`

Process batches updates synchronously. If true, all `submit!` calls will be processed immediately. Default is false.

### `MB_THREAD_INTERRUPT_ESCALATION_TIMEOUT_MS`

- Type: integer
- Default: `0`

By default, this is 0 and the thread interrupt escalation does not run.

Timeout in milliseconds to wait after query cancellation before escalating to thread interruption.
        This is used to free up threads that are stuck waiting for a DB response after a query has been cancelled.

### `MB_TRANSFORM_RUN_JOB_SQL_CONCURRENCY`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: integer
- Default: `3`

Maximum number of SQL-backed transforms a single transform-job run may execute in parallel.

This setting is only configurable on instances with the transforms add-on; OSS
  deployments without the add-on always use the default.

### `MB_TRANSFORM_TIMEOUT`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: integer
- Default: `240`

The timeout for a transform job, in minutes.

Controls the timeout for transform runs, including the queries they execute. This takes precedence
  over MB_DB_QUERY_TIMEOUT_MINUTES for queries executed inside a transform, so transforms can run longer than regular
  Metabase queries. Enforced per-statement via `Statement.setQueryTimeout`; transforms also use a separate JDBC
  connection pool whose c3p0 leak-detector tolerates this longer runtime, so non-transform connections continue to
  use the shorter `MB_DB_QUERY_TIMEOUT_MINUTES` leak-detector.

### `MB_TRANSFORMS_ENABLED`

- Type: boolean
- Default: `null`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `transforms-enabled`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `transforms-enabled`

Whether transforms are enabled.

When enabled, data analysts and admins can write, schedule and run transforms.
  Disabling this feature will hide all transform features, prevent transform editing or creation, and prevent any new runs.

### `MB_UNAGGREGATED_QUERY_ROW_LIMIT`

- Type: integer
- Default: `2000`
- [Exported as](https://www.metabase.com/docs/latest/installation-and-operation/serialization.md): `unaggregated-query-row-limit`.
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `unaggregated-query-row-limit`

Maximum number of rows to return specifically on :rows type queries via the API.

Must be less than 1048575, and less than the number configured in MB_AGGREGATED_QUERY_ROW_LIMIT. See also MB_AGGREGATED_QUERY_ROW_LIMIT.

### `MB_UPLOADS_DATABASE_ID [DEPRECATED]`

> DEPRECATED: 0.50.0

- Type: integer
- Default: `null`

Database ID for uploads.

Metabase no longer uses this variable, because the upload settings now live on the database that receives uploads. Set them in **Admin** > **Settings** > **Uploads**, or with `PUT /api/setting/uploads-settings`. On self-hosted Pro and Enterprise plans, you can also set `uploads-settings` in the [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

### `MB_UPLOADS_ENABLED [DEPRECATED]`

> DEPRECATED: 0.50.0

- Type: boolean
- Default: `false`

Whether or not uploads are enabled.

Metabase no longer uses this variable, because the upload settings now live on the database that receives uploads. Set them in **Admin** > **Settings** > **Uploads**, or with `PUT /api/setting/uploads-settings`. On self-hosted Pro and Enterprise plans, you can also set `uploads-settings` in the [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

### `MB_UPLOADS_SCHEMA_NAME [DEPRECATED]`

> DEPRECATED: 0.50.0

- Type: string
- Default: `null`

Schema name for uploads.

Metabase no longer uses this variable, because the upload settings now live on the database that receives uploads. Set them in **Admin** > **Settings** > **Uploads**, or with `PUT /api/setting/uploads-settings`. On self-hosted Pro and Enterprise plans, you can also set `uploads-settings` in the [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

### `MB_UPLOADS_TABLE_PREFIX [DEPRECATED]`

> DEPRECATED: 0.50.0

- Type: string
- Default: `null`

Prefix for upload table names.

Metabase no longer uses this variable, because the upload settings now live on the database that receives uploads. Set them in **Admin** > **Settings** > **Uploads**, or with `PUT /api/setting/uploads-settings`. On self-hosted Pro and Enterprise plans, you can also set `uploads-settings` in the [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

### `MB_USAGE_METADATA_ENABLED`

- Type: boolean
- Default: `false`

Whether usage-driven metadata batch processing is enabled.

### `MB_USAGE_METADATA_LAST_COMPLETED_DAY`

- Type: string
- Default: `null`

Internal watermark for the last completed usage metadata day.

### `MB_USAGE_METADATA_RETENTION_DAYS`

- Type: integer
- Default: `90`

How many days of usage metadata rollups to retain.

### `MB_USAGE_METADATA_SCHEDULE`

- Type: string
- Default: `0 0 2 * * ? *`

Cron schedule (in UTC) for usage metadata batch processing.

### `MB_USE_NATIVE_PIVOT_TABLES`

- Type: boolean
- Default: `false`

When enabled, run pivot queries as a single native GROUPING SETS query on drivers that support it, instead of running one query per breakout combination.

### `MB_USER_VISIBILITY`

> Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.

- Type: keyword
- Default: `all`
- [Configuration file name](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md): `user-visibility`

Note: Users with row or column security restrictions will never see suggestions.

### `MB_WAREHOUSE_ALLOWED_NETWORKS`

- Type: keyword
- Default: `null`
- Environment variable only: you can't set this in the Admin settings or in a [configuration file](https://www.metabase.com/docs/latest/configuring-metabase/config-file.md).

Controls which networks Metabase may connect to for warehouse connections.
Options:
- external-only (only globally reachable public addresses)
- allow-private (external + private networks but NOT loopback or link-local)
- allow-all (no restrictions).
Defaults to external-only on Metabase Cloud and allow-all when self-hosted.
Also covers the SSH tunnel host and the database auth-provider URLs.

Set this when Metabase must reach a warehouse on a private network (allow-private) or on this machine (allow-all). There is no admin UI for it, and a value stored in the application database is ignored. Defaults to external-only on Metabase Cloud and allow-all when self-hosted. Metabase refuses to start if this is set to anything but one of the three policies, rather than run on a policy nobody chose.

## Other environment variables

The following environment variables can only be set via the environment. They cannot be set by the configuration file.

### `MAX_SESSION_AGE`

Type: integer<br>
Default: `20160`

Session expiration, defined in minutes (default is 2 weeks), which will log out users after the defined period and require re-authentication.

Note: This setting is not an idle/inactivity timeout. If you set this to 15 minutes, your users have to login (or re-authenticate) again every 15 minutes. Use [MB_SESSION_TIMEOUT](#mb_session_timeout) to control timeout based on inactivity.

Use [MB_SESSION_COOKIES](#mb_session_cookies) to also expire sessions, when browser is closed.

Also see the [Changing session expiration](https://www.metabase.com/docs/latest/people-and-groups/changing-session-expiration.md) documentation page.

### `MB_APPLICATION_DB_IDLE_CONNECTION_TEST_PERIOD_SECONDS`

Type: integer<br>
Default: `60`<br>
Since: v62.0

How often, in seconds, to test idle connections in the application database pool. Set to `0` to disable idle connection testing.

### `MB_APPLICATION_DB_MAX_CONNECTION_AGE_SECONDS`

Type: integer<br>
Default: `3600`<br>
Since: v62.0

Maximum lifetime, in seconds, of a connection in the application database pool. After this duration the connection is closed and a new one is opened. Set to `0` to keep connections until the database closes them.

The default of one hour is set primarily to limit memory growth (especially on PostgreSQL).

If you are connecting with a short-lived credential (e.g. an AWS RDS IAM auth token) baked into the URL or password at startup, setting this to `0` is a partial workaround — eventual reconnects from the database or the network will still fail. Prefer [MB_DB_AWS_IAM](#mb_db_aws_iam) (AWS RDS / Aurora) or [MB_DB_AZURE_MANAGED_IDENTITY_CLIENT_ID](#mb_db_azure_managed_identity_client_id) (Azure).

### `MB_APPLICATION_DB_MAX_CONNECTION_POOL_SIZE`

Type: integer<br>
Default: `15`<br>
Since: v35.0

Maximum number of connections to the Metabase application database.

Change this to a higher value if you notice that regular usage consumes all or close to all connections. When all connections are in use, Metabase might feel slow or unresponsive when clicking around the interface.

To see how many connections are being used, check the Metabase logs and look for lines that contains the following: `… App DB connections: 12/15 …`. In this example, 12 out of 15 available connections are being used.

See [MB_JDBC_DATA_WAREHOUSE_MAX_CONNECTION_POOL_SIZE](#mb_jdbc_data_warehouse_max_connection_pool_size) for setting maximum connections to the databases connected to Metabase.

### `MB_APPLICATION_DB_MAX_IDLE_TIME_EXCESS_CONNECTIONS_SECONDS`

Type: integer<br>
Default: `600`<br>
Since: v62.0

How long, in seconds, an idle connection beyond the minimum pool size may stay open before being culled. Set to `0` to never cull excess idle connections.

### `MB_APPLICATION_DB_TEST_CONNECTION_ON_CHECKOUT`

Type: boolean<br>
Default: `false`<br>
Since: v62.0

When `true`, each connection is validated when checked out of the pool. Adds latency to every checkout. Useful when credentials may invalidate connections behind the pool's back.

### `MB_APPLICATION_DB_UNRETURNED_CONNECTION_TIMEOUT_SECONDS`

Type: integer<br>
Default: `3600`<br>
Since: v62.0

How long, in seconds, before a checked-out but unreturned connection is forcibly reclaimed. The legacy name `MB_APPLICATION_DB_UNRETURNED_CONNECTION_TIMEOUT` continues to work; the suffixed form is preferred.

### `MB_ASYNC_QUERY_THREAD_POOL_SIZE`

Type: integer<br>
Default: `50`<br>
Since: v35.0

Maximum number of async Jetty threads. If not set, then [MB_JETTY_MAXTHREADS](#mb_jetty_maxthreads) will be used, otherwise it will use the default.

### `MB_COLORIZE_LOGS`

Type: boolean<br>
Default: `true`

Color log lines. When set to `false` it will disable log line colors. This is disabled on Windows. Related to [MB_EMOJI_IN_LOGS](#mb_emoji_in_logs).

### `MB_CONFIG_FILE_PATH`

Type: string<br>
Default: `config.yml`

This feature requires the `config-text-file` feature flag on your token.

### `MB_DB_AUTOMIGRATE`

Type: boolean<br>
Default: `true`

When set to `false`, Metabase will print migrations needed to be done in the application database and exit. Those migrations need to be applied manually. When `true`, Metabase will automatically make changes to the application database. This is not related to migrating away from H2.

### `MB_DB_AWS_IAM`

Type: boolean<br>
Default: `false`<br>
Since: v0.58.0

When `true`, authenticate to the application database (PostgreSQL or MySQL/MariaDB on AWS RDS or Aurora) using AWS IAM instead of a password. Omit [MB_DB_PASS](#mb_db_pass). Auth tokens are refreshed automatically.

Requires that AWS credentials are available via the standard credential chain (e.g. EKS IRSA, EC2 instance profile, ECS task role, or `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY`), that the credentials hold the `rds-db:connect` permission for your database user, and that the DB user is set up for IAM authentication.

For MySQL/MariaDB, also set [MB_DB_SSL_CERT](#mb_db_ssl_cert), or pass the SSL parameters in [MB_DB_CONNECTION_URI](#mb_db_connection_uri).

### `MB_DB_AZURE_MANAGED_IDENTITY_CLIENT_ID`

Type: string<br>
Default: `null`<br>
Since: v0.51.0

Authenticate to a PostgreSQL or MySQL application database using an Azure Managed Identity instead of a password. Set this to the client ID of a user-assigned Managed Identity attached to your compute resource. Omit [MB_DB_PASS](#mb_db_pass). Access tokens are refreshed automatically.

Requires the Database authentication providers Pro/Enterprise feature.

### `MB_DB_CONNECTION_URI`

Type: string<br>
Default: `null`

A JDBC-style connection URI that can be used instead of most of `MB_DB_*` like [MB_DB_HOST](#mb_db_host). Also used when certain Connection String parameters are required for the connection. The connection type requirement is the same as [MB_DB_TYPE](#mb_db_type).

Note that the `currentSchema` JDBC parameter has no effect. [The schema used for PostgreSQL application databases must be `public`](https://github.com/metabase/metabase/issues/37836).

Examples:

```
jdbc:postgresql://db.example.com:5432/mydb?user=dbuser&password=dbpassword

jdbc:postgresql://db.example.com:5432/mydb?user=dbuser&password=dbpassword&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory

jdbc:mysql://db.example.com:3306/mydb?user=dbuser&password=dbpassword
```

### `MB_DB_DBNAME`

Type: string<br>
Default: `null`

The database name of the application database used with [MB_DB_HOST](#mb_db_host).

### `MB_DB_FILE`

Type: string<br>
Default: `"metabase.db"`

Location of H2 database file. Should not include the `.mv.db` (or `.h2.db`) file extension. Used when [MB_DB_TYPE](#mb_db_type) is set to`"h2"`.

Can also be used when migrating away from H2 to specify where the existing data should be read from.

### `MB_DB_HOST`

Type: string<br>
Default: `null`

The host name or IP address of the application database. Used when [MB_DB_TYPE](#mb_db_type) is different than `"h2"`.

### `MB_DB_IN_MEMORY`

Type: boolean<br>
Default: `null`

Used for testing with [MB_DB_FILE](#mb_db_file).

### `MB_DB_PASS`

Type: string<br>
Default: `null`

The password for [MB_DB_HOST](#mb_db_host).

### `MB_DB_PORT`

Type: integer<br>
Default: `null`

The port for [MB_DB_HOST](#mb_db_host).

### `MB_DB_SSL_CERT`

Type: string<br>
Default: `null`<br>
Since: v0.58.0

SSL configuration for the application database. Used with [MB_DB_AWS_IAM](#mb_db_aws_iam) on MySQL/MariaDB, where SSL is required.

- `"trust"` — trust the server certificate without validation.
- A filesystem path to a PEM file — validate against the supplied CA certificate.

### `MB_DB_TYPE`

Type: string (`"h2"`, `"postgres"`, `"mysql"`)<br>
Default: `"h2"`

When `"h2"`, the application database is loaded from [MB_DB_FILE](#mb_db_file), otherwise [MB_DB_HOST](#mb_db_host) will be used to define application database.

### `MB_DB_USER`

Type: string<br>
Default: `null`

The username for [MB_DB_HOST](#mb_db_host).

### `MB_DEV_ADDITIONAL_DRIVER_MANIFEST_PATHS`

Type: string<br>
Default: `null`

Used during development of third-party drivers. Set the value to have that plugin manifest get loaded during startup. Specify multiple plugin manifests by comma-separating them.

### `MB_DISABLE_LEGACY_STARTUP_ENCRYPTION`

Type: boolean<br>
Default: `false`

By default, when [MB_ENCRYPTION_SECRET_KEY](#mb_encryption_secret_key) is set, Metabase encrypts on startup any values that an older version of Metabase stored unencrypted, and logs a warning for each column it had to encrypt. When `true`, Metabase will refuse to start instead of encrypting such values, including settings saved by an older version.

### `MB_DISABLE_SCHEDULER`

Type: boolean<br>
Default: `false`

When `true`, Metabase will turn off Metabase’s scheduled jobs, which include syncs, fingerprinting, and scanning, as well as dashboard subscriptions, alerts, and model caching.

Can be useful for testing, or when setting up a [git-based workflow](https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation/git-based-workflow).

### `MB_DISABLE_SESSION_THROTTLE`

Type: boolean<br>
Default: `false`

When `true`, this will disable session throttling. **Warning:** It is not recommended to disable throttling, since it is a protective measure against brute-force attacks.

Use [MB_SOURCE_ADDRESS_HEADER](#mb_source_address_header) to set the IP address of the remote client from e.g. a reverse-proxy.

### `MB_EMOJI_IN_LOGS`

Type: boolean<br>
Default: `true`

Emojis on log lines. When set to `false` it will disable log line emojis. This is disabled on Windows. Related to [MB_COLORIZE_LOGS](#mb_colorize_logs).

### `MB_ENABLE_TEST_ENDPOINTS`

Type: boolean<br>
Default: `null`

When `true`, this will enable `/api/testing` endpoint. **Warning:** This should never be enabled in production system.

### `MB_ENCRYPTION_SECRET_KEY`

Type: string<br>
Default: `null`

When set, this will encrypt database credentials stored in the application database. Requirement: minimum 16 characters base64-encoded string.

Also see documentation page [Encrypting database details at rest](https://www.metabase.com/docs/latest/databases/encrypting-details-at-rest.md).

### `MB_JDBC_DATA_WAREHOUSE_DEBUG_UNRETURNED_CONNECTION_STACK_TRACES`

Type: boolean<br>
Default: `false`<br>
Since: v51.3

If `true`, log a stack trace for any connections killed due to exceeding the timeout specified in [MB_DB_QUERY_TIMEOUT_MINUTES](#mb_db_query_timeout_minutes).

In order to see the stack traces in the logs, you'll also need to update the com.mchange log level to "INFO" or higher via a custom log4j configuration. For configuring log levels, see [Application logs](https://www.metabase.com/docs/latest/monitor/application-logs.md).

### `MB_JETTY_ASYNC_RESPONSE_TIMEOUT`

Type: integer<br>
Default: `600000`<br>
Since: v35.0

Timeout of Jetty async threads, defined in milliseconds. The default is 10 minutes. Very few things might reach that timeout, since they return some type of data before, but things like CSV downloads might. Metabot chat responses aren't bound by this timeout.

### `MB_JETTY_DAEMON`

Type: boolean<br>
Default: `false`

Use daemon threads.

### `MB_JETTY_HOST`

Type: string<br>
Default: `localhost` for JAR, `0.0.0.0` for Docker

Configure a host either as a host name or IP address to identify a specific network interface on which to listen. If set to `"0.0.0.0"`, Metabase listens on all network interfaces. It will listen on the port specified in [MB_JETTY_PORT](#mb_jetty_port).

### `MB_JETTY_JOIN`

Type: boolean<br>
Default: `true`

Blocks the thread until server ends.

### `MB_JETTY_MAXIDLETIME`

Type: integer<br>
Default: `200000`

Maximum idle time for a connection, in milliseconds.

### `MB_JETTY_MAXTHREADS`

Type: integer<br>
Default: `50`

Maximum number of threads.

Change this to a higher value if you notice that regular usage consumes all or close to all threads. When all threads are in use Metabase might feel slow or unresponsive when clicking around the interface.

To see how many threads are being used, check the Metabase logs and look for lines that contain the following: `… Jetty threads: 45/50 …`, which in this case would indicate 45 out of 50 available threads are being used.

Related [MB_ASYNC_QUERY_THREAD_POOL_SIZE](#mb_async_query_thread_pool_size).

### `MB_JETTY_MINTHREADS`

Type: integer<br>
Default: `8`

Minimum number of threads.

### `MB_JETTY_PORT`

Type: integer<br>
Default: `3000`

Configure which port to use for HTTP. It will listen on the interface specified in [MB_JETTY_HOST](#mb_jetty_host).

### `MB_JETTY_REQUEST_HEADER_SIZE`

Type: integer<br>
Default: `8192`<br>
Since: v36.0

Maximum size of a request header, in bytes. Increase this value if you are experiencing errors like "Request Header Fields Too Large".

### `MB_JETTY_SSL`

Type: boolean<br>
Default: `null`

When set to `true`, will enable HTTPS with the options configured in the `MB_JETTY_SSL_*` variables.

Also see the [Customizing Jetty web server](https://www.metabase.com/docs/latest/configuring-metabase/customizing-jetty-webserver.md) documentation page.

### `MB_JETTY_SSL_CLIENT_AUTH`

Type: boolean<br>
Default: `null`

Configure Java SSL client authentication. When set to `true`, client certificates are required and verified by the certificate authority in the TrustStore.

### `MB_JETTY_SSL_KEYSTORE`

Type: string<br>
Default: `null`

Path to Java KeyStore file.

### `MB_JETTY_SSL_KEYSTORE_PASSWORD`

Type: string<br>
Default: `null`

Password for Java KeyStore file.

### `MB_JETTY_SSL_PORT`

Type: integer<br>
Default: `null`

Configure which port to use for HTTPS. It will listen on the interface specified in [MB_JETTY_HOST](#mb_jetty_host).

### `MB_JETTY_SSL_TRUSTSTORE`

Type: string<br>
Default: `null`

Path to Java TrustStore file.

### `MB_JETTY_SSL_TRUSTSTORE_PASSWORD`

Type: string<br>
Default: `null`

Password for Java TrustStore file.

### `MB_LOAD_SAMPLE_CONTENT`

Type: Boolean<br>
Default: True

Whether to include the Sample Database in your Metabase. To exclude the Sample Database, set `MB_LOAD_SAMPLE_CONTENT=false`.

### `MB_MONITOR_PERFORMANCE`

Type: string<br>
Default: `""`

When set, starts a Java Flight Recorder (JFR) recording at startup that can be analyzed with JDK Mission Control or other JFR tools.

- `"true"` generates a timestamped output file like `metabase-20260115_143000.jfr`
- A value ending in `.jfr` is used as the output filename
- Any other non-empty value is treated as a directory path. A new timestamped JFR file is written to that directory every 30 minutes (e.g., `metabase-20260115_143000.jfr`). Data is only written at the end of each 30-minute interval.
- `""` or `"false"` disables monitoring (the default)

The performance recording stores only method signature calls and other code execution metrics.
It does not store any sensitive information such as environment variables, system properties, or other machine information.

### `MB_MONITOR_PERFORMANCE_SAVE_RATE`

Type: integer<br>
Default: mode-specific (5 minutes for single-file mode, 30 minutes for rolling mode)

Override the interval (in minutes) at which JFR recording data is saved to disk. Only applies when [MB_MONITOR_PERFORMANCE](#mb_monitor_performance) is enabled.

- In single-file mode, the default is `5` minutes.
- In rolling directory mode, the default is `30` minutes.

Setting this value overrides the default for whichever mode is active.

### `MB_NO_SURVEYS`

Type: boolean<br>
Default: `false`<br>

Metabase will send a sentiment survey to people who create a number of questions and dashboards to gauge how well the product is doing with respect to making things easy for creators.

Metabase will only send these emails to people who have in the past 2 months:

- Created at least 10 questions total
- Created at least 2 SQL questions
- Created at least 1 dashboard

If you're whitelabeling Metabase, these survey emails will only be sent to admins for that instance who meet that criteria.

If you don't want Metabase to send these emails, set `MB_NO_SURVEYS=true`.

### `MB_NS_TRACE`

Type: string<br>
Default: `""`

Comma-separated namespaces to trace. **WARNING:** Could log sensitive information like database passwords.

### `MB_PASSWORD_COMPLEXITY`

Type: string (`"weak"`, `"normal"`, `"strong"`, `"strong-enough"`)<br>
Default: `"normal"`

Enforce a password complexity rule to increase security for regular logins. This only applies to new users or users that are changing their password. Related [MB_PASSWORD_LENGTH](#mb_password_length)

- `weak` no character constraints
- `normal` at least 1 digit
- `strong` minimum 8 characters w/ 2 lowercase, 2 uppercase, 1 digit, and 1 special character
- `strong-enough` minimum 15 characters

### `MB_PASSWORD_LENGTH`

Type: integer<br>
Default: `6`

Set a minimum password length to increase security for regular logins. This only applies to new users or users that are changing their password. Uses the length of [MB_PASSWORD_COMPLEXITY](#mb_password_complexity) if not set.

### `MB_PLUGINS_DIR`

Type: string<br>
Default: `"plugins"`

Path of the "plugins" directory, which is used to store the Metabase database drivers. The user who is running Metabase should have permission to write to the directory. When running the JAR, the default directory is `plugins`, created in the same location as the JAR file. When running Docker, the default directory is `/plugins`.

The location is where custom third-party drivers should be added. Then Metabase will load the driver on startup, which can be verified in the log.

### `MB_PROMETHEUS_SERVER_PORT`

Type: integer<br>
Default: `null`

Port to serve Prometheus metrics from. If set, Prometheus collectors are registered and served from `localhost:<port>/metrics`.

See [Observability with Prometheus](https://www.metabase.com/docs/latest/installation-and-operation/observability-with-prometheus.md).

### `MB_QP_CACHE_BACKEND`

Type: string<br>
Default: `"db"`

Current cache backend. Dynamically rebindable primarily for test purposes.

### `MB_QUARTZ_MAX_CONNECTION_POOL_SIZE`

Type: integer<br>
Default: `5`<br>
Since: v64.0

Maximum number of connections in the dedicated pool that Metabase's internal task scheduler (Quartz) uses to talk to the application database. This pool is separate from the main application database pool (see [MB_APPLICATION_DB_MAX_CONNECTION_POOL_SIZE](#mb_application_db_max_connection_pool_size)), so scheduled tasks can always reach the application database even when the main pool is fully in use.

Scheduler operations are short, so the default is enough for most deployments. Consider raising it only if you run a very large number of scheduled items (subscriptions, alerts, syncs) and see tasks firing late.

### `MB_SESSION_SECRET_KEY`

Type: string<br>
Default: `null`

When set, session keys are stored in the application database signed with this secret, so a valid session cannot be created or used with database access alone. Requirement: minimum 16 characters. Setting or changing this value logs out all active sessions.

### `MB_SETUP_TOKEN`

Type: string<br>
Default: `null`

An UUID token used to signify that an instance has permissions to create the initial User. This is created upon the first launch of Metabase, by the first instance; once used, it is cleared out, never to be used again.

### `MB_SHOW_LIGHTHOUSE_ILLUSTRATION`

Only available on Metabase [Pro](https://www.metabase.com/product/pro) and [Enterprise](https://www.metabase.com/product/enterprise) plans.<br>
Type: boolean<br>
Default: `true`<br>
Since: v44.0

Display the lighthouse illustration on the home and login pages.

### `MB_JETTY_SKIP_SNI`

Type: string<br>
Default: `"true"`<br>
Since: v48.4

Setting `MB_JETTY_SKIP_SNI=true` (the default setting) turns off the Server Name Indication (SNI) checks in the Jetty web server. Normally you would leave this enabled. If, however, you're terminating the Transport Layer Security (TLS) connection on Metabase itself, and you're getting an error like `HTTP ERROR 400 Invalid SNI`, consider either setting `MB_JETTY_SKIP_SNI=false`, or use another SSL certificate that exactly matches the domain name of the server.

### `MB_SSL_CERTIFICATE_PUBLIC_KEY`

Type: string<br>
Default: `null`

Base-64 encoded public key for this sites SSL certificate. Specify this to enable HTTP Public Key Pinning. Using HPKP is no longer recommended. See https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Certificate_Transparency for more information.
