Umami Analytics
Simple, fast, privacy-focused website analytics alternative to Google Analytics
Overview
Umami Analytics is an open-source, privacy-first web analytics platform that serves as a powerful alternative to Google Analytics. Built with a focus on simplicity and data privacy, Umami collects only essential metrics without using cookies or tracking personal information, making it inherently GDPR and CCPA compliant. The platform provides clean, intuitive dashboards showing visitor counts, page views, referrers, and user behavior patterns while respecting user privacy. This deployment combines the Umami analytics server with a PostgreSQL database backend, creating a complete analytics solution. The Umami container runs the Node.js-based web application and API server, while the PostgreSQL database stores all analytics data with ACID compliance and robust performance. The configuration uses health checks to ensure the database is ready before starting Umami, and includes telemetry disabling for complete privacy control. This stack is ideal for organizations, bloggers, and developers who want comprehensive website analytics without compromising visitor privacy or depending on third-party services. The combination of Umami's lightweight interface with PostgreSQL's reliability creates a scalable analytics platform that can handle everything from personal blogs to high-traffic websites while maintaining complete data ownership and privacy compliance.
Key Features
- Cookie-free tracking that complies with GDPR, CCPA, and other privacy regulations without requiring consent banners
- Real-time analytics dashboard showing live visitor activity, page views, and traffic sources with clean visualizations
- Multi-website support allowing unlimited website tracking from a single Umami instance with separate analytics
- Custom event tracking for monitoring button clicks, form submissions, downloads, and other user interactions
- Geographic visitor data showing countries and regions without collecting personally identifiable information
- Device and browser analytics providing insights into visitor technology preferences and mobile usage patterns
- PostgreSQL backend ensuring ACID compliance, complex query capabilities, and reliable data persistence for analytics
- Self-hosted solution providing complete data ownership and control over analytics information and user privacy
Common Use Cases
- 1Privacy-conscious businesses replacing Google Analytics to comply with European GDPR requirements
- 2Content creators and bloggers monitoring website performance without compromising visitor privacy
- 3Educational institutions tracking student portal usage while maintaining strict privacy standards
- 4E-commerce sites analyzing customer behavior and conversion funnels without invasive tracking
- 5Government and healthcare organizations requiring analytics that meet strict data protection regulations
- 6Marketing agencies managing analytics for multiple clients from a centralized, privacy-compliant platform
- 7Developers testing and optimizing web applications with detailed performance and usage metrics
Prerequisites
- Docker and Docker Compose installed with at least 1GB available RAM for PostgreSQL performance
- Port 3000 available for Umami web interface, or configure custom port via UMAMI_PORT environment variable
- Strong passwords set for POSTGRES_PASSWORD and APP_SECRET environment variables before deployment
- Basic understanding of web analytics concepts and JavaScript tracking code implementation
- Administrative access to websites where you plan to install Umami tracking scripts
- Understanding of PostgreSQL basics for potential database maintenance and backup procedures
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 umami: 3 image: ghcr.io/umami-software/umami:postgresql-latest4 container_name: umami5 restart: unless-stopped6 ports: 7 - "${UMAMI_PORT:-3000}:3000"8 environment: 9 - DATABASE_URL=postgresql://umami:${POSTGRES_PASSWORD}@db:5432/umami10 - DATABASE_TYPE=postgresql11 - APP_SECRET=${APP_SECRET}12 - DISABLE_TELEMETRY=113 depends_on: 14 db: 15 condition: service_healthy1617 db: 18 image: postgres:15-alpine19 container_name: umami-db20 restart: unless-stopped21 environment: 22 - POSTGRES_DB=umami23 - POSTGRES_USER=umami24 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}25 volumes: 26 - umami_db_data:/var/lib/postgresql/data27 healthcheck: 28 test: ["CMD-SHELL", "pg_isready -U umami"]29 interval: 5s30 timeout: 5s31 retries: 53233volumes: 34 umami_db_data: .env Template
.env
1# Umami Configuration2UMAMI_PORT=300034# Database password5POSTGRES_PASSWORD=umami_password67# App secret (generate with: openssl rand -base64 32)8APP_SECRET=your-random-secret-stringUsage Notes
- 1Dashboard at http://localhost:3000
- 2Default login: admin / umami
- 3Change password after first login
- 4Add websites and get tracking code
- 5Privacy-focused - no cookies
- 6GDPR/CCPA compliant out of the box
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
umami
umami:
image: ghcr.io/umami-software/umami:postgresql-latest
container_name: umami
restart: unless-stopped
ports:
- ${UMAMI_PORT:-3000}:3000
environment:
- DATABASE_URL=postgresql://umami:${POSTGRES_PASSWORD}@db:5432/umami
- DATABASE_TYPE=postgresql
- APP_SECRET=${APP_SECRET}
- DISABLE_TELEMETRY=1
depends_on:
db:
condition: service_healthy
db
db:
image: postgres:15-alpine
container_name: umami-db
restart: unless-stopped
environment:
- POSTGRES_DB=umami
- POSTGRES_USER=umami
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- umami_db_data:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U umami
interval: 5s
timeout: 5s
retries: 5
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 umami:5 image: ghcr.io/umami-software/umami:postgresql-latest6 container_name: umami7 restart: unless-stopped8 ports:9 - "${UMAMI_PORT:-3000}:3000"10 environment:11 - DATABASE_URL=postgresql://umami:${POSTGRES_PASSWORD}@db:5432/umami12 - DATABASE_TYPE=postgresql13 - APP_SECRET=${APP_SECRET}14 - DISABLE_TELEMETRY=115 depends_on:16 db:17 condition: service_healthy1819 db:20 image: postgres:15-alpine21 container_name: umami-db22 restart: unless-stopped23 environment:24 - POSTGRES_DB=umami25 - POSTGRES_USER=umami26 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}27 volumes:28 - umami_db_data:/var/lib/postgresql/data29 healthcheck:30 test: ["CMD-SHELL", "pg_isready -U umami"]31 interval: 5s32 timeout: 5s33 retries: 53435volumes:36 umami_db_data:37EOF3839# 2. Create the .env file40cat > .env << 'EOF'41# Umami Configuration42UMAMI_PORT=30004344# Database password45POSTGRES_PASSWORD=umami_password4647# App secret (generate with: openssl rand -base64 32)48APP_SECRET=your-random-secret-string49EOF5051# 3. Start the services52docker compose up -d5354# 4. View logs55docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/umami/run | bashTroubleshooting
- Umami container exits with database connection error: Ensure POSTGRES_PASSWORD matches between umami and db services in environment variables
- Web interface shows 'Internal Server Error' on startup: Check that APP_SECRET environment variable is set to a secure random string
- Cannot access dashboard at localhost:3000: Verify port 3000 is not in use by another service or change UMAMI_PORT variable
- Database connection timeouts during startup: Wait for PostgreSQL health check to pass or increase health check timeout values
- Tracking script not recording data: Verify website tracking code is properly installed and domain matches configured site settings
- High memory usage from umami-db container: Monitor PostgreSQL performance and consider increasing available RAM or optimizing query patterns
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
umamipostgres
Tags
#analytics#privacy#metrics#tracking#gdpr
Category
Monitoring & ObservabilityAd Space
Shortcuts: C CopyF FavoriteD Download