# Self-hosted error telemetry (GlitchTip)

Source: https://docs.quake.ai/resources/iac-templates/glitchtip
Markdown: https://docs.quake.ai/resources/iac-templates/glitchtip.md

---

# Self-hosted error telemetry (GlitchTip)

This pattern composes Compute, Network, and Block Storage into a self-hosted error-tracking service you run on infrastructure you control.

## What this template does

Provisions a single instance running [GlitchTip](https://glitchtip.com), an open-source error-tracking system that speaks the Sentry protocol (a self-hosted alternative to Sentry or LogRocket for error events). The official Sentry SDKs report to it unchanged once pointed at a project DSN:

- Compute instance that runs GlitchTip's web, worker, and migrate containers in Docker alongside bundled PostgreSQL and Redis (4 vCPU and 4 GiB RAM)
- Private network, subnet, router, port, and security group; a floating IP for public access
- A block volume mounted at `/var/lib/docker`, so the event database and uploaded files (sourcemaps, debug symbols) live on a volume you can grow rather than on the boot disk
- cloud-init installs Docker Engine and brings up PostgreSQL, Redis, runs the database migration, and starts the web and worker services

GlitchTip's secret key and the database password are generated on first boot and written to `/opt/glitchtip/.env`; no credential ships with this template.

## Parameters

| Parameter | Description | Default |
| --- | --- | --- |
| `key_name` | SSH keypair name (must already exist) | No default |
| `flavor_name` | Instance size (GlitchTip's containers plus PostgreSQL and Redis run on 4 vCPU / 4 GiB) | `s1a.medium` |
| `image_name` | Operating system image | `Ubuntu-24.04` |
| `app_name` | Display name prefix for resources | `glitchtip` |
| `volume_size` | Block volume size in GiB, mounted at `/var/lib/docker` | `20` |
| `external_network` | External network for floating IP allocation | `PublicStatic` |
| `private_cidr` | CIDR for the private subnet | `10.49.0.0/24` |
| `app_allowed_cidr` | CIDR allowed to reach GlitchTip on port 8000 | `10.49.0.0/24` |

## Finish setup after apply

cloud-init runs the database migration and starts GlitchTip's web and worker services against the bundled PostgreSQL and Redis, with the generated secrets in `/opt/glitchtip/.env`. Open `http://YOUR_FLOATING_IP:8000` (reachable from `app_allowed_cidr`, the private network by default) and register the first account; it becomes the instance superuser.

After creating your account, lock down public self-signup:

```bash
sudo sed -i 's/ENABLE_USER_REGISTRATION=true/ENABLE_USER_REGISTRATION=false/' /opt/glitchtip/.env
cd /opt/glitchtip && sudo docker compose up -d
```

For production, point a domain at the floating IP, put a reverse proxy in front for HTTPS on 443, and update `GLITCHTIP_DOMAIN` in `/opt/glitchtip/.env` to the HTTPS address.

## Connect a Sentry SDK

GlitchTip speaks the Sentry event-ingestion protocol. Create a project from the GlitchTip UI to get a DSN, then initialize the Sentry SDK in your application as you normally would, pointed at that DSN:

```python
import sentry_sdk

sentry_sdk.init(dsn="http://<key>@YOUR_FLOATING_IP:8000/<project_id>")
```

No code change beyond the DSN is needed; GlitchTip accepts events from the official Sentry SDKs across languages.

## Access and security

GlitchTip listens on port 8000 over plain HTTP by default. The security group restricts 8000 to `app_allowed_cidr`, which defaults to the private network only. Put a reverse proxy with TLS on 443 in front for routine access and so SDKs report events over HTTPS.

## When to use this pattern

Run error tracking and event grouping for your applications on a host you operate, with a DSN your existing Sentry SDK integrations point at unchanged. The bundled PostgreSQL and Redis suit a single team's event volume; to run them separately, point `DATABASE_URL` and `VALKEY_URL` in `/opt/glitchtip/.env` at a [self-managed PostgreSQL](/resources/iac-templates/self-managed-postgres) instance and a [Redis](/resources/iac-templates/redis-cache) instance.

## Estimated cost

<PricingCompanion
  components={[
    { kind: "template", slug: "glitchtip", required: true },
  ]}
/>

## Template source

<TemplateSource slug="glitchtip" />

<TemplateResourceMap template="glitchtip" format="opentofu" />

## Customize this pattern

- [Customize a template's image and flavor](/docs/automation/how-to/customize-template-image-flavor)
- [Add a block volume to a template](/docs/automation/how-to/add-volume-to-template)
- [Parameterize a template with a tfvars file](/docs/automation/how-to/parameterize-template-tfvars)

## See also

- [Self-managed PostgreSQL](/resources/iac-templates/self-managed-postgres)
- [Redis](/resources/iac-templates/redis-cache)
- [Umami analytics](/resources/iac-templates/analytics-umami): the product-analytics counterpart in the observability layer
- [Monitoring stack](/resources/iac-templates/monitoring-stack): infrastructure metrics alongside this application-level error telemetry
- [Self-hosted vibecode stack](/resources/solutions/self-hosted-vibecode-stack)
