Deploy Rustrak

Lightweight self-hosted Sentry-compatible error tracking

Deploy Rustrak

Just deployed

/var/lib/postgresql

/data

Deploy and Host self hosted Rustrak (Observability) on Railway

This template deploys Rustrak, a lightweight error tracker compatible with Sentry SDKs and DSNs, as independent community packaging of rustrak/rustrak v0.30.1 (AGPL-3.0). It is not affiliated with or endorsed by Rustrak or Sentry.

About Hosting Rustrak open-source software on Railway (self hosted Rustrak template)

This template runs Rustrak as two services: rustrak, built from the community image ghcr.io/onepush-dev/rustrak:v0.30.1-postgres, and a private postgres:17-alpine database.

Why Deploy Rustrak, the self-hosted error tracker on Railway

Rustrak on Railway gives you a Sentry-compatible error tracker you control, without the per-event billing of a hosted error-tracking service as traffic grows.

Railway runs the two services, the volumes and the HTTPS domain, so you do not have to size a VPS or configure TLS yourself.

Railway vs Other Hosting Providers and VPS for Rustrak self hosting

A VPS means you run the server, Postgres, TLS and upgrades yourself, while Railway handles containers, volumes and HTTPS for this template's two services.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanTwo services from one template, a public HTTPS domain, a /data volume and a /health check.A droplet you size and secure yourself, with Docker, a reverse proxy and Postgres set up by hand.
AWSDeployment without building VPC, IAM or load balancer resources first.Fine-grained networking and managed services, with more setup to own.
HetznerManaged containers with the variables already wired between rustrak and postgres.Low-cost servers where you install Docker, configure backups and keep the stack patched.

Choose Railway if you want less server work, and a VPS if you want full control.

Common Use Cases for hosted Rustrak

  • Small team error dashboard: Point the Sentry-compatible SDKs in your web app at the DSN from a Rustrak project, and the dashboard groups incoming errors into issues so your team can see what is breaking without reading raw logs.
  • Side project monitoring: Run one lightweight tracker for a few personal apps, with each app as its own project and its own DSN, all stored in the bundled Postgres database.
  • Internal tools and scripts: Send exceptions from background jobs or internal services to the same dashboard, using the local files on the /data volume for anything the service needs to keep between restarts.

Dependencies for Rustrak Docker hosted on Railway

This template runs two services in one Railway project.

Deployment Dependencies for Managed Rustrak Service

The rustrak service is public on port 8080, mounts a volume at /data, checks /health with a 300 second timeout, and uses restart policy Always. The postgres service is private postgres:17-alpine, with a volume at /var/lib/postgresql and restart policy On Failure. Keep one replica of each service, because the volumes hold local persistent state.

Implementation Details for Rustrak

The image ghcr.io/onepush-dev/rustrak:v0.30.1-postgres is the unmodified upstream docker.io/rustrak/rustrak-server:v0.30.1-postgres image with Railway defaults baked in. The wrapper sets USER 0 so the Railway volume on /data is writable, because the upstream distroless image runs as nonroot 65532, and it bakes PORT=8080, SSL_PROXY=true and RUSTRAK_TELEMETRY=off. CREATE_SUPERUSER is set to admin@example.com plus RUSTRAK_ADMIN_PASSWORD and only acts on first boot. RUSTRAK_METRICS is not set, because /metrics is unauthenticated upstream, so the metrics endpoint is left off.

  • SESSION_SECRET_KEY: a generated 64 character key. Keep it stable.
  • DATABASE_URL: built from the bundled postgres service.
  • PUBLIC_URL: the Railway HTTPS domain. Update it for a custom domain.
  • RUSTRAK_ADMIN_PASSWORD: the password for admin@example.com.
  • CREATE_SUPERUSER: creates the first admin on first boot only.
  • POSTGRES_PASSWORD: the generated password on the postgres service.

How does Rustrak compare against other tools

Rustrak vs a hosted error-tracking service (Hosted error tracking alternative)

  • Control of data: Rustrak runs in your own Railway project, so events and the Postgres database stay on infrastructure you manage. A hosted service keeps that data on its side.
  • Cost model: You pay for Railway usage behind the two services, not a per-event or per-seat plan. Hosted services often win on predictable billing for small teams.
  • Operations: You own upgrades, backups of the /data and Postgres volumes, and keeping SESSION_SECRET_KEY stable. A hosted service handles those chores for you.

Rustrak vs running a full Sentry stack yourself (Full Sentry stack alternative)

  • Footprint: Rustrak is a single Rust server plus Postgres, so there are two services to run instead of many. The upstream project describes it as lightweight.
  • Compatibility: Rustrak speaks the Sentry protocol, so Sentry SDKs can send events to a DSN from your instance. Sentry is named only to describe that compatibility, and Rustrak is not affiliated with or endorsed by Sentry.
  • Feature breadth: A full Sentry stack offers far more features and a mature ecosystem. Choose Rustrak when grouped errors and a dashboard are enough.

