Self-hosted Sentry supports two layers of configuration:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/getsentry/sentry/llms.txt
Use this file to discover all available pages before exploring further.
- Environment variables in the
.envfile — for secrets and infrastructure settings sentry.conf.py— a Python file for Django-level overridesconfig.yml— a YAML file for Sentry-specific option overrides
self-hosted directory after installation.
Environment variables
The.env file is the primary place to configure your instance. Sentry reads these variables at startup.
Secret key
Database (PostgreSQL)
Redis
SENTRY_REDIS_HOST is not set, Sentry will fail to start.
Email (SMTP)
SENTRY_EMAIL_HOST is not set, Sentry uses a dummy mail backend and no emails are sent.
File storage
By default, Sentry stores uploaded files (attachments, debug symbols, release artifacts) on the local filesystem at/data/files inside the container.
config.yml (see below).
Single organization mode
true to enable single-organization mode, which is the recommended setting for most self-hosted deployments. This enables several UI optimizations for single-tenant installs.
Mailgun (inbound email replies)
If you want to enable inbound email replies using Mailgun:Memcached (optional)
Memcached is an optional secondary cache layer. If configured, Sentry uses it to optimize high-throughput access patterns.config.yml
Theconfig.yml file lets you set Sentry-specific options that are not exposed as environment variables. Key settings:
Mail server
File storage
- Local filesystem
- S3-compatible
Redis clusters
Secret key
You can also set the secret key inconfig.yml instead of as an environment variable:
sentry.conf.py
For Django-level overrides that can’t be expressed via environment variables orconfig.yml, edit sentry.conf.py. This is a standard Python/Django settings file.
Common use cases:
Allowed hosts
Reverse proxy with SSL termination
If Sentry sits behind a reverse proxy that terminates SSL:Web server workers
Tune the number of web workers (defaults to a value based on CPU count):Telemetry (beacon)
Sentry sends anonymous usage data to help improve the product. To disable this:External services
Self-hosted Sentry depends on the following external services:| Service | Purpose |
|---|---|
| PostgreSQL | Primary database — stores all Sentry data |
| Redis | Caching, queuing, rate limiting, buffers |
| Kafka | Message bus for event ingestion pipeline |
| ClickHouse (via Snuba) | Event storage and aggregation queries |
| Relay | Event ingestion and filtering |
getsentry/self-hosted. If you want to use externally managed versions of any service (for example, a managed PostgreSQL database), update the relevant environment variables to point to your external endpoints.
Applying configuration changes
After editing.env, config.yml, or sentry.conf.py, restart all services to apply the changes: