Railway

Deploy Umami | (Just Updated) Google Analytics Alternative, Admin Not admin/umami

Deploy and Host with Railway

Deploy Umami | (Just Updated) Google Analytics Alternative, Admin Not admin/umami

Just deployed

Just deployed

/data

Just deployed

/var/lib/postgresql

Deploy and Host Umami on Railway

Umami is a privacy-focused, cookieless alternative to Google Analytics: pageviews, events, sessions, funnels and UTM breakdowns for as many sites as you like, from a ~2 KB tracking script, with the data in your own Postgres. This template runs Umami 3.2.0 with Postgres and Redis, and it hands the admin account to you rather than to whoever finds the URL first.

About Hosting Umami

Every stock Umami deployment creates its admin user inside database migration 01_init, with a hardcoded bcrypt hash of the password umami and a fixed user id. Upstream exposes no environment variable to change it — the documented flow is "log in and change the password", which is a race with the entire internet on a public Railway domain. This template's image sets the admin credentials from a per-deploy generated secret after the migrations run and before the HTTP server binds its port, and refuses to start if that secret is empty. The first request the public URL ever serves is against a claimed instance, and the password is rotatable afterwards by editing the variable and redeploying.

The rest is ordinary Railway plumbing done properly: the Umami version is pinned (Umami applies one-way Prisma migrations on boot, so a rolling latest tag turns every redeploy into an unrequested upgrade), Postgres keeps its data on a volume mounted at the parent directory so the entrypoint owns its own data dir, and Redis — which Umami 3.x really does read on the tracking hot path for website, user and team lookups plus auth tokens — is passworded and persisted on its own volume.

Common Use Cases

  • Replacing Google Analytics with self-hosted, cookieless, GDPR-friendly analytics
  • Tracking many websites and events from a single dashboard
  • Sharing a public dashboard link for a site without giving away an account
  • Keeping raw visitor data inside your own infrastructure

Dependencies for Umami Hosting

  • PostgreSQL 17 (analytics data)
  • Redis 8 (lookup cache and auth token store)

Deployment Dependencies

Environment Variables

VariableNotes
UMAMI_ADMIN_PASSWORDgenerated per deploy; the login for user admin. Change it here and redeploy to rotate
UMAMI_ADMIN_USERNAMEoptional, defaults to admin
DATABASE_URLwired to the Postgres service
REDIS_URLwired to the Redis service
APP_SECRET, HASH_SALTgenerated per deploy

After the deploy finishes, open the public URL and log in as admin with the generated UMAMI_ADMIN_PASSWORD value from the Umami service's variables.

Why Deploy Umami 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 Umami on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Matomo Analytics + MariaDB
Privacy-friendly analytics with MariaDB and persistent volumes.

leodev
1
View Template
Bugsink
Self-hosted Error Tracking. Sentry-SDK compatible

zǝʇɹoɔ oɓıɹpoɹ
19
View Template
SubTrackr
Self-hosted Subscription Tracker

amnesia
3