Kaunta is a fast, privacy‑first web analytics platform built in Go, engineered as a seamless drop‑in replacement for Umami. Designed with simplicity and efficiency at its core, it delivers powerful insights while maintaining a minimal footprint — combining speed, security, and ease of use without compromising data protection.
I have two NVME SSDs installed in my DXP2800, mirrored, that I use to hold apps and docker containers. It's configured as /volume2. All of my docker containers are run from /volume2/docker
mkdir /volume2/docker/kaunta
In /volume2/docker/kaunta create docker-compose.yml
services:
db:
image: postgres:18-alpine
container_name: kaunta-db
hostname: kaunta-db
security_opt:
- no-new-privileges:false
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "kaunta", "-U", "jrmckins"]
timeout: 45s
interval: 10s
retries: 10
environment:
POSTGRES_DB: kaunta
POSTGRES_USER: kaunta #Use whatever you want here
POSTGRES_PASSWORD: kaunta #Set the pasword that you want to use
volumes:
- kauntadb:/var/lib/postgresql/data
restart: on-failure:5
kaunta:
image: ghcr.io/seuros/kaunta:latest
container_name: kaunta
healthcheck:
test: ["CMD-SHELL", "nc -z 127.0.0.1 3106 || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 90s
environment:
DATABASE_URL: postgresql://kaunta:kaunta@kaunta-db:5432/kaunta?sslmode=disable
PORT: 3106
ports:
- "3106:3106"
depends_on:
db:
condition: service_healthy
restart: on-failure:5
volumes:
kauntadb:
From within /volume2/docker/kaunta run:
docker compose up -d
View logs for kaunta
docker logs kaunta
View logs for kaunta-db
docker logs kaunta-db
Browse to <YOUR_UGREEN>:3106/setup
Fill in:
Hostwithkaunta-dbDatabase NamewithkauntaUsernamewithYOUR USERNAMEPasswordwithYOUR PASSWORD
Click on Test Database Connection
Now create the administrator acount by filling in Username, Password, and Confirm Password
Click Complete Setup
You can check that your user account was created by running:
docker exec -it kaunta kaunta user list
Run this to add the website that you want to gather analytics from
docker exec -it kaunta kaunta website create your_website.com
This will return your Website ID, also called Tracking Code ID
You can also run this to get your WEBSITE ID
docker exec -it kaunta kaunta website list
You can also add a website using the GUI by browsing to YOUR_UGREEN:3106/dashboard/websites and clicking on Add Website.
You will need the WEBSITE ID to use in your tracker snippet.
This is the snippet that you'll need to add after <head> in all your html files for your website.
<!-- Kaunta tracking script --> <script async defer data-website-id="WEBSITE ID" src="https://kaunta.your_website.com/k.js"> </script>
The easiest way to do this is to cd to the main directory for your website and run this
cd /home/your_id/your_website
find . -name "*.html" -exec sed -i '' '/<head>/a\
<!-- Kaunta tracking script -->\
<script async defer\
data-website-id="WEBSITE ID"\
src="https://kaunta.your_website.com/k.js">\
</script>' {} +
This finds all your html files in /home/your_id/your_website and inserts the snippet after the <head> tag in each one.
Open your browser and go to YOUR_UGREEN:3106/dashboard
It may default to Kaunta Dashboard. Click on the down arrow next to Kaunta Dashboard and select your website.
If you find my content useful, please consider supporting this page: