Self-hosting GoatCounter the easy way

Self-hosting GoatCounter the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
4 min

GoatCounter is a lightweight, privacy-friendly web analytics platform. Unlike Google Analytics, it doesn't use cookies, doesn't track personal data, and is fully GDPR-compliant out of the box. GoatCounter offers a free hosted plan for non-commercial use, but the commercial plans start at $15/month and you share infrastructure with everyone else. Self-hosting gives you full control over your data and unlimited sites.

Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get GoatCounter up and running in minutes - no server setup, no reverse proxy config, no infrastructure to maintain.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy GoatCounter >
  1. Click the deploy button above
  2. Select a project
  3. Select a server (If you just signed up you get a 48-hour free trial server)
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's GoatCounter preset. Here's what's included:

  • Official arp242/goatcounter Docker image
  • Version 2.7.0 pinned for stability
  • Persistent storage mounted to /home/goatcounter/goatcounter-data for the SQLite database
  • Automatic database migrations enabled via the -automigrate flag
  • Healthcheck configured at /status

Next steps

Once GoatCounter is running on Sliplane, access it using the domain Sliplane provided (e.g. goatcounter-xxxx.sliplane.app).

Initial setup

On first launch, GoatCounter shows a setup wizard in your browser. You'll create your first site and admin account right there. Just navigate to your Sliplane domain and follow the on-screen instructions.

Adding tracking to your site

After creating your site, add the GoatCounter script tag to your website:

<script data-goatcounter="https://YOUR-SLIPLANE-DOMAIN/count"
        async src="//YOUR-SLIPLANE-DOMAIN/count.js"></script>

Replace YOUR-SLIPLANE-DOMAIN with your actual Sliplane domain (e.g. goatcounter-xxxx.sliplane.app).

Environment variables

GoatCounter uses a GOATCOUNTER_ prefix for environment variables. You can customize behavior by adding them in your Sliplane service settings:

VariableDefaultDescription
GOATCOUNTER_LISTEN*:8080Address and port to listen on
GOATCOUNTER_DBsqlite+./goatcounter-data/db.sqlite3Database connection string
GOATCOUNTER_SMTP(none)SMTP server for sending emails

Logging

GoatCounter logs to stdout by default, which integrates well with Sliplane's built-in log viewer. For general Docker log tips, check out our post on how to use Docker logs.

Cost comparison

You can also self-host GoatCounter with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB50 GB€22.80Flat rate, free egress, SSL included
Fly.io22 GB40 GB~$17.83Disk and bandwidth billed separately
Render12 GB40 GB~$355 GB bandwidth included on Hobby; disk billed separately
Railway22 GB40 GBUp to ~$66Usage-based; Pro required for a 40 GB volume
Click here to see how these numbers were calculated.

Prices checked July 19, 2026. Assuming an always-on instance running 730 hrs/month, Germany/Amsterdam where regional pricing applies, excluding VAT and egress.

  • Sliplane: Base server with 2 vCPU, 2 GB RAM and 20 GB storage = €17.80/month; the 50 GB storage tier adds €5 -> €22.80/month. Unlimited services, free egress and SSL are included.
  • Fly.io: in Amsterdam, shared-cpu-2x with 2 GB RAM = $11.83/month + 40 GB volume × $0.15/GB = $6 -> ~$17.83/month. Egress is billed separately at $0.02/GB in Europe.
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/month. A Hobby workspace includes 5 GB bandwidth, then charges $0.15/GB. Stepping up to Pro compute (2 vCPU / 4 GB) costs $85/month plus disk.
  • Railway (Pro plan): at full resource usage: CPU 2 × $20/vCPU/month = $40; RAM 2 × $10/GB/month = $20; volume 40 × $0.15/GB/month = $6 -> up to ~$66/month. Actual CPU and RAM charges depend on usage. A 40 GB volume requires Pro; its $20/month subscription is a minimum commitment that counts toward usage, not an additional charge. Egress is $0.05/GB.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

Bandwidth Cost Growth Comparison

Move the slider or play the animation to compare monthly egress costs. Sliplane stays free as traffic grows.

0 GB
Sliplane
Free
Fly.io
$0.00
Railway
$0.00
Render
$0.00

Egress only, excluding compute and storage. Based on public US/European rates checked July 19, 2026. Render includes its first 5 GB per month. Sliplane egress is free, subject to the Fair Use Policy.

FAQ

What can I track with GoatCounter?

GoatCounter tracks pageviews, referrers, browser and OS stats, screen sizes, countries, and languages. It does all of this without cookies and without collecting any personal data. You can also set up custom events to track button clicks or other user actions.

How do I configure GoatCounter for multiple sites?

GoatCounter's serve command runs a single-site instance by default. If you need multiple sites, you can run the saas command instead, which enables multi-tenant mode. Set the GOATCOUNTER_LISTEN environment variable and adjust the command in your Sliplane service settings.

How do I update GoatCounter?

Change the image tag in your service settings on Sliplane (e.g. from 2.7.0 to a newer version) and redeploy. Check Docker Hub for the latest stable version. The -automigrate flag ensures database schema updates run automatically.

Are there alternatives to GoatCounter?

Popular alternatives include Plausible Analytics (another privacy-first option), Umami (open-source with a modern UI), and Matomo (feature-rich Google Analytics replacement). For dashboarding and metrics visualization, check out self-hosting Grafana the easy way or 5 awesome Grafana alternatives.

Does GoatCounter work behind a CDN or reverse proxy?

Yes. GoatCounter reads the X-Forwarded-For and X-Real-IP headers to determine visitor IPs. Since Sliplane handles TLS termination and reverse proxying for you, GoatCounter works out of the box without any extra configuration.

Self-host GoatCounter now - It's easy!

Sliplane gives you all the tools you need to run GoatCounter without server hassle.