Umami
Umami is a lightweight, privacy-focused web analytics platform that provides simple and fast insights into your website traffic without relying on cookies or invasive tracking. Designed as an open-source alternative to Google Analytics, it gives you full control over your data. This stack includes: Umami analytics server with a clean and minimal dashboard PostgreSQL database for reliable data storage Environment-based configuration for security and customization Persistent storage for analytics data Easy deployment with minimal resource usage Perfect for developers, startups, and privacy-conscious website owners who want a fast, self-hosted analytics solution with no tracking overhead and full data ownership.
yaml
docker-compose.yml
services:
umami-db:
image: postgres:15-alpine
container_name: umami-db
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: umami
volumes:
- ./umami-db-data:/var/lib/postgresql/data
restart: unless-stopped
umami:
image: umamisoftware/umami:postgresql-latest
container_name: umami
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://umami:umami@umami-db:5432/umami
DATABASE_TYPE: postgresql
HASH_SALT: ${HASH_SALT}
TRACKER_SCRIPT_NAME: ${TRACKER_SCRIPT_NAME}
COLLECT_API_ENDPOINT: ${COLLECT_API_ENDPOINT}
APP_SECRET: ${APP_SECRET}
depends_on:
- umami-db
restart: unless-stopped
.ENV
.env example
HASH_SALT=hash_salt_change_me
TRACKER_SCRIPT_NAME=update_script
COLLECT_API_ENDPOINT=/api/update
APP_SECRET=secret_change_me
deployment
Quick Start
- Create a working directory named after the service.
- Copy the compose file and generated `.env` into that directory.
- Review the variables and replace placeholders with real values.
- Run `docker compose up -d`.
mkdir umami-postgres
cd umami-postgres
# create docker-compose.yml
# create .env
docker compose up -d