Deploy GoatCounter
GoatCounter 2.7: privacy-friendly web analytics without cookie banners.
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
| Service | Source | Networking | Storage |
|---|---|---|---|
| goatcounter | arp242/goatcounter:2.7.0 | public domain on 8080 | volume at /home/goatcounter/goatcounter-data |
| Variable | Default | Purpose |
|---|---|---|
GC_ADMIN_EMAIL | admin@example.com | Admin created on first boot |
GC_ADMIN_PASSWORD | generated | Its password (first boot only) |
RAILWAY_RUN_UID | 0 | Runs 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 theGC_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
goatcounter
arp242/goatcounter:2.7.0