Self-host · Coolify, CapRover, Dokku
Self-hosted analytics on Coolify, CapRover or Dokku
Self-hosted analytics on Coolify, CapRover or Dokku is the Skald image with persistent storage, on a server you already run. The panel gives it HTTPS; when your site runs on the same server, Skald reads its log in place.
Self-hosted analytics on Coolify means running Skald's Docker image as a Coolify resource, with persistent storage at /var/lib/skald and a domain from Coolify's proxy. CapRover and Dokku work the same way: a web panel or a git push on your own server. One of the ways to self-host Skald free.
30-day free trial · no card · we set it up within one working day · free to self-host
- image ghcr.io/spcaeo/skald:latestsource
- storage /var/lib/skaldhistory
- log /var/log/nginx → /logs, read-onlysame server
- port 8080container
- SKALD_SITE example.comvariable
- domain https://stats.example.comHTTPS
Sample settings. Coolify, CapRover and Dokku name these parts a little differently.
[01] your panel
Run Skald on Coolify, CapRover or Dokku
All three run the same image with the same storage and port. Pick yours. Change example.com and the names to your own before you copy.
1. New resource
Docker Image:
ghcr.io/spcaeo/skald:latest. Or Docker Compose from your fork'sdocker-compose.yml: drop itscaddyservice, Coolify gives you HTTPS.2. Storage, port, domain
Add Persistent Storage at
/var/lib/skald, set the port to8080and the domain tohttps://stats.example.com.3. Variables, then the owner
Add the
SKALD_*variables and deploy. Open the resource's Terminal and run the first owner command below.
1. An app with data
Create an app with Has Persistent Data on, and add a persistent directory with the path in app
/var/lib/skald.2. Port and variables
Set Container HTTP Port to
8080and add theSKALD_*environment variables.3. Deploy the image
Deployment > Deploy via ImageName:
ghcr.io/spcaeo/skald:latest. Turn on HTTPS for the app's domain. If the folder is not writable by user 10001,chown 10001:10001its host directory once.
dokku apps:create skald
dokku storage:ensure-directory skald
sudo chown 10001:10001 /var/lib/dokku/data/storage/skald
dokku storage:mount skald /var/lib/dokku/data/storage/skald:/var/lib/skald
dokku config:set skald SKALD_SITE=example.com SKALD_HOSTS="example.com www.example.com" \
SKALD_BASE_URL=https://stats.example.com SKALD_TIMEZONE=UTC
dokku domains:set skald stats.example.com
dokku ports:set skald http:80:8080
dokku git:from-image skald ghcr.io/spcaeo/skald:latest
dokku letsencrypt:enable skald
The last line needs the dokku-letsencrypt plugin. The first owner command for Dokku is below.
[02] the same on all three
What Skald needs from any PaaS
Each panel has its own word for these parts. Skald needs the same five things from each.
Run exactly one copy. Skald keeps its history in SQLite on one disk, so never scale the app past one container, and never point two apps at one storage folder.
| Part | What Skald needs |
|---|---|
| Image | ghcr.io/spcaeo/skald, with a tag such as :2 |
| Storage | persistent, at /var/lib/skald, writable by user 10001 |
| Port | 8080 inside the container |
| HTTPS | from the panel's proxy. Sign-in needs it: the session cookie is Secure |
| Variables | SKALD_SITE, SKALD_HOSTS, SKALD_BASE_URL, SKALD_TIMEZONE |
| Health check | GET /traffic-auth/login answers 200 |
[03] first owner
Make the first owner inside the container
In Coolify, the resource's Terminal. In CapRover, a shell in the app's container. Change the name and the email to your own before you copy.
$ skald accounts init --org "Example Co" --owner-email owner@example.com
$ dokku enter skald web skald accounts init --org "Example Co" --owner-email owner@example.com
Either one prints a link that sets the owner's password.
[04] your site's log
Your site's log, on the same server or not
When the site's own nginx runs on the same server, Skald reads its access log in place. Mount /var/log/nginx at /logs in Skald's container, read-only, as with plain Docker.
Skald's user is in group adm, which can read that log on stock Ubuntu and Debian. The log file is access.log unless you set SKALD_LOG_FILE.
When the site runs somewhere else, or behind the panel's own proxy with no nginx log on the host, its requests arrive by HTTPS instead. Set SKALD_INGEST=true and SKALD_LOG_DIR=/var/lib/skald/ingest/example.com, then send the log:
[05] keeping it
Backups and upgrades on your own PaaS
The storage folder holds everything Skald keeps. It lives on your server, so its copies are yours to keep too.
Skald's own backups
A nightly and a weekly copy of the history, each restored into a scratch file and checked before it counts.
skald backupin the container makes one now.Copy them off the server
Skald's copies sit in the same storage folder. Copy that folder to another machine as well, with the backup tool you already use.
Upgrades
Take a backup, then deploy the new tag the way the panel deploys any image. The databases are brought up to date at start. Pin
:2to get every 2.x release and never a breaking one.
What it does not do on a PaaS
- It does not scale past one container. The history is SQLite on one disk.
- It does not see a site behind the panel's own proxy unless that proxy's log reaches it, or the site's log is sent.
- A site with no server or CDN log (the script tag alone) shows no AI crawlers and no bots.
- Sign-in does not work over plain HTTP: turn HTTPS on for the domain.
keep reading
More on self-hosted analytics on Coolify
questions
Self-hosted analytics on Coolify, CapRover and Dokku FAQ
Straight answers, including what Skald does not do.
Should I deploy Skald on Coolify from the image or from Docker Compose?
Either works. The image ghcr.io/spcaeo/skald:latest is the shortest road. Docker Compose from your fork's docker-compose.yml also works: remove its caddy service first, because Coolify gives the resource HTTPS itself.
Can Skald read my site's log on the same Coolify, CapRover or Dokku server?
Yes, when the site's own nginx writes its log on that server. Mount /var/log/nginx read-only at /logs in Skald's container, as with plain Docker. The container's user is in group adm, which can read that log on stock Ubuntu and Debian.
Why does Skald say the data folder is not writable on CapRover?
Skald runs as user 10001. If the host folder behind /var/lib/skald belongs to another user, run chown 10001:10001 on that host folder once, then restart the app.
Does Dokku need a plugin for Skald's HTTPS?
For the letsencrypt command, yes: dokku letsencrypt:enable needs the dokku-letsencrypt plugin. Sign-in needs HTTPS, because Skald's session cookie is Secure.
How do I upgrade Skald on Coolify, CapRover or Dokku?
Run skald backup inside the container first. Then deploy the new image tag the way the panel deploys any image. The databases are brought up to date when the container starts. Pin :2 to get every 2.x release and never a breaking one.
$ tail -f access.log | skald
See what AI does with your site. Free for 30 days.
No card. We set up hosted Skald for you within one working day, or you self-host it free. Every line of your log, sorted and added up.