Rustrak with Docker vs Railway (Docker on a VPS alternative)

  • Setup: Running the unmodified upstream image with Docker on a VPS means you handle networking, TLS, the volume and the database yourself. This template bakes PORT=8080, SSL_PROXY=true and RUSTRAK_TELEMETRY=off into the wrapper image and wires the services together.
  • Persistence: On Railway, rustrak keeps local state on a volume at /data and postgres uses /var/lib/postgresql. Docker on a VPS gives the same persistence with more manual setup.
  • Ongoing care: Railway restarts rustrak with the Always policy and checks /health with a 300 second timeout. On a VPS you set up that supervision yourself.

How to use Rustrak on Railway?

Once the deploy finishes, work through these first-day steps in order.

  1. Open the public domain for the rustrak service and sign in as admin@example.com with the RUSTRAK_ADMIN_PASSWORD value from the Variables tab.
  2. Change the email and password for the admin account right away, since the first sign-in uses the generated password.
  3. Create a project in the dashboard, then copy its DSN.
  4. Point a Sentry-compatible SDK at that DSN. Rustrak speaks the same protocol, so the SDK needs only the DSN change.
  5. If you add a custom domain, update PUBLIC_URL to match it so DSNs and links use the right address.
  6. Keep one replica of each service, since the local volumes hold state that a second replica would not share.
  7. Confirm the health check on /health is passing before you send real traffic.
Health check path: /health
Timeout: 300 seconds
Restart policy: Always (rustrak), On Failure (postgres)

How to self host Rustrak on other VPS Services (Rustrak self hosting guide)

Clone the Repository

Clone the packaging repository, then move into it.

git clone https://github.com/onepush-dev/rustrak.git
cd rustrak

Install Dependencies

You need Docker and a reachable Postgres database.

Configure Environment Variables

Set the same values the Railway template uses.

export SESSION_SECRET_KEY="generate-a-64-character-value"
export DATABASE_URL="postgres://postgres:your-password@your-db-host:5432/postgres"
export PUBLIC_URL="https://your-domain"
export RUSTRAK_ADMIN_PASSWORD="your-admin-password"
export CREATE_SUPERUSER="admin@example.com:your-admin-password"

Keep SESSION_SECRET_KEY stable, since changing it logs everyone out.

Start the Rustrak Application

Run the upstream image on port 8080 with a persistent path for /data, then sign in as admin@example.com and change the email and password.

docker run -d -p 8080:8080 --env-file .env -v rustrak-data:/data ghcr.io/onepush-dev/rustrak:v0.30.1-postgres

Railway handles the HTTPS domain, the private network to Postgres, the volumes, and the health checks for you.

Pricing and License of Rustrak (Rustrak pricing)

Rustrak is licensed under AGPL-3.0, an open-source license, and you can self-host it for free.

Rustrak hosted vs self hosted comparison (Pricing, features, costs, and more)

This template packages the AGPL-3.0 software, so the software itself is free to run.

Monthly cost of self hosting Rustrak on Railway

Railway bills on usage, so your monthly cost depends on the RAM and CPU the two services use, the size of the volumes, and how many services you run.

System Requirements for Hosting Rustrak on a VPS

Rustrak runs as a single Rust binary beside a Postgres 17 database, so a small VPS with enough memory for both and enough disk for the volumes is a reasonable start.

Frequently Asked Questions (FAQs)

How do I sign in to Rustrak on Railway?

Open the public domain from your rustrak service and sign in as admin@example.com with the RUSTRAK_ADMIN_PASSWORD value shown in the Variables tab.

Should I change the default admin account?

Yes. Sign in as admin@example.com with the generated RUSTRAK_ADMIN_PASSWORD, then change the email and password right away. CREATE_SUPERUSER only creates that first admin on the first boot.

Is Rustrak affiliated with Sentry?

No. This is independent community packaging of rustrak/rustrak v0.30.1 (AGPL-3.0), and it is not affiliated with or endorsed by Rustrak or Sentry. Sentry is named only to describe SDK and DSN compatibility.

Is the metrics endpoint turned on?

No. RUSTRAK_METRICS is left unset because /metrics is unauthenticated in the upstream server, so this template does not expose that endpoint.

What should I back up?

Back up the /data volume on the rustrak service and the /var/lib/postgresql volume on the postgres service.


Template Content

More templates in this category

View Template
Rootprint
Open-source logs and traces with full-text search on object-storage.

Rootprint
1
View Template
Pyroscope profiling
Protected continuous profiling with durable Pyroscope storage.

Anton Orel
1
View Template
SigOnly
Deploy SigNoz with a working demo app & config in one click

zoeyjones
21