Frontend monitoring is essential for running online ecommerce stores. For agencies and smaller merchants, SaaS monitoring solutions can become expensive quickly. By performing a self-hosted Sentry setup using Docker and Docker Compose, you can maintain full monitoring capabilities at lower cost while keeping control over your infrastructure. This guide walks you through server setup, installation, configuration, and backup — plus an honest answer to the question: is it actually worth it?

Is Self-Hosted Sentry Worth It?

For teams monitoring multiple projects, self-hosted Sentry can save thousands per year. Here’s a realistic comparison:

PlanCost/monthEvents/monthProjectsUsers
Sentry SaaS Team~£21–£2650k errorsUnlimited25
Sentry SaaS Business~£80–£89100k errorsUnlimitedUnlimited
Self-Hosted (Hetzner AX42)~£60–£70UnlimitedUnlimitedUnlimited
Self-Hosted (shared server)~£5–£15/month additionalUnlimitedUnlimitedUnlimited

The break-even point is roughly 2–3 projects with moderate error volume. If you’re an agency monitoring 5+ stores, self-hosting almost always wins on cost. If you’re a solo developer with one small project, Sentry’s free tier (5k errors/month) is the pragmatic choice.

What you give up: managed upgrades, Sentry’s CDN-backed performance, and the operational simplicity of SaaS. The self-hosted instance requires maintenance — upgrading Sentry, managing backups, and monitoring the monitoring server itself.

How Difficult Is the Setup?

Difficulty: Medium. If you’re comfortable with Docker, Linux CLI, and basic sysadmin tasks, this is a 1–2 hour setup. The main complexity:

  • Sentry’s install.sh is long-running (~15–30 minutes) and resource-intensive
  • First-time configuration (email SMTP, OAuth, SSO) requires reading docs
  • The minimum hardware requirements are non-trivial (see below)

If you’ve never used Docker before, expect to spend an extra few hours on prerequisites.

TL;DR

  • Set up a server (Hetzner recommended) with Ubuntu 22.04
  • Install Docker & Docker Compose
  • Clone the Sentry self-hosted repo to /opt/sentry and checkout your desired version
  • Customize /opt/sentry/sentry/config.yml and /opt/sentry/sentry/sentry.conf.py
  • Run ./install.sh --report-self-hosted-issues
  • Schedule regular backups with cron
  • Automate monitoring with Docker and Docker Compose

This guide provides a complete, self-hosted Sentry setup using Docker and Docker Compose for ecommerce monitoring, including installation, configuration, and automated backups.

Prerequisites

Minimum hardware requirements for Sentry self-hosted:

ResourceMinimumRecommended
CPU4 cores8+ cores
RAM8 GB16–32 GB
Storage20 GB SSD100+ GB SSD
OSUbuntu 20.04+Ubuntu 22.04 LTS

Sentry runs ~20+ Docker containers (Kafka, ClickHouse, Redis, PostgreSQL, Snuba, Relay, workers…). This is not a lightweight application. A €60–70/month dedicated server (like Hetzner’s AX42) is the sweet spot for multi-project agency use.

  • A server with Ubuntu 22.04 (Hetzner recommended for low cost and high specs: 14C/20T 2.5GHz i5-13500, 64GB RAM, 2TB RAID)
  • Basic knowledge of CLI, Docker, and system administration
  • Access to GitHub to clone the Sentry repository

Install Docker & Docker Compose

sudo apt update -y
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update -y
sudo apt install docker-ce docker-compose-plugin -y
sudo systemctl enable --now docker

Installing Sentry Self-Hosted

Now that our server is prepared with Docker and Docker Compose, we can proceed to install Sentry Self-Hosted.

Clone and Configure Sentry Self-Hosted

mkdir -p /opt/sentry
git clone https://github.com/getsentry/self-hosted.git /opt/sentry
cd /opt/sentry
git checkout 24.1.0

Note: Check the official Sentry releases to use the latest stable version.

Configure Sentry

Customize the following files as needed:

  • /opt/sentry/sentry/config.yml — e.g., Google SSO, Slack/Discord Tokens
  • /opt/sentry/sentry/sentry.conf.py — e.g., Single Org Mode, Sentry Features, Bitbucket Tokens

Run Installation Script

sudo ./install.sh --report-self-hosted-issues
docker compose restart

Backup & Maintenance

Regular backups are essential to protect your Sentry instance from data loss or system failure. For full instructions, refer to the Sentry documentation on backups.

References