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.
sudo apt update && sudo apt upgrade -ycurl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
sudo apt install docker-compose-pluginsudo usermod -aG docker $USERsudo systemctl enable dockersudo rebootdocker run hello-worldmkdir ~/docker/kaunta
In ~/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: jrmckins
POSTGRES_PASSWORD: Mcjim011
volumes:
- ./kauntadb:/var/lib/postgresql/data
restart: on-failure:5
kaunta:
image: kaunta:pi
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:
PORT: 3106
volumes:
- data:/data
ports:
- "3106:3106"
depends_on:
db:
condition: service_healthy
restart: on-failure:5
volumes:
kauntadb:
data:
Since Kaunta doesn't officially support Pi, we have to build it.
From within ~/docker/kaunta run this to download a copy of kaunta:
git clone https://github.com/kaunta/kaunta.git
Now, from within ~/docker/kaunta/kaunta run this to build a local copy of kaunta:
docker build -t kaunta:pi .
From within ~/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_PI>: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_PI: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_PI: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: