Deploy Umami [Updated Jul '26]
Umami [Jul '26] (Privacy-First Google Analytics Alternative) Self Host
Just deployed
umami-railway
Just deployed
Just deployed
/var/lib/postgresql/data
Deploy and Host Umami Self-Hosted on Railway
Umami is an open-source analytics platform that respects user privacy. It replaces Google Analytics without cookies, trackers, or storing data on third-party servers. Deploy it on Railway in under five minutes with PostgreSQL and caching included.
About Hosting Umami Self-Hosted
Google Analytics is free, but "free" means you're the product - every visitor to your site gets tracked, fingerprinted, and fed into Google's ad-targeting machine, whether you want that or not. Umami flips the arrangement: your visitor data stays on your own Postgres database, full stop. Nobody else sees it, nobody else monetizes it, and you don't need a cookie consent banner because there are no cookies to consent to.
That privacy angle isn't just ethics - it's also compliance. GDPR, CCPA, and similar regulations exist specifically because third-party tracking became the default. Umami sidesteps the whole category of problem by never sending data anywhere except your own database in the first place. Legal teams tend to like "the data never leaves our infrastructure" a lot more than "we have a cookie banner and a privacy policy about what Google does with it."
Self-hosting on Railway means you're not trading Google's servers for a different vendor's servers. Railway handles the infrastructure complexity - SSL certificates, container orchestration, private networking between services - while you keep full ownership of the database itself. No monthly per-site subscription, no per-event billing that scales against you as your traffic grows, no surprise bill because a post went viral.
Common Use Cases
- Privacy-respecting website analytics : Track visitors, page views, and referral sources without violating anyone's privacy or triggering GDPR consent requirements.
- Multiple website tracking : Monitor analytics for every project you run from a single dashboard, without paying a per-site fee for each one.
- Personal portfolio and blog tracking : See who's actually visiting your site and where they're coming from, without the bloated feature set of enterprise analytics tools.
- Startup metrics : Understand early user behavior and conversion funnels without handing that data to Big Tech as a side effect.
- Client website reporting : Agencies managing multiple client sites get one clean dashboard instead of juggling separate Google Analytics accounts per client.
- Marketing campaign tracking : Custom events and UTM tracking without the complexity (or data-sharing implications) of Google Tag Manager.
- Alternative to Plausible or Fathom : Get comparable core analytics features at zero recurring cost, with full code access to customize anything.
Dependencies for Umami Self-Hosted Hosting
Umami needs PostgreSQL for data storage - that part's required. It also optionally supports Valkey (a Redis-compatible cache) for session storage; if Valkey becomes unreachable for any reason, Umami automatically falls back to querying the database directly, so it's a performance layer rather than something that can take your whole analytics dashboard down.
Deployment Dependencies
This template provisions Railway-managed PostgreSQL and Valkey automatically alongside the Umami container. The app connects via DATABASE_URL and REDIS_URL, both wired over Railway's private network - nothing to configure by hand.
Implementation Details
The template deploys the official ghcr.io/umami-software/umami:postgresql-v2.16 image on port 3000, pinned to a specific verified release rather than a floating tag. Railway's Postgres service auto-injects DATABASE_URL; Valkey provides REDIS_URL for session caching. APP_SECRET is auto-generated per deployment for session encryption. Default login on first launch is admin / umami - changing that password is the first thing you should do, not an optional afterthought.
How Umami compares to the alternatives
Vs. Google Analytics : Google Analytics is free and comes with cookie banners, cross-site tracking, and your visitor data feeding Google's ad business. Umami is also free (to self-host) and comes with none of that, at the cost of losing GA's deep ecosystem integrations most small sites never actually use anyway.
Vs. Plausible : Plausible is a genuinely good, privacy-focused hosted product, but it charges a recurring per-site fee and doesn't offer self-hosting on its lower tiers the way Umami does natively. If you're already comfortable running your own infrastructure, Umami gets you the same privacy stance without the subscription.
Vs. Fathom Analytics : Fathom is polished and simple, but closed-source and billed per pageview tier. Umami trades a bit of that polish for open-source code you can actually read, modify, and never pay a scaling fee on.
Getting Started
After deploying, open your Railway domain and log in with the default admin / umami credentials - change that password immediately under Settings → Profile before doing anything else. Then add your first website under Settings → Websites: give it a name, enter its domain, and Umami generates a tracking script snippet to paste before the closing `` tag on your site.
That's genuinely the whole setup. Once the script is live, visits start showing up in real time on your dashboard - no build step, no waiting 24-48 hours for data to populate the way some analytics tools require. From there, custom events (button clicks, form submissions, conversions) can be tracked with a couple of extra lines of JavaScript if you want more than pageviews, and you can add unlimited additional websites to the same dashboard at no extra infrastructure cost.
Is that too simple to be useful? For most sites, no - pageviews, referrers, top pages, and device breakdowns cover 90% of what anyone actually checks a dashboard for. If you need funnel analysis or cohort tracking, that's a real gap versus heavier tools like Mixpanel - Umami is scoped to "clean essential metrics," not a full product-analytics platform, and that's a feature for most use cases, not a limitation.
System Requirements for Self-Hosting Umami
Umami is genuinely light for what it does. A minimum viable setup is 512 MB RAM, 1 shared vCPU, and 5 GB of storage - comfortable for a personal site or small business getting a few thousand monthly visits. A $5/month Railway allocation handles well over 100,000 monthly events without breaking a sweat, since the app itself is a lean Next.js service and Postgres does the heavy lifting on storage, not compute.
Where you actually need to scale up is high-traffic sites tracking hundreds of thousands of daily events, or agencies running dozens of client sites off one instance - at that point, bump Postgres storage and consider whether Valkey's caching layer (already included in this template) is doing its job, since that's exactly the scenario it's built for.
Umami Cloud vs Self-Hosted
Umami also offers a hosted cloud version at umami.is, starting around $9/month for a single site. It handles infrastructure and updates for you, which is a fair tradeoff if you'd rather not think about servers at all. Self-hosting on Railway costs roughly the same or less once you're past one site, and the moment you're running multiple properties, self-hosting pulls ahead fast - you're not paying a new monthly fee per domain, you're paying for the compute you're already using regardless of how many sites point at it.
The honest tradeoff: cloud means someone else handles upgrades and backups; self-hosting means you're responsible for both, though Railway's managed Postgres includes automated backups, which removes most of that burden anyway.
Why Deploy Umami Self-Hosted 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 self-hosted 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.
Frequently Asked Questions
Do I need to change the default login?
Yes, immediately. admin / umami is a publicly known default credential for every fresh Umami deployment — leaving it unchanged means anyone who finds your dashboard URL can log in.
Is Valkey required for this to work?
No. It's an optional caching layer for session storage. If it's ever unavailable, Umami automatically falls back to checking the database directly - your analytics keep working either way, just marginally slower under very high concurrent load.
How is this different from Google Analytics 4?
The core difference is where your data lives and who can use it. GA4 sends every visitor interaction to Google's servers for their own purposes; Umami keeps everything in your own Postgres database, with no third party involved at all.
Can I track multiple websites from one deployment?
Yes — add as many as you want under Settings → Websites, all visible from one dashboard, no per-site pricing tier.
What happens to my data if I stop paying for Railway hosting?
Your data lives in the Postgres volume this template provisions. As long as that volume exists, your analytics history is intact - it's tied to your database, not to any Umami-specific service.
Does Umami support custom events, not just pageviews?
Yes - a small JavaScript snippet lets you track button clicks, form submissions, or any custom interaction alongside standard pageview data, all in the same dashboard.
Will this slow down my website?
No — the tracking script is a few kilobytes and loads asynchronously, so it doesn't block your page from rendering. It's built to be lighter than Google Analytics' own script.
Template Content
umami-railway
shruti060701/umami-railway