Deploy GoatCounter

GoatCounter 2.7: privacy-friendly web analytics without cookie banners.

Deploy GoatCounter

Just deployed

/home/goatcounter/goatcounter-data

Deploy and Host GoatCounter on Railway

GoatCounter is simple, privacy-friendly web analytics. It counts page views, referrers, browsers, screen sizes and locations without cookies or personal data, so most sites do not need a consent banner. The dashboard is fast and readable, and a tiny script or a pixel does the tracking.

About Hosting GoatCounter

This template runs the official arp242/goatcounter:2.7.0 image as one service with SQLite on a Railway volume. On first boot the start command creates a site for your Railway domain and an admin account from the variables, then starts the server; later boots skip that step. The container runs as root so it can write to the Railway volume. Page views and settings survive redeploys. Add the tracking script shown under Settings to your website, and GoatCounter starts counting. It uses very little memory and runs on the Hobby plan, even for sites with a lot of traffic.

Common Use Cases

  • Cookie-free analytics for a blog, docs site or landing page
  • Replacing Google Analytics without a consent banner
  • Counting downloads or events with the pixel or the API

Dependencies for GoatCounter Hosting

  • arp242/goatcounter:2.7.0 (official image)
  • A Railway volume at /home/goatcounter/goatcounter-data

Deployment Dependencies

Implementation Details

ServiceSourceNetworkingStorage
goatcounterarp242/goatcounter:2.7.0public domain on 8080volume at /home/goatcounter/goatcounter-data
VariableDefaultPurpose
GC_ADMIN_EMAILadmin@example.comAdmin created on first boot
GC_ADMIN_PASSWORDgeneratedIts password (first boot only)
RAILWAY_RUN_UID0Runs as root so the volume is writable

Notes:

  • The site is created for the Railway domain. With a custom domain, change the site's domain under Settings > Sites.
  • GoatCounter rejects unknown GOATCOUNTER_* variables, so the admin variables use the GC_ prefix.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the GoatCounter project.

Why Deploy GoatCounter 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 GoatCounter 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
Typesense vs Meilisearch
self-hosted Typesense vs Meilisearch

onepush
0
View Template
Betterlytics
Betterlytics is a cookieless analytics platform GDPR-compliant.

OpenSource Templates
27
View Template
Finance Tracker
Private multi-user household finance ledger with budgets and CSV import.

wotonews
0