A production-ready Docker setup for GlitchTip - an open-source error tracking system compatible with Sentry SDKs.
- Latest GlitchTip (v4.2.5) with a complete Docker Compose setup
- PostgreSQL 17 database with proper health checks
- Valkey (Redis-compatible) key-value store for caching and messaging
- Nginx reverse proxy with proper configuration
- JSON logging with rotation (10 files, 1MB each)
- Resource limits to prevent container memory issues
- Complete environment variable configuration
- Production-ready defaults with customization options
-
Clone this repository:
git clone https://github.com/SyntaxArc/GlitchTipForge.git cd GlitchTipForge -
Create Nginx configuration:
mkdir -p nginx/conf.d
-
Create the Nginx configuration file
nginx/conf.d/glitchtip.conf:server { server_name glitchtip.example.com; access_log /var/log/nginx/access.log; client_max_body_size 40M; location / { proxy_pass http://web:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }
-
(Optional) Create a
.envfile for customization:# Security SECRET_KEY=your-secure-random-key-here POSTGRES_PASSWORD=strong-postgres-password # Domain configuration GLITCHTIP_DOMAIN=https://glitchtip.yourdomain.com DEFAULT_FROM_EMAIL=glitchtip@yourdomain.com # Retention settings GLITCHTIP_MAX_EVENT_LIFE_DAYS=30 # Registration settings ENABLE_USER_REGISTRATION=False ENABLE_ORGANIZATION_CREATION=False -
Start the services:
docker-compose up -d
| Variable | Default | Description |
|---|---|---|
SECRET_KEY |
change_me_to_something_random |
Django secret key (generate with openssl rand -hex 32) |
POSTGRES_PASSWORD |
postgres |
PostgreSQL password |
GLITCHTIP_DOMAIN |
http://localhost |
Public domain for GlitchTip |
DEFAULT_FROM_EMAIL |
email@example.com |
Sender email for notifications |
EXTERNAL_PORT |
80 |
External HTTP port for Nginx |
EXTERNAL_SSL_PORT |
443 |
External HTTPS port for Nginx |
GLITCHTIP_MAX_EVENT_LIFE_DAYS |
14 |
Event retention period in days |
ENABLE_USER_REGISTRATION |
False |
Allow public user registration |
ENABLE_ORGANIZATION_CREATION |
False |
Allow users to create organizations |
GlitchTip includes configurable data retention settings:
GLITCHTIP_MAX_EVENT_LIFE_DAYS- Default: 14 daysGLITCHTIP_MAX_TRANSACTION_EVENT_LIFE_DAYS- Defaults to max event life daysGLITCHTIP_MAX_FILE_LIFE_DAYS- Defaults to max event life days
Worker and web server performance can be tuned with:
UWSGI_WORKERS- Number of web workersUWSGI_CHEAPER- Minimum number of web workers when scalingUWSGI_CHEAPER_INITIAL- Initial number of web workers when scalingCELERY_WORKER_CONCURRENCY- Number of concurrent celery workersCELERY_WORKER_AUTOSCALE- Min,max concurrency scaling (e.g., "1,3")
For production use, you should configure SSL. You can either:
-
Use a reverse proxy like Traefik or a load balancer to handle SSL
-
Configure Nginx with SSL certificates:
mkdir -p nginx/ssl # Copy your SSL certificates cp yourdomain.crt nginx/ssl/ cp yourdomain.key nginx/ssl/Then update your Nginx configuration to use SSL.
- Always change default passwords and secret keys
- Set up SSL for secure communications
- Consider using a managed PostgreSQL instance for critical deployments
- Configure proper backup solutions for volumes
- Monitor container resource usage and adjust limits as needed
If you're seeing errors with the Celery worker, ensure CELERY_WORKER_AUTOSCALE is formatted correctly (without quotes).
If the GlitchTip services can't connect to the database, check:
- PostgreSQL service is running and healthy
POSTGRES_PASSWORDmatches in both PostgreSQL and GlitchTip services
If Nginx isn't proxying requests correctly:
- Ensure the
webservice is running - Check that the Nginx configuration is correctly mounted
- Verify that the server_name matches your domain
Contributions to GlitchTipForge are welcome! Please feel free to submit a Pull Request.
This project is released into the public domain under the Unlicense. For more information, please refer to https://unlicense.org
- GlitchTip - For creating the original error tracking software