# Self-host GoatCounter

> A privacy-friendly, open-source web analytics platform that never tracks individual visitors.

- Page: https://levelrail.com/templates/goatcounter/
- JSON: https://levelrail.com/templates/goatcounter.json
- Category: Analytics
- Licence: EUPL-1.2 (Copyleft license)
- Source: https://github.com/arp242/goatcounter
- Upstream docs: https://www.goatcounter.com/help

## Requirements
- Memory: about 128 MiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 2.7

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| goatcounter | arp242/goatcounter | 2.7 | 8080 | goatcounter_data -> /home/goatcounter/goatcounter-data |

## Deploy

### CLI

```bash
levelrail-cli templates deploy goatcounter --name my-goatcounter
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/goatcounter/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy GoatCounter on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id goatcounter for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image arp242/goatcounter:2.7 is what you deploy there.

Self-host GoatCounter, GoatCounter docker compose file, deploy GoatCounter on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
