GlitchTip
Simple, open-source error tracking
Bugs are inevitable in web development. The important thing is to catch them when they appear. With GlitchTip, you can rest easy knowing that if your web app throws an error or goes down, you will be notified immediately. GlitchTip combines error tracking and uptime monitoring in one open-source package to keep you and your team fully up-to-date on the status of your projects.
GlitchTip Installation using Docker
System Requirements
GlitchTip requires PostgreSQL (13+), Redis/Valkey, a web service, and a worker service.
Recommended system requirements: 1GB RAM, x86 or arm64 CPU
Minimum system requirements: 512MB RAM + swap
Disk usage varies on usage and event size. As a rough guide, a 1 million event per month instance may require 30 GB of disk.
For best performance, use a proxy or load balancer that supports request buffering and handles chunked transfer-encoding, such as nginx.
Docker Compose
Docker Compose is a simple way to run GlitchTip on a single server.
Install Docker and Docker Compose. on Debian/Ubuntu
sudo apt install docker-compose docker.io
- Copy docker-compose.sample.yml to your server as
docker
-compose.yml
.
- Copy docker-compose.sample.yml to your server as
version: "3.8"
x-environment:
&default-environment
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
SECRET_KEY: da77b9c96066bb69937294996509b35416d80354f37a6886434dc50ff9175cf9 # best to run openssl rand -hex 32
PORT: 8181
EMAIL_URL: consolemail:// # Example smtp://email:password@smtp_url:port https://glitchtip.com/documentation/install#configuration
GLITCHTIP_DOMAIN: https://glitch.arefinrumi.com # Change this to your domain
DEFAULT_FROM_EMAIL: smarefin7@gmail.com # Change this to your email
CELERY_WORKER_AUTOSCALE: "1,3" # Scale between 1 and 3 to prevent excessive memory usage. Change it or remove to set it to the number of cpu cores.
CELERY_WORKER_MAX_TASKS_PER_CHILD: "10000"
x-depends_on:
&default-depends_on
- postgres
- redis
services:
postgres:
image: postgres:17
environment:
POSTGRES_HOST_AUTH_METHOD: "trust" # Consider removing this and setting a password
restart: unless-stopped
volumes:
- pg-data:/var/lib/postgresql/data
redis:
image: valkey/valkey
restart: unless-stopped
web:
image: glitchtip/glitchtip
depends_on: *default-depends_on
ports:
- "8181:8181"
environment: *default-environment
restart: unless-stopped
volumes:
- uploads:/code/uploads
worker:
image: glitchtip/glitchtip
command: ./bin/run-celery-with-beat.sh
depends_on: *default-depends_on
environment: *default-environment
restart: unless-stopped
volumes:
- uploads:/code/uploads
migrate:
image: glitchtip/glitchtip
depends_on: *default-depends_on
command: ./bin/run-migrate.sh
environment: *default-environment
volumes:
pg-data:
uploads:
Edit the environment section of docker-compose.yml. See the Configuration section below.
Start docker service
docker compose up -d
Now the service should be running on port 8181. Older versions of docker compose should usedocker-compose
without a space.
It's highly recommended configuring SSL next. Use nginx or preferred solution.
Recommended nginx and SSL solution
-
sudo apt install nginx.
-
/etc/nginx/sites-enabled/default for example:
server {
server_name glitchtip.example.com;
access_log /var/log/nginx/access.log;
client_max_body_size 40M;
location / {
proxy_pass http://127.0.0.1:8181;
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;
}
}
This configuration will direct glitch.arefinrumi.com or glitchtip server IP to port 8181 (the default GlitchTip Docker compose port).
Apache2 Alternative
Install mods header, proxy, proxy_http (
a2enmod
)Setup the proxy part in the vhost
ProxyPreserveHost On ProxyPass / http://localhost:8000/ ProxyPassReverse / http://localhost:8000/ RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}
Upgrading
Pull latest docker image
docker-compose pull
Restart
docker-compose stop
anddocker-compose up -d
Database migrations will automatically happen.
Next, we need to register to access GlitchTip.
Subscribe to my newsletter
Read articles from S. M. Arefin Rumi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by