Deploy Rustrak — Self-Hosted Sentry Alternative for Error Tracking
Sentry-compatible error tracking, logs and traces in one small container.
postgres
Just deployed
/var/lib/postgresql
Just deployed
/data
Deploy and Host Rustrak on Railway

Deploy Rustrak on Railway and get Sentry-compatible error tracking without the Sentry bill. Rustrak is a Rust server with 1,800+ GitHub stars, released under AGPL-3.0, that accepts events from the official Sentry SDKs: change the DSN and your app reports to your own server. Sentry's Team plan starts at about $26/month and charges for volume; this template runs for a few dollars a month with no event quotas.
What This Template Deploys
| Service | Purpose |
|---|---|
| rustrak | The Rustrak server (ghcr.io/onepush-dev/rustrak:v0.30.1-postgres): Sentry-protocol ingest API and the web dashboard on one HTTPS domain, port 8080, health check at /health |
| postgres | PostgreSQL 17 (Alpine) on the private network, storing projects, issues, events, users and alert rules |
| Persistent Volume | Mounted at /data on rustrak: incoming event envelopes are written here before processing, so a restart does not drop accepted events |
| Persistent Volume | Mounted at /var/lib/postgresql on postgres: every issue, event and setting survives redeploys |
Rustrak defaults to SQLite upstream; this template uses the :postgres image with a dedicated database, which suits teams that send steady traffic. One process serves both the dashboard and the ingest API, so there is no worker fleet, no Kafka and no ClickHouse to babysit.
About Hosting Rustrak
Self-hosting Sentry itself is a large job: the official self-hosted bundle runs dozens of containers and asks for 16 GB of RAM. Most small teams give up and accept per-event pricing instead. Rustrak exists for exactly that gap: the same SDK protocol in one small binary.
Railway handles the rest. The template wires Rustrak to Postgres over the private network, issues an HTTPS domain, generates the session key, the database password and the first admin password, and restarts the service if it stops. Ingestion is two-phase: the server writes each envelope to disk, returns 200 to your SDK and processes it in the background, so a burst of errors never slows down your app.
Sign in and change the default admin straight away. The first admin is created as admin@example.com with the generated RUSTRAK_ADMIN_PASSWORD. Change the email and password in the dashboard on day one, because anyone who guesses the email and finds the password could read your error data. This template pins Rustrak v0.30.1; newer releases exist, and you can move to them by changing the image tag.
Typical cost: about $5 to $10/month on Railway for Rustrak plus Postgres. Sentry's Team plan starts at about $26/month and bills extra once you pass its included events.
Deploy in Under 5 Minutes
- Click Deploy on Railway. Rustrak and Postgres start in about two minutes.
- Open the rustrak service's domain and sign in as
admin@example.comwithRUSTRAK_ADMIN_PASSWORDfrom the Variables tab. - Change the admin email and password under your account settings.
- Create a project and copy its DSN.
- Replace the DSN in your existing Sentry SDK setup, deploy your app and trigger a test error.
No SSH. No Kafka. No sixteen-container stack.
Common Use Cases
- Self-hosted Sentry alternative for teams who want the Sentry SDKs without per-event pricing or data leaving their cloud
- Error tracking for side projects and startups where a few dollars a month beats a SaaS plan that grows with traffic
- Running Rustrak next to Sentry: send a second DSN to Rustrak and compare both before switching over
- Logs, performance and release health in the same dashboard as your errors, from the same SDK
- AI agent monitoring: trace LLM calls, tool calls and token usage from Sentry's AI integrations
- Cron and alert monitoring: check-ins for scheduled jobs and alerts when a new issue appears
- Pairs with your Railway apps: point every service in your project at one private error tracker
Configuration
| Variable | Required | Description |
|---|---|---|
SESSION_SECRET_KEY | 🔐 Auto-generated | 64-character key that signs and encrypts login sessions; keep it stable |
RUSTRAK_ADMIN_PASSWORD | 🔐 Auto-generated | Password of the first admin (admin@example.com) |
CREATE_SUPERUSER | ✅ Auto-injected | Creates that first admin on first boot only; ignored once any user exists |
DATABASE_URL | ✅ Auto-injected | Connection string to the bundled Postgres over the private network |
PUBLIC_URL | ✅ Auto-injected | Public HTTPS address written into every DSN and alert link |
POSTGRES_PASSWORD | 🔐 Auto-generated | Postgres superuser password, on the postgres service |
Using a custom domain? Update PUBLIC_URL to the new address before you copy any DSN. Every DSN Rustrak shows is built from PUBLIC_URL, so a stale value hands your apps a URL that no longer reaches the server and events silently stop arriving.
Rustrak vs. Alternatives
| Rustrak (Railway) | Sentry SaaS | Self-hosted Sentry | Bugsink | |
|---|---|---|---|---|
| Monthly cost | ~$5 to $10 (Railway usage) | Team from ~$26 | Free, large server | Free self-hosted |
| Self-hosted | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes |
| Works with Sentry SDKs | ✅ Yes | ✅ Native | ✅ Native | ✅ Yes |
| Footprint | ✅ One container + Postgres | — | ❌ Dozens of containers, 16 GB RAM | ✅ One container |
| Per-event quotas | ✅ None | ❌ Plan quotas | ✅ None | ✅ None |
| Logs, performance and AI traces | ✅ Yes | ✅ Yes | ✅ Yes | ❌ Errors only |
| License | ✅ AGPL-3.0 | ❌ Proprietary service | ⚠️ FSL, source-available | ⚠️ PolyForm Shield, source-available |
Dependencies for Rustrak Hosting
- Railway account: the Hobby plan runs Rustrak and Postgres comfortably for small and medium apps
- An app already instrumented with a Sentry SDK, or a few minutes to add one
- A browser for the dashboard
Deployment Dependencies
- Rustrak on GitHub: source, releases and changelog
- Rustrak Documentation: installation, configuration and SDK setup
- Sentry SDK Documentation: client libraries Rustrak accepts
- Railway Volumes Documentation: how both volumes persist
Implementation Details
The image ghcr.io/onepush-dev/rustrak:v0.30.1-postgres is the upstream rustrak/rustrak-server:v0.30.1-postgres build with Railway defaults baked in: port 8080, SSL_PROXY=true because Railway terminates HTTPS, and telemetry switched off. It runs as root so the Railway volume at /data is writable, since the upstream distroless image uses a non-root user. The /metrics endpoint is left disabled because it has no authentication upstream.
The one setting to get right is PUBLIC_URL, because every DSN depends on it. Keep SESSION_SECRET_KEY stable or everyone is logged out, keep one replica of each service, and back up both volumes before upgrading to a newer Rustrak release.
Beyond the defaults, the Rustrak documentation covers single sign-on, GitHub and GitLab integrations for linking issues to code, API tokens, saved views, roles and permissions, and an MCP server so AI coding assistants can read your issues. None of these need extra services on Railway; they are settings inside the same container.
Frequently Asked Questions
What is Rustrak and why self-host it instead of paying for Sentry? Rustrak is an open-source error tracker written in Rust that speaks the Sentry protocol. Self-hosting keeps stack traces, user data and logs in your own Railway project, with no per-event pricing or sampling you did not choose.
How much does Rustrak on Railway cost compared with Sentry? Expect about $5 to $10/month on Railway for Rustrak and Postgres. Sentry's Team plan starts at about $26/month and adds charges as event volume grows.
Why are my errors not showing up in Rustrak?
Check that the DSN in your SDK matches the one in the Rustrak project and that it uses your current domain. If you changed domains, update PUBLIC_URL, copy the DSN again and redeploy your app.
Do I lose my issues and events when Railway redeploys?
No. Issues, events and settings live in Postgres on the /var/lib/postgresql volume, and accepted envelopes waiting for processing sit on the /data volume, so both survive redeploys.
Can I use the existing Sentry SDK in Python, JavaScript or Go with Rustrak? Yes. Any official Sentry SDK works; only the DSN changes. Source maps, releases, user feedback and cron check-ins use the same SDK features you already know.
Is Rustrak a full replacement for every Sentry feature? Not every one. Rustrak covers errors, logs, performance, release health, crons and AI agent traces, but large Sentry-specific products such as session replay may be missing or newer, so compare against your needs first.
Why Deploy and Host Rustrak on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Rustrak on Railway, you get Sentry-compatible error tracking, logs and performance monitoring for a few dollars a month, with every event stored in your own Postgres database.
Template Content

