Run your own web analytics with Docker Compose: a copy-paste setup
Self-host Tidemark in one container with Docker Compose: the compose file, HTTPS behind a reverse proxy, MariaDB or Postgres, updates and backups.
Self-host Tidemark in one container with Docker Compose: the compose file, HTTPS behind a reverse proxy, MariaDB or Postgres, updates and backups.
If you already run a home server or a small VPS, Docker is probably the easiest way to add analytics. Tidemark ships as a single image for amd64 and arm64 (including Raspberry Pi) that contains the app and its scheduler, so there is nothing else to wire up. This guide gets you from nothing to a working dashboard behind HTTPS. The full reference is in the Docker docs.
stats.example.com.Save this as docker-compose.yml:
services:
tidemark:
image: ghcr.io/tidemark-analytics/tidemark:latest
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- tidemark-data:/data
environment:
APP_URL: https://stats.example.com
volumes:
tidemark-data:
APP_URL is the address visitors and you will use. It appears in the tracking snippet and in links, so set it to your real domain.
docker compose up -d
Then open http://localhost:8080/install (or the server’s address) to create your admin account. Add your site, copy the tracking snippet into your site’s <head>, and the dashboard fills in as pageviews arrive.
The container speaks plain HTTP on port 8080, so put it behind the proxy you already use and forward your domain to that port. A minimal Caddy example:
stats.example.com {
reverse_proxy tidemark:8080
}
Tidemark trusts the proxy’s forwarded headers, so it sees the visitor’s real address for counting and builds HTTPS links.
Visitor countries come from a CDN’s headers, such as Cloudflare’s. Without one, the dashboard shows visits but not where they came from.
Everything that changes lives in the /data volume: the settings file, the SQLite database, logs and uploads. The container can be deleted and recreated at any time without losing anything. Back up that volume and you have backed up Tidemark.
The in-app updater is off in the image, because the container is meant to stay read-only. To update, pull a newer image:
docker compose pull && docker compose up -d
Database changes run on the first request after the update. Pin a version tag instead of latest if you prefer to choose when to update.
SQLite is the default and is fine for most sites. For a larger site, add a database container, then choose MySQL/MariaDB or PostgreSQL in the installer and enter the container’s host, database, user and password. The docs include a ready-made MariaDB compose file.
Set PUID and PGID on the container to run as another user and group. Unraid, for example, uses 99 and 100. There is also a Community Apps template for Unraid users.
Docker is a good fit when you already run containers and want updates to be a single command. If you only have shared hosting, you do not need Docker at all. Tidemark also installs as a PHP zip, and the software is the same either way.