From a6a34edc390fd796368283efb81fbcd841b45a75 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 06:25:51 +0000 Subject: [PATCH 1/2] docs: add per-organization export limits admin reference --- docs.json | 1 + references/workspace/export-limits.mdx | 49 +++++++++++++++++++ .../environment-variables.mdx | 5 +- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 references/workspace/export-limits.mdx diff --git a/docs.json b/docs.json index 15691dd7..4f7d43b1 100644 --- a/docs.json +++ b/docs.json @@ -263,6 +263,7 @@ "references/workspace/user-impersonation", "references/workspace/support-impersonation", "references/workspace/managing-your-organization", + "references/workspace/export-limits", "references/workspace/how-to-create-multiple-projects", "references/workspace/customizing-the-appearance-of-your-project", "references/workspace/adding-slack-integration", diff --git a/references/workspace/export-limits.mdx b/references/workspace/export-limits.mdx new file mode 100644 index 00000000..8b920f30 --- /dev/null +++ b/references/workspace/export-limits.mdx @@ -0,0 +1,49 @@ +--- +title: "Export limits" +description: "Override the instance-wide query row and CSV/Excel cell limits on a per-organization basis from your admin settings." +--- + +The **Export limits** panel lets organization admins raise or lower the two values that bound how much data a query can return and how large a CSV or Excel export can be. Without an override, every organization inherits the instance defaults set by `LIGHTDASH_QUERY_MAX_LIMIT` and `LIGHTDASH_CSV_CELLS_LIMIT`. + +Use this panel when a specific team needs to run wider or longer queries than the rest of the instance — for example, a single org on shared Cloud infrastructure that needs to export an 8M-cell CSV while keeping other orgs at the default. + + + The panel is gated behind the `pro-limits` feature flag. Enforcement of any stored override is always active — only writing the limits requires the flag. Contact Lightdash to enable it for your organization, or self-hosters can set `LIGHTDASH_ENABLE_FEATURE_FLAGS=pro-limits`. + + +## What you can configure + +| Setting | What it controls | Inherits from | +| --- | --- | --- | +| **Maximum query rows** | The largest row limit a user can request from the explorer, SQL runner, or API. | `LIGHTDASH_QUERY_MAX_LIMIT` | +| **Maximum CSV/Excel cells** | The largest CSV or Excel export (rows × columns) before results are truncated. | `LIGHTDASH_CSV_CELLS_LIMIT` | + +Both fields accept a positive integer. Leave a field empty to inherit the instance default. + +The CSV/Excel cells value is capped server-side at the higher of `LIGHTDASH_CSV_MAX_LIMIT` (default 5,000,000) and the current `LIGHTDASH_CSV_CELLS_LIMIT`. The query rows value cannot exceed `LIGHTDASH_QUERY_MAX_LIMIT`. The panel shows the active ceiling next to each input. + +The two limits are independent — raising the query-row limit does not change CSV export size, and vice versa. + +## Set per-organization limits + +1. Go to **Settings → Organization → Export limits**. +2. Enter a value for **Maximum query rows**, **Maximum CSV/Excel cells**, or both. +3. Click **Save**. + +To revert to the instance default, clear the field and save. + +Changes take effect immediately for new queries and exports. Existing scheduled deliveries pick up the new limit on their next run. + +## How limits are enforced + +| Surface | Behavior | +| --- | --- | +| Explorer and SQL runner row-limit selector | Maximum value is clamped to the org's effective query row limit. | +| CSV and Excel downloads from charts, dashboards, and underlying data | Truncated to the org's effective cell limit, with a banner shown when truncation happens. | +| Scheduled deliveries (CSV, Google Sheets, Excel) | Use the org's effective cell limit at run time. | +| API responses for `/api/v1/org/settings` | Return the resolved effective values, falling back to the instance defaults when no override is set. | + +## Related + +- [Environment variables](/self-host/customize-deployment/environment-variables) — the instance defaults that act as fallbacks. +- [Scheduled deliveries](/guides/how-to-create-scheduled-deliveries) — affected by the CSV/Excel cell limit. diff --git a/self-host/customize-deployment/environment-variables.mdx b/self-host/customize-deployment/environment-variables.mdx index 39df3b55..971a43eb 100644 --- a/self-host/customize-deployment/environment-variables.mdx +++ b/self-host/customize-deployment/environment-variables.mdx @@ -27,7 +27,7 @@ This is a reference to all environment variables that can be used to configure a | `INTERNAL_LIGHTDASH_HOST` | Internal Lightdash host for the Headless browser to send requests when your Lightdash instance is not accessible from the Internet. Needs to support `https` if `SECURE_COOKIES=true` (default=Same as `SITE_URL`) | | `INTERNAL_LIGHTDASH_HOST_IGNORE_HTTPS_ERRORS`| When `true`, skips TLS certificate validation on screenshot traffic going to `INTERNAL_LIGHTDASH_HOST`. Use this if you need to terminate TLS in front of Lightdash on a fully internal hostname with a self-signed or otherwise untrusted certificate. Opt-in, default `false`. **Security trade-off:** disables TLS validation for that traffic, so only enable it when the network path is trusted (e.g. cluster-internal). See [Run Lightdash on a fully internal HTTPS network](/self-host/customize-deployment/enable-headless-browser-for-lightdash#run-lightdash-on-a-fully-internal-https-network). | | `STATIC_IP` | Server static IP so users can add the IP to their warehouse allow-list. (default=http://localhost:8080) | -| `LIGHTDASH_QUERY_MAX_LIMIT` | Query max rows limit (default=5000) | +| `LIGHTDASH_QUERY_MAX_LIMIT` | Query max rows limit (default=5000). Organization admins can override this per-org from the [Export limits](/references/workspace/export-limits) panel. | | `LIGHTDASH_QUERY_DEFAULT_LIMIT` | Default number of rows to return in a query (default=500) | | `LIGHTDASH_QUERY_MAX_PAGE_SIZE` | Maximum page size for paginated queries (default=2500) | | `SCHEDULER_ENABLED` | Enables/Disables the scheduler worker that triggers the scheduled deliveries. (default=true) | @@ -36,7 +36,8 @@ This is a reference to all environment variables that can be used to configure a | `SCHEDULER_SCREENSHOT_TIMEOUT` | Timeout in milliseconds for taking screenshots | | `SCHEDULER_INCLUDE_TASKS` | Comma-separated list of scheduler tasks to include | | `SCHEDULER_EXCLUDE_TASKS` | Comma-separated list of scheduler tasks to exclude | -| `LIGHTDASH_CSV_CELLS_LIMIT` | Max cells on CSV file exports (default=100000) | +| `LIGHTDASH_CSV_CELLS_LIMIT` | Max cells on CSV and Excel exports (default=100000). Organization admins can override this per-org from the [Export limits](/references/workspace/export-limits) panel. | +| `LIGHTDASH_CSV_MAX_LIMIT` | Server-side ceiling on the per-org CSV/Excel cell limit an admin can configure in the [Export limits](/references/workspace/export-limits) panel (default=5000000). | | `LIGHTDASH_CHART_VERSION_HISTORY_DAYS_LIMIT` | Configure how far back the chart versions history goes in days (default=3) | | `LIGHTDASH_PIVOT_TABLE_MAX_COLUMN_LIMIT` | Configure maximum number of columns in pivot table (default=200) | | `GROUPS_ENABLED` | Enables/Disables groups functionality (default=false) | From ba7caed90bc187c69480e3af5c9bf3ea88391b63 Mon Sep 17 00:00:00 2001 From: Javier Rengel Date: Mon, 15 Jun 2026 12:25:05 +0200 Subject: [PATCH 2/2] M self-host/customize-deployment/environment-variables.mdx --- .../environment-variables.mdx | 197 +++++++++++++----- 1 file changed, 146 insertions(+), 51 deletions(-) diff --git a/self-host/customize-deployment/environment-variables.mdx b/self-host/customize-deployment/environment-variables.mdx index 2e2bcd27..92ab57f2 100644 --- a/self-host/customize-deployment/environment-variables.mdx +++ b/self-host/customize-deployment/environment-variables.mdx @@ -9,57 +9,152 @@ mode: "wide" This is a reference to all environment variables that can be used to configure a Lightdash deployment. -| Variable | Description | -| :------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `PGHOST` | **(Required)** Hostname of postgres server to store Lightdash data | -| `PGPORT` | **(Required)** Port of postgres server to store Lightdash data | -| `PGUSER` | **(Required)** Username of postgres user to access postgres server to store Lightdash data | -| `PGPASSWORD` | **(Required)** Password for PGUSER | -| `PGDATABASE` | **(Required)** Database name inside postgres server to store Lightdash data | -| `PGCONNECTIONURI` | Connection URI for postgres server to store Lightdash data in the format postgresql://user:password@host:port/db?params. This is an alternative to providing the previous PG variables. | -| `PGMAXCONNECTIONS` | Maximum number of connections to the database | -| `PGMINCONNECTIONS` | Minimum number of connections to the database | -| `LIGHTDASH_SECRET` | **(Required)** Secret key used to secure various tokens in Lightdash. This **must** be fixed between deployments. If the secret changes, you won't have access to Lightdash data. | -| `SECURE_COOKIES` | Only allows cookies to be stored over a https connection. We use cookies to keep you logged in. This is recommended to be set to true in production. (default=false) | -| `COOKIES_MAX_AGE_HOURS` | How many hours a user session exists before the user is automatically signed out. For example if 24, then the user will be automatically after 24 hours of inactivity. | -| `TRUST_PROXY` | This tells the Lightdash server that it can trust the X-Forwarded-Proto header it receives in requests. This is useful if you use `SECURE_COOKIES=true` behind a HTTPS terminated proxy that you can trust. (default=false) | -| `SITE_URL` | Site url where Lightdash is being hosted. It should include the protocol. E.g https://lightdash.mycompany.com (default=http://localhost:8080) | -| `INTERNAL_LIGHTDASH_HOST` | Internal Lightdash host for the Headless browser to send requests when your Lightdash instance is not accessible from the Internet. Needs to support `https` if `SECURE_COOKIES=true` (default=Same as `SITE_URL`) | -| `INTERNAL_LIGHTDASH_HOST_IGNORE_HTTPS_ERRORS`| When `true`, skips TLS certificate validation on screenshot traffic going to `INTERNAL_LIGHTDASH_HOST`. Use this if you need to terminate TLS in front of Lightdash on a fully internal hostname with a self-signed or otherwise untrusted certificate. Opt-in, default `false`. **Security trade-off:** disables TLS validation for that traffic, so only enable it when the network path is trusted (e.g. cluster-internal). See [Run Lightdash on a fully internal HTTPS network](/self-host/customize-deployment/enable-headless-browser-for-lightdash#run-lightdash-on-a-fully-internal-https-network). | -| `STATIC_IP` | Server static IP so users can add the IP to their warehouse allow-list. (default=http://localhost:8080) | -| `LIGHTDASH_QUERY_MAX_LIMIT` | Query max rows limit (default=5000). Organization admins can override this per-org from the [Export limits](/references/workspace/export-limits) panel. | -| `LIGHTDASH_QUERY_DEFAULT_LIMIT` | Default number of rows to return in a query (default=500) | -| `LIGHTDASH_QUERY_MAX_PAGE_SIZE` | Maximum page size for paginated queries (default=2500) | -| `SCHEDULER_ENABLED` | Enables/Disables the scheduler worker that triggers the scheduled deliveries. (default=true) | -| `SCHEDULER_CONCURRENCY` | How many scheduled delivery jobs can be processed concurrently. (default=3) | -| `SCHEDULER_JOB_TIMEOUT` | After how many milliseconds the job should be timeout so the scheduler worker can pick other jobs. (default=600000, 10 minutes) | -| `SCHEDULER_SCREENSHOT_TIMEOUT` | Timeout in milliseconds for taking screenshots | -| `SCHEDULER_INCLUDE_TASKS` | Comma-separated list of scheduler tasks to include | -| `SCHEDULER_EXCLUDE_TASKS` | Comma-separated list of scheduler tasks to exclude | -| `LIGHTDASH_CSV_CELLS_LIMIT` | Max cells on CSV and Excel exports (default=100000). Organization admins can override this per-org from the [Export limits](/references/workspace/export-limits) panel. | -| `LIGHTDASH_CSV_MAX_LIMIT` | Server-side ceiling on the per-org CSV/Excel cell limit an admin can configure in the [Export limits](/references/workspace/export-limits) panel (default=5000000). | -| `LIGHTDASH_CHART_VERSION_HISTORY_DAYS_LIMIT` | Configure how far back the chart versions history goes in days (default=3) | -| `LIGHTDASH_PIVOT_TABLE_MAX_COLUMN_LIMIT` | Configure maximum number of columns in pivot table (default=200) | -| `GROUPS_ENABLED` | Enables/Disables groups functionality (default=false) | -| `CUSTOM_VISUALIZATIONS_ENABLED` | Enables/Disables custom chart functionality (default=false) | -| `LIGHTDASH_MAX_PAYLOAD` | Maximum HTTP request body size (default=5mb) | -| `LIGHTDASH_LICENSE_KEY` | License key for Lightdash Enterprise Edition. See [Enterprise License Keys](/self-host/customize-deployment/enterprise-license-keys) for details. [Get your license key](https://calendly.com/lightdash-cloud/enterprise?utm_source=docs&utm_medium=referral&utm_campaign=enterprise_licensing&utm_content=license_key_cta) | -| `HEADLESS_BROWSER_HOST` | Hostname for the headless browser | -| `HEADLESS_BROWSER_PORT` | Port for the headless browser (default=3001) | -| `ALLOW_MULTIPLE_ORGS` | If set to `true`, new users registering on Lightdash will have their own organization, separated from others (default=false) | -| `LIGHTDASH_MODE` | Mode for Lightdash (default, demo, pr, etc.) (default=default) | -| `DISABLE_PAT` | Disables Personal Access Tokens (default=false) | -| `PAT_ALLOWED_ORG_ROLES` | Comma-separated list of organization roles allowed to use Personal Access Tokens (default=All roles) | -| `PAT_MAX_EXPIRATION_TIME_IN_DAYS` | Maximum expiration time in days for Personal Access Tokens | -| `MAX_DOWNLOADS_AS_CODE` | Maximum number of downloads as code (default=100) | -| `EXTENDED_USAGE_ANALYTICS` | When `true`, adds "Dashboard views (top 20)" and "Chart views (top 20)" tables to the [User Activity dashboard](/references/workspace/usage-analytics#user-activity-dashboard) in Project Settings > Usage Analytics. (default=false) | -| `USE_SECURE_BROWSER` | Use secure WebSocket connections for headless browser (default=false) | -| `DISABLE_DASHBOARD_COMMENTS` | Disables dashboard comments (default=false) | -| `ORGANIZATION_WAREHOUSE_CREDENTIALS_ENABLED` | Enables organization warehouse settings (default=false) | -| `HEADWAY_ENABLED` | Enables the Headway changelogs widget in the Lightdash menu (default=true) | -| `SAVED_METRICS_TREE_ENABLED` | Enables [Saved Trees](https://docs.lightdash.com/guides/metrics-catalog/canvas#saved-trees) in the Metrics Canvas view (default=false) | - -Lightdash also accepts all [standard postgres environment variables](https://www.postgresql.org/docs/9.3/libpq-envars.html) +## Postgres database + +These variables configure the Postgres database Lightdash uses to store its own application data (not your warehouse). + +| Variable | Description | +| :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `PGHOST` | **(Required)** Hostname of postgres server to store Lightdash data | +| `PGPORT` | **(Required)** Port of postgres server to store Lightdash data | +| `PGUSER` | **(Required)** Username of postgres user to access postgres server to store Lightdash data | +| `PGPASSWORD` | **(Required)** Password for PGUSER | +| `PGDATABASE` | **(Required)** Database name inside postgres server to store Lightdash data | +| `PGCONNECTIONURI` | Connection URI for postgres server to store Lightdash data in the format postgresql://user:password@host:port/db?params. This is an alternative to providing the previous PG variables. | +| `PGMAXCONNECTIONS` | Maximum number of connections to the database | +| `PGMINCONNECTIONS` | Minimum number of connections to the database | + +Lightdash also accepts all [standard postgres environment variables](https://www.postgresql.org/docs/9.3/libpq-envars.html). + +## Server and networking + +Core variables that control how the Lightdash server runs, how it's reached, and how sessions and cookies behave. + +| Variable | Description | +| :-------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `PORT` | Port the Lightdash backend listens on (default=8080) | +| `SITE_URL` | Site url where Lightdash is being hosted. It should include the protocol. E.g https://lightdash.mycompany.com (default=http://localhost:8080) | +| `INTERNAL_LIGHTDASH_HOST` | Internal Lightdash host for the Headless browser to send requests when your Lightdash instance is not accessible from the Internet. Needs to support `https` if `SECURE_COOKIES=true` (default=Same as `SITE_URL`) | +| `INTERNAL_LIGHTDASH_HOST_IGNORE_HTTPS_ERRORS` | When `true`, skips TLS certificate validation on screenshot traffic going to `INTERNAL_LIGHTDASH_HOST`. Use this if you need to terminate TLS in front of Lightdash on a fully internal hostname with a self-signed or otherwise untrusted certificate. Opt-in, default `false`. **Security trade-off:** disables TLS validation for that traffic, so only enable it when the network path is trusted (e.g. cluster-internal). See [Run Lightdash on a fully internal HTTPS network](/self-host/customize-deployment/enable-headless-browser-for-lightdash#run-lightdash-on-a-fully-internal-https-network). | +| `STATIC_IP` | Server static IP so users can add the IP to their warehouse allow-list. (default=http://localhost:8080) | +| `LIGHTDASH_SECRET` | **(Required)** Secret key used to secure various tokens in Lightdash. This **must** be fixed between deployments. If the secret changes, you won't have access to Lightdash data. | +| `SECURE_COOKIES` | Only allows cookies to be stored over a https connection. We use cookies to keep you logged in. This is recommended to be set to true in production. (default=false) | +| `COOKIES_MAX_AGE_HOURS` | How many hours a user session exists before the user is automatically signed out. For example if 24, then the user will be automatically after 24 hours of inactivity. | +| `TRUST_PROXY` | This tells the Lightdash server that it can trust the X-Forwarded-Proto header it receives in requests. This is useful if you use `SECURE_COOKIES=true` behind a HTTPS terminated proxy that you can trust. (default=false) | +| `LIGHTDASH_MAX_PAYLOAD` | Maximum HTTP request body size (default=5mb) | +| `LIGHTDASH_MODE` | Mode for Lightdash (default, demo, pr, etc.) (default=default) | +| `ALLOW_MULTIPLE_ORGS` | If set to `true`, new users registering on Lightdash will have their own organization, separated from others (default=false) | + +## Licensing + +| Variable | Description | +| :---------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `LIGHTDASH_LICENSE_KEY` | License key for Lightdash Enterprise Edition. See [Enterprise License Keys](/self-host/customize-deployment/enterprise-license-keys) for details. [Get your license key](https://calendly.com/lightdash-cloud/enterprise?utm_source=docs&utm_medium=referral&utm_campaign=enterprise_licensing&utm_content=license_key_cta) | + +## Query limits and behavior + +Control how many rows a query can return, page sizes, exports, and chart-version retention. + +| Variable | Description | +| :------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `LIGHTDASH_QUERY_MAX_LIMIT` | Query max rows limit (default=5000) | +| `LIGHTDASH_QUERY_DEFAULT_LIMIT` | Default number of rows to return in a query (default=500) | +| `LIGHTDASH_QUERY_MAX_PAGE_SIZE` | Maximum page size for paginated queries (default=2500) | +| `LIGHTDASH_QUERY_RETRY_ON_TRANSIENT_ERRORS` | When `true`, the frontend automatically retries failed queries on transient errors (5xx server responses and network errors) up to 3 times with exponential backoff (1s, 2s, 4s). 4xx client errors are never retried. Useful for instances where warehouse connections occasionally drop or the backend is briefly overwhelmed. (default=false) | +| `LIGHTDASH_PIVOT_TABLE_MAX_COLUMN_LIMIT` | Configure maximum number of columns in pivot table (default=200) | +| `LIGHTDASH_CSV_CELLS_LIMIT` | Max cells on CSV file exports (default=100000) | +| `LIGHTDASH_CHART_VERSION_HISTORY_DAYS_LIMIT` | Configure how far back the chart versions history goes in days (default=3) | +| `MAX_DOWNLOADS_AS_CODE` | Maximum number of downloads as code (default=100) | + +## Scheduler + +Variables that control the scheduler worker and background cleanup jobs. + +| Variable | Description | +| :------------------------------- | :------------------------------------------------------------------------------------------------------------------------------ | +| `SCHEDULER_ENABLED` | Enables/Disables the scheduler worker that triggers the scheduled deliveries. (default=true) | +| `SCHEDULER_CONCURRENCY` | How many scheduled delivery jobs can be processed concurrently. (default=3) | +| `SCHEDULER_JOB_TIMEOUT` | After how many milliseconds the job should be timeout so the scheduler worker can pick other jobs. (default=600000, 10 minutes) | +| `SCHEDULER_SCREENSHOT_TIMEOUT` | Timeout in milliseconds for taking screenshots | +| `SCHEDULER_INCLUDE_TASKS` | Comma-separated list of scheduler tasks to include | +| `SCHEDULER_EXCLUDE_TASKS` | Comma-separated list of scheduler tasks to exclude | +| `SCHEDULER_POLL_INTERVAL` | Polling interval in milliseconds for the scheduler worker to check for new jobs. | +| `QUERY_HISTORY_CLEANUP_ENABLED` | Enables the background job that periodically deletes old query-history rows. (default=true) | +| `QUERY_HISTORY_CLEANUP_SCHEDULE` | Cron expression controlling how often query history is cleaned up. | + +## Headless browser + +Configure the headless browser used for screenshots and PDF exports. + +| Variable | Description | +| :---------------------------------------- | :----------------------------------------------------------------------------------------------- | +| `HEADLESS_BROWSER_HOST` | Hostname for the headless browser | +| `HEADLESS_BROWSER_PORT` | Port for the headless browser (default=3001) | +| `HEADLESS_BROWSER_MAX_SCREENSHOT_RETRIES` | Maximum number of times the scheduler retries a failed screenshot before giving up. (default=5) | +| `HEADLESS_BROWSER_RETRY_BASE_DELAY_MS` | Base delay in milliseconds for exponential-backoff retries on failed screenshots. (default=3000) | +| `USE_SECURE_BROWSER` | Use secure WebSocket connections for headless browser (default=false) | + +## Personal access tokens + +Variables that control PAT availability and lifetime. + +| Variable | Description | +| :-------------------------------- | :--------------------------------------------------------------------------------------------------- | +| `DISABLE_PAT` | Disables Personal Access Tokens (default=false) | +| `PAT_ALLOWED_ORG_ROLES` | Comma-separated list of organization roles allowed to use Personal Access Tokens (default=All roles) | +| `PAT_MAX_EXPIRATION_TIME_IN_DAYS` | Maximum expiration time in days for Personal Access Tokens | + +## Timezone and localization + +| Variable | Description | +| :-------------------------------------- | :------------------------------------------------------------------------------------------------ | +| `LIGHTDASH_QUERY_TIMEZONE` | Instance-wide default timezone applied to queries when a user/project has no override. | +| `LIGHTDASH_ENABLE_TIMEZONE_SUPPORT` | Enables per-query timezone support. Defaults to `true` on Lightdash Cloud, `false` self-hosted. | +| `LIGHTDASH_ENABLE_IMPROVED_EXCEL_DATES` | When `true`, exports timestamps to Excel as native date cells instead of strings. (default=false) | + +## Soft delete + +Configure whether deletions are soft (recoverable) and for how long. + +| Variable | Description | +| :--------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `SOFT_DELETE_ENABLED` | When `true`, deleting charts, dashboards, spaces, saved SQL, schedulers, and data apps marks them as soft-deleted instead of removing them immediately. Soft-deleted items can be restored or permanently deleted later. (default=false) | +| `SOFT_DELETE_RETENTION_DAYS` | Number of days soft-deleted items are retained before becoming eligible for permanent cleanup. Only applies when `SOFT_DELETE_ENABLED=true`. (default=30) | + +## Custom metrics + +| Variable | Description | +| :------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `LIGHTDASH_CUSTOM_METRICS_CONFIG_PATH` | Filesystem path to a YAML config defining instance-level custom metrics surfaced in the metrics catalog. Also accepted as `CUSTOM_METRICS_CONFIG_PATH`. | + +## UI customization + +Replace default URLs and tweak in-product UI surfaces. + +| Variable | Description | +| :-------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------- | +| `SIGNUP_URL` | Overrides the URL the login page links to for new sign-ups. Useful on instances that gate sign-up behind a custom flow. | +| `HELP_MENU_URL` | Replaces the default help-menu link in the Lightdash UI with your own support/runbook URL. | +| `HEADWAY_ENABLED` | Enables the Headway changelogs widget in the Lightdash menu (default=true) | +| `LIGHTDASH_DASHBOARD_DISABLE_SENTRY_TRACKING` | When `true`, suppresses Sentry tracking on the embedded dashboard frame. (default=false) | + +## Feature toggles + +Enable or disable individual product features across the instance. + +| Variable | Description | +| :------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `GROUPS_ENABLED` | Enables/Disables groups functionality (default=false) | +| `CUSTOM_VISUALIZATIONS_ENABLED` | Enables/Disables custom chart functionality (default=false) | +| `EXTENDED_USAGE_ANALYTICS` | When `true`, adds "Dashboard views (top 20)" and "Chart views (top 20)" tables to the [User Activity dashboard](/references/workspace/usage-analytics#user-activity-dashboard) in Project Settings > Usage Analytics. (default=false) | +| `DISABLE_DASHBOARD_COMMENTS` | Disables dashboard comments (default=false) | +| `ORGANIZATION_WAREHOUSE_CREDENTIALS_ENABLED` | Enables organization warehouse settings (default=false) | +| `SAVED_METRICS_TREE_ENABLED` | Enables [Saved Trees](https://docs.lightdash.com/guides/metrics-catalog/canvas#saved-trees) in the Metrics Canvas view (default=false) | +| `EDIT_YAML_IN_UI_ENABLED` | Enables the in-UI YAML editor for tables and metrics. (default=false) | +| `ECHARTS_V6_ENABLED` | Opt into the ECharts v6 renderer. (default=false) | +| `FUNNEL_BUILDER_ENABLED` | Enables the funnel chart builder. (default=false) | +| `SAVE_CREDENTIALS_FORM_ENABLED` | Enables the "save credentials" form so warehouse credentials can be stored per-user. (default=false) | +| `PARTIAL_COMPILATION_ENABLED` | Compile only changed dbt models when refreshing a project. (default=true) | ## Feature flags