Back to articles
Technology Insight

Self-Hosting GlitchTip on a VPS: The Cost-Effective, Open-Source Error Tracking Alternative to Expensive Sentry Plans

May 26, 2026

Introduction: The Cost of Modern Application Observability

In contemporary software development, real-time error tracking is indispensable. Production issues must be identified and resolved before they compromise user experience. For years, Sentry has served as the industry standard for error monitoring, offering deep insights into stack traces, affected environments, and application health. However, as software systems scale and data volumes grow, teams frequently encounter a significant operational hurdle: escalating subscription costs.

Sentry’s cloud pricing model, which charges based on event volume, user seats, and performance tracking retention, can quickly become cost-prohibitive for startups, mid-sized enterprises, and independent developers. While Sentry offers an open-source, self-hosted edition, deploying it independently is notoriously complex. A standard self-hosted Sentry installation requires managing nearly 30 distinct Docker containers, including heavyweight infrastructure components like Apache Kafka, ClickHouse, Redis, and PostgreSQL. For smaller engineering teams, the infrastructure overhead and hardware requirements (often demanding a minimum of 8GB to 16GB of RAM) negate the benefits of self-hosting.

Enter GlitchTip: a modern, lightweight, fully open-source error tracking platform designed specifically to serve as a low-overhead, drop-in replacement for Sentry. By leveraging the exact same Sentry client SDKs, GlitchTip allows developers to retain their existing application monitoring code while gaining absolute control over data ownership and infrastructure costs. This article provides a comprehensive guide to self-hosting GlitchTip on a Virtual Private Server (VPS), enabling a highly efficient, budget-friendly monitoring stack.

---

Why GlitchTip is the Ideal Sentry Alternative

GlitchTip is built using Python and the Django framework, focusing strictly on core observability features without the structural bloat of full-scale enterprise platforms. It offers several compelling advantages for business applications:

  • API Compatibility with Sentry: GlitchTip speaks the exact same wire protocol as Sentry. Developers do not need to install custom, unverified libraries; they can continue utilizing standard, official Sentry SDKs within their frontend and backend applications. Switching to GlitchTip requires changing only a single configuration variable: the Data Source Name (DSN) URL.
  • Extremely Low Resource Footprint: Unlike self-hosted Sentry, which demands a massive multi-container grid, GlitchTip runs efficiently on standard relational infrastructure. It relies entirely on PostgreSQL for data storage and Redis for task queuing. A fully operational production instance can comfortably run on a entry-level VPS with just 1GB to 2GB of RAM.
  • Comprehensive Core Feature Set: GlitchTip does not compromise on essential error-management capabilities. It includes automated error grouping, detailed stack trace visualization, release tracking, basic performance monitoring, environment filtering, and robust alerting via email and webhooks.
  • Data Sovereignty and Compliance: For enterprises handling sensitive user data, transmitting telemetry to a third-party SaaS vendor presents strict compliance challenges under frameworks like GDPR, HIPAA, or CCPA. Hosting GlitchTip on a private VPS ensures all error data remains securely within your regional infrastructure.
---

Prerequisites for VPS Deployment

Before initiating the deployment process, ensure your environment meets the following baseline technical criteria:

  1. A Linux VPS: A virtual private server running a stable, long-term support distribution such as Ubuntu 24.04 LTS. A configuration featuring 2 vCPUs, 2GB to 4GB of RAM, and 20GB of SSD storage is highly recommended to handle real-time production error streams smoothly.
  2. A Registered Domain Name: A dedicated domain or subdomain (e.g., errors.yourcompany.com) configured with an A Record pointing directly to the public IPv4 address of your VPS.
  3. SMTP Credentials: Access to a transactional email service (such as Amazon SES, SendGrid, Mailgun, or an internal mail server) to distribute system alerts, password resets, and user invitations.
---

Step-by-Step Architecture Deployment via Docker Compose

Deploying GlitchTip via Docker Compose guarantees a modular, predictable, and easily maintainable runtime environment. Follow these exact architectural steps to establish your tracking platform.

Step 1: System Optimization and Dependency Installation

Establish a secure SSH connection to your remote VPS and update the core operating system packages to their latest stable patches. Afterward, install the Docker Engine and the modern Docker Compose plugin.

Security Note: Ensure your system firewall (e.g., UFW) is active, explicitly allowing traffic exclusively on ports 22 (SSH), 80 (HTTP), and 443 (HTTPS).

# Update system package repositories
sudo apt update && sudo apt upgrade -y

# Install required dependencies
sudo apt install -y curl ufw caddy

# Configure firewall rules
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw --force enable

