Self-Host GlitchTip for Django Error Tracking

Run GlitchTip, the open-source Sentry-compatible error tracker, for Django: deploy it with PostgreSQL and Redis, point the standard sentry-sdk at a GlitchTip DSN, set up uptime checks and alerts, manage event retention, and keep it secure.

Problem statement

You want error tracking for Django, with grouped exceptions, stack traces, and alerts, but Sentry's hosted pricing does not fit, self-hosted Sentry needs a large server and many services, or data must stay on your infrastructure. GlitchTip is an open-source error tracker that accepts events from Sentry SDKs. It is itself a Django app with PostgreSQL and Redis, light enough for a small VPS.

GlitchTip for DjangoYour Django appsentry-sdkDSNpoints at GlitchTipGlitchTipweb + workerAlertsemail, webhooksYour app keeps using sentry-sdk; only the DSN host changes.
  1. Deploy GlitchTip with its Docker Compose file (web, worker, PostgreSQL, Redis) behind HTTPS.
  2. Set SECRET_KEY, GLITCHTIP_DOMAIN, DEFAULT_FROM_EMAIL, and an email backend so alerts and invites work.
  3. Create an organization and project; copy the DSN.
  4. In your Django app, keep sentry-sdk and set dsn to the GlitchTip DSN; disable features GlitchTip does not support.
  5. Configure retention (GLITCHTIP_MAX_EVENT_LIFE_DAYS), alerts, and uptime monitors; back up its database.

Step-by-step solution

1. Deploy GlitchTip

GlitchTip publishes a Compose example. The essentials:

services:
  web:
    image: glitchtip/glitchtip:latest
    depends_on: [postgres, redis]
    env_file: glitchtip.env
    ports: ["127.0.0.1:8000:8000"]
  worker:
    image: glitchtip/glitchtip:latest
    command: ./bin/run-celery-with-beat.sh
    env_file: glitchtip.env
  migrate:
    image: glitchtip/glitchtip:latest
    command: ./manage.py migrate
    env_file: glitchtip.env
  postgres:
    image: postgres:17
    environment: { POSTGRES_PASSWORD: "${PG_PASSWORD}", POSTGRES_DB: glitchtip }
    volumes: [pg-data:/var/lib/postgresql/data]
  redis:
    image: redis:7
volumes: { pg-data: {} }

Pin an image version rather than latest once you are set up. Put Nginx or Caddy in front for TLS. Check GlitchTip's documentation for the current command names.

2. Configure it

SECRET_KEY=<random>
DATABASE_URL=postgres://postgres:...@postgres:5432/glitchtip
REDIS_URL=redis://redis:6379/0
GLITCHTIP_DOMAIN=https://errors.example.com
DEFAULT_FROM_EMAIL=errors@example.com
EMAIL_URL=smtp+tls://user:pass@smtp.example.com:587
ENABLE_USER_REGISTRATION=False
GLITCHTIP_MAX_EVENT_LIFE_DAYS=30

Disable open registration after creating your account so strangers cannot sign up. GLITCHTIP_DOMAIN must match the public URL, or DSNs and links will be wrong.

what you get and what you runGlitchTipSentrySDKsentry-sdksentry-sdkError groupingyesyes, richerPerformance tracesbasicfullSelf-host sizesmall VPSmany servicesUptime checksbuilt inseparate productGlitchTip covers core error tracking with far less to operatedjango-deployment.com
Switching between them later only changes the DSN.

3. Point Django at GlitchTip

import sentry_sdk

sentry_sdk.init(
    dsn=os.environ["SENTRY_DSN"],     # https://<key>@errors.example.com/1
    environment="production",
    release=os.environ.get("GIT_SHA"),
    traces_sample_rate=0.0,           # or a small value; GlitchTip supports basic transactions
    send_default_pii=False,
)

The standard Django integration, logging integration, and Celery integration all work. Features such as session replay and profiling are Sentry-specific and should stay off.

4. Alerts and uptime

In each project, add alert recipients by email or webhook (Slack, Discord, Microsoft Teams via webhooks). GlitchTip also includes uptime monitors: add an HTTP check for your site's health endpoint so outages appear next to errors.

5. Operate it

GlitchTip stores events in PostgreSQL. Retention settings delete old events through its Celery worker; make sure the worker runs, or the database grows without limit. Back up the database like any production app, and keep GlitchTip on a different server or provider from the app it monitors, so an outage does not take both down.

from install to first alert1Deploy web, worker, DB, Redisbehind HTTPS2Create admin, close signupsENABLE_USER_REGISTRATION3Create project, copy DSNper environment4Set SENTRY_DSN in the appsentry-sdk unchanged5Send a test erroralert arrivesMost of the work is running GlitchTip itself; the app changes one settingdjango-deployment.com
Host the tracker away from the app it watches.

Explanation

Sentry SDKs send events to whatever host the DSN names, using a documented ingestion API. GlitchTip implements that API, groups events into issues, and notifies you. Because it is a regular Django application with Celery, its resource needs are modest compared with self-hosted Sentry, which runs Kafka, ClickHouse, and many services. The trade-off is fewer advanced features, particularly in performance monitoring.

Edge cases / notes

  • Event volume. A runaway error loop can flood the database; set rate limits per project and keep retention short.
  • Source maps and frontend. GlitchTip accepts JavaScript errors from the browser SDK too; upload source maps if you use them.
  • Hosted option. GlitchTip also offers a hosted service if you want its pricing without running it.

Next steps

FAQ

Does GlitchTip work with sentry-sdk?

Yes. Point the DSN at your GlitchTip instance; the SDK and integrations stay the same.

How big a server does GlitchTip need?

A small VPS with 1 to 2 GB of RAM handles modest event volumes, plus PostgreSQL storage.

Can I move from GlitchTip to Sentry later?

Yes. Change the DSN in your app; past events stay in GlitchTip.

Does GlitchTip do performance monitoring?

It supports basic transaction tracking, but not Sentry's full tracing and profiling features.

Keep going