π Sentry Self-Hosted Installation - Wiki
These are the minimum requirements:
4 CPU Cores
16 GB RAM
20 GB Free Disk Space
Getting StartedOur recommendation is to do a Git clone of the latest release of the self-hosted repository, and then run
./install.sh
inside this directory. This script will take care of all the things you need to get started, including a base-line configuration, and then will tell you to rundocker compose up --wait
to start Sentry. Sentry binds to port9000
by default. You should be able to reach the login page atΒ http://127.0.0.1:9000.
To Upgrade Sentry:
BashVERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/getsentry/self-hosted/releases/latest) VERSION=${VERSION##*/} git clone https://github.com/getsentry/self-hosted.git cd self-hosted git checkout ${VERSION} ./install.sh # After installation, run the following to start Sentry: docker compose up --wait
My Troubleshooting:
β Environment DetailsOS: Ubuntu 22.04 (Linux VM)
Docker: 24+
Docker Compose: v2 (use
docker compose
instead ofdocker-compose
)Domain:
https://sentry.techfinite.com
β‘ Issue 1: CSRF Verification Failed During Login
Problem:
After setup, accessing the Sentry UI showed
CSRF Verification Failed
on the login page.Cause:
Missing CSRF trusted origin and incorrect proxy SSL headers.
Fix:
Updated the following files:
βοΈ File:
sentry/sentry.conf.py
CSRF_TRUSTED_ORIGINS = ["https://sentry.techfinite.com"] SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SESSION_COOKIE_SECURE = True CSRF_COOKIE_SECURE = True USE_X_FORWARDED_HOST = True
βοΈ File:
config.yml
system.url-prefix: "https://sentry.techfinite.com" # Important: No trailing slash
β‘ Issue 2: SMTP Container Fails to Start
Problem:
registry.gitlab.com/egos-tech/smtp:latest
failed to pull due to timeout.Error:
Error response from daemon: Get "https://registry.gitlab.com/v2/": net/http: request canceled while waiting for connection
Fix:
I couldnβt access the image due to network issues, so I used a fallback image.
Retry pull with increasing timeout
While Docker doesn't allow direct timeout settings, retrying manually may work when network hiccups resolve:
bash docker pull registry.gitlab.com/egos-tech/smtp:latest
β‘ Issue 3:
docker-compose
Command Not FoundProblem:
The
docker-compose
command was not available.Fix:
Docker Compose v2 uses the space-based syntax:
# Instead of: docker-compose run --rm web createuser # Use: docker compose run --rm web createuser
β‘ Issue 4: Admin User Not Created Automatically
Problem:
No default admin user is created. First-time login was not possible.
Fix:
Manually created admin user using:
docker compose run --rm web createuser
If the user already existed:
docker compose run --rm web createuser --email it-support@techfinite.com --superuser --force-update
π‘ Notes for New Installers
Required Configurations:
File
Changes
config.yml
Set correct
system.url-prefix
sentry.conf.py
Add CSRF trusted origin and SSL header support
Useful Commands:
./install.sh # Runs full install docker compose up --wait # Starts all services