# Install official Docker platform tools
curl -fsSL [https://get.docker.com](https://get.docker.com) | sh
sudo systemctl enable --now docker

Step 2: Constructing the Application Infrastructure Directory

Create an isolated directory structure on the host filesystem to organize the configuration state, database mounts, and environment variables required by GlitchTip.

sudo mkdir -p /opt/glitchtip
cd /opt/glitchtip

Step 3: Configuring Environmental Parameters

Generate a secure, cryptographically random string to serve as the application’s internal secret key, and create an environmental configuration file named .env. Populate this file with your explicit database infrastructure URLs, public domain paths, and mail relay vectors.

# Generate a highly secure random string
openssl rand -hex 48

Construct the configuration asset using your preferred terminal editor:

# File path: /opt/glitchtip/.env
SECRET_KEY=your_generated_random_hex_string
DATABASE_URL=postgres://glitchtip_user:a_secure_db_password@postgres:5432/glitchtip_db
REDIS_URL=redis://redis:6379/0
GLITCHTIP_DOMAIN=[https://errors.yourcompany.com](https://errors.yourcompany.com)
[email protected]
EMAIL_URL=smtp://your_smtp_username:[email protected]:587
ENABLE_USER_REGISTRATION=true

Step 4: Defining the Multi-Container Docker Compose File

Create a docker-compose.yml file to define the operational topology of your tracking cluster. This configuration explicitly segregates the web entrypoint, asynchronous worker daemons, database backends, and in-memory caches into distinct network-isolated logical boundaries.

version: "3.8"

services:
  postgres:
    image: postgres:16-alpine
    container_name: glitchtip-postgres
    restart: unless-stopped
    environment:
      POSTGRES_USER: glitchtip_user
      POSTGRES_PASSWORD: a_secure_db_password
      POSTGRES_DB: glitchtip_db
    volumes:
      - pgdata:/var/lib/postgresql/data
    networks:
      - glitchtip-net

  redis:
    image: redis:7-alpine
    container_name: glitchtip-redis
    restart: unless-stopped
    networks:
      - glitchtip-net

  web:
    image: glitchtip/glitchtip:latest
    container_name: glitchtip-web
    restart: unless-stopped
    ports:
      - "127.0.0.1:8000:8000"
    env_file:
      - .env
    depends_on:
      - postgres
      - redis
    networks:
      - glitchtip-net

  worker:
    image: glitchtip/glitchtip:latest
    container_name: glitchtip-worker
    restart: unless-stopped
    command: ./bin/run-celery-with-beat.sh
    env_file:
      - .env
    depends_on:
      - postgres
      - redis
    networks:
      - glitchtip-net

volumes:
  pgdata:

networks:
  glitchtip-net:
    driver: bridge

Step 5: Initialization, Migrations, and System Launch

With the environment records and structural composition files validated, initiate the container environment, execute the structural database schema migrations, and spawn the application daemon processes.

# Pull official container images down from registry
sudo docker compose pull

# Run initialization schema migrations against PostgreSQL
sudo docker compose run --rm web ./manage.py migrate

# Start all services in detached production mode
sudo docker compose up -d
---

Configuring the Reverse Proxy and Automatic SSL

To safely expose the GlitchTip web service to the internet, you should configure a reverse proxy to handle TLS termination, securing data transmission with a valid SSL certificate. While Nginx is a standard choice, Caddy offers a modern, high-performance alternative that handles automated Let’s Encrypt certificate acquisition and renewal natively without needing external Cron scripts or Certbot configuration.

Edit the global system server configuration file for Caddy:

# File path: /etc/caddy/Caddyfile
errors.yourcompany.com {
    reverse_proxy 127.0.0.1:8000
    
    encode gzip zstd
    
    header {
        Strict-Transport-Security "max-age=31536000; includeSubDomains"
        X-Content-Type-Options nosniff
        X-Frame-Options DENY
        Referrer-Policy strict-origin-when-cross-origin
    }
}

Apply the routing configuration rules instantly via the native control manager:

sudo systemctl reload caddy
---

Post-Deployment Security Practices

Once you verify that your domain loads correctly over TLS and you land on the dashboard onboarding screen, take the following immediate security actions:

  1. Account Initialization: Register your primary administrative profile immediately via the web user interface. The first account initialized automatically assumes global superuser privileges over the entire host environment.
  2. Deactivating Open Registrations: Leaving public registrations enabled presents a severe security vulnerability that exposes your private host resources to third-party exploitation. Modify the configuration parameters in your .env file to seal the system securely.
# Append or modify this target value within /opt/glitchtip/.env
ENABLE_USER_REGISTRATION=false

Apply the global environment modification cleanly by forcing a rolling restart of the application container processes:

sudo docker compose up -d --force-recreate web worker
---

Connecting Application SDKs: Seamless Sentry Migration

Integrating your newly established self-hosted instance with an application takes only a few moments. Simply copy the standard client DSN format provided inside your GlitchTip project configuration panel and substitute it directly into your application startup hooks.

Example: Node.js / Express Integration

import * as Sentry from "@sentry/node";

Sentry.init({
  dsn: "[https://[email protected]/1](https://[email protected]/1)",
  environment: "production",
  tracesSampleRate: 0.25,
});

Example: Python / Django Integration

import sentry_sdk

sentry_sdk.init(
    dsn="[https://[email protected]/1](https://[email protected]/1)",
    environment="production",
    traces_sample_rate=0.1,
)
---

Conclusion: Long-Term ROI and Infrastructure Autonomy

By transitioning from a paid commercial SaaS tier to a self-hosted GlitchTip deployment on an isolated VPS, engineering teams can drastically lower their operational overhead while retaining a high-performance error tracking workflow. This setup eliminates unexpected monthly overage charges and ensures absolute compliance with modern data privacy frameworks.

GlitchTip offers a perfect balance for practical development teams: it provides the standard interface and SDK support of Sentry, combined with the low-maintenance, single-vps footprint required to keep infrastructure simple and affordable.

Self-Hosting GlitchTip on a VPS: The Cost-Effective, Open-Source Error Tracking Alternative to Expensive Sentry Plans | DPTCloud