Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions self-host/customize-deployment/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ These variables allow you to configure [S3 Object Storage](/self-host/customize-
| `RESULTS_S3_REGION` | Region where the S3 query storage bucket is located (default=S3_REGION) |
| `RESULTS_S3_ACCESS_KEY` | Access key for authenticating with the S3 query storage bucket (default=S3_ACCESS_KEY) |
| `RESULTS_S3_SECRET_KEY` | Secret key for authenticating with the S3 query storage bucket (default=S3_SECRET_KEY) |
| `PERSISTENT_DOWNLOAD_URLS_ENABLED` | Enables persistent download URLs for CSV and dashboard exports. When enabled, downloads return a stable Lightdash-hosted URL instead of a direct S3 signed URL. Each time the persistent URL is accessed, a fresh S3 signed URL is generated on the fly. (default=false) |
| `PERSISTENT_DOWNLOAD_URL_EXPIRATION_SECONDS` | How long persistent download URLs remain accessible before expiring. Each access within this window generates a fresh S3 signed URL. (default=259200, 3 days) |

### Persistent download URLs

When `PERSISTENT_DOWNLOAD_URLS_ENABLED` is set to `true`, CSV and dashboard ZIP exports return a stable Lightdash-hosted URL (e.g. `https://lightdash.example.com/api/v1/file/{id}`) instead of a direct S3 signed URL. Each time this URL is accessed, Lightdash generates a short-lived S3 signed URL and redirects to it. This means:

- The underlying S3 URL never goes stale and download links survive IAM credential rotation
- The persistent URL itself remains accessible for the duration set by `PERSISTENT_DOWNLOAD_URL_EXPIRATION_SECONDS` (default: 3 days), after which it returns a "download link has expired" error

## Cache

Expand Down