Umami is an open-source, privacy-first website analytics tool that supports real-time traffic statistics, custom event tracking, and multi-site management, making it a lightweight and secure alternative to Google Analytics.
Umami is a simple, fast, privacy-focused website analytics tool. It is a lightweight open-source alternative to Google Analytics, allowing website owners full control over their data while avoiding the collection of visitor personal information, complying with privacy regulations such as GDPR/CCPA.
Ensure Docker and Docker Compose are installed, then create a docker-compose.yml
file:
version: '3'
services:
umami:
image: ghcr.io/umami-software/umami:postgresql-latest
ports:
- '3000:3000'
environment:
DATABASE_URL: postgresql://umami:password@db:5432/umami
DATABASE_TYPE: postgresql
APP_SECRET: random string
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: password
volumes:
- umami-db-data:/var/lib/postgresql/data
volumes:
umami-db-data:
Execute:
docker compose up -d
Visit http://localhost:3000
, log in with the default admin account.
Clone the code:
git clone https://github.com/umami-software/umami.git
cd umami
npm install
Configure environment variables:
Set DATABASE_URL=postgresql://...
or mysql://...
in the .env
file.
Build and run the application:
npm run build
npm run start
The login address is usually http://localhost:3000
.
<script defer src="…/script.js" data-website-id="…">
in the <head>
to start collecting page data ([dev.to][5]).umami.track('button_click')
to track specific interactive events.Share your thoughts about this page. All fields marked with * are required.