Introduction
Umami is a simple, fast, privacy-focused alternative to Google Analytics that you can self-host on your own infrastructure. This guide will help you get started with self-hosting Umami.Why Self-Host Umami?
Privacy-First
Full control over your analytics data with no third-party tracking
Open Source
MIT licensed with complete source code transparency
Lightweight
Minimal resource requirements with efficient data storage
GDPR Compliant
No cookies, no personal data collection by default
Requirements
Before you begin, ensure you have:Node.js
Version 18.18 or higher
Database
PostgreSQL v12.14+ or ClickHouse (optional)
Server
Linux, macOS, or Windows with 1GB+ RAM
Package Manager
pnpm (recommended) or npm
For production deployments, we recommend at least 2GB of RAM and 20GB of disk space.
Deployment Options
Umami offers multiple deployment methods to suit your infrastructure:- Docker (Recommended)
- Source Installation
- Kubernetes
The easiest way to get started. Docker Compose automatically sets up Umami with PostgreSQL.Perfect for quick deployments and production use.
Quick Start with Docker
Start with Docker Compose
- Pull the latest Umami image
- Start a PostgreSQL database
- Initialize the database schema
- Start Umami on port 3000
Quick Start from Source
Configure environment variables
Create a Replace with your actual PostgreSQL connection details.
.env file in the root directory:Build the application
The build process will automatically create database tables and a default admin user.
Database Options
Umami supports two database backends:- PostgreSQL
- ClickHouse
Recommended for most users
- Mature, reliable, and well-documented
- Full SQL support with ACID compliance
- Minimum version: 12.14
- Ideal for small to medium-sized deployments
Default Credentials
Next Steps
Now that you have Umami running, here’s what to do next:Docker Deployment
Learn advanced Docker configuration options
Environment Variables
Configure Umami with environment variables
PostgreSQL Setup
Optimize your PostgreSQL database
Upgrading
Keep your instance up to date
Common Issues
Port 3000 is already in use
Port 3000 is already in use
Change the port by setting the Or modify the docker-compose.yml ports section:
PORT environment variable:Database connection failed
Database connection failed
Verify your DATABASE_URL is correct:
- Check the hostname, port, username, and password
- Ensure PostgreSQL is running
- Verify the database exists
- Check firewall rules allow connections
Build fails with Node.js version error
Build fails with Node.js version error
Umami requires Node.js 18.18 or higher. Check your version:Upgrade Node.js if needed using nvm: