Docker Installation
Docker is the recommended way to install Umami. This guide covers both Docker Compose (easiest) and standalone Docker installation.Prerequisites
Make sure you have Docker and Docker Compose installed on your system. Visit docker.com for installation instructions.
- Docker Engine 20.10+
- Docker Compose v2.0+ (included with Docker Desktop)
- At least 512MB RAM
- 1GB free disk space
Quick Start with Docker Compose
The fastest way to get Umami running with a PostgreSQL database.Get the Docker Compose File
Clone the repository or download the Or create your own
docker-compose.yml file:docker-compose.yml file:docker-compose.yml
Configure Environment Variables
You can generate a random secret:Or use an online generator. Update your
docker-compose.yml:Start the Containers
Launch Umami and PostgreSQL:The
-d flag runs containers in detached mode (background).Verify Installation
Check that both containers are running:You should see both
umami and db with status “Up” and “healthy”.View logs to confirm successful startup:Using Pre-built Docker Image
You can also run Umami using just Docker (without Docker Compose) if you have an external PostgreSQL database.Pull the Image
Run the Container
- With External Database
- With Docker Network
If you have an existing PostgreSQL database:Replace the DATABASE_URL with your actual database connection string.
Configuration Options
Environment Variables
DATABASE_URL
Required. PostgreSQL connection string
APP_SECRET
Required. Random string for securing sessions and data
PORT
Optional. Port to run on (default: 3000)
BASE_PATH
Optional. Base path for reverse proxy setups
Volume Mounts
The Docker Compose setup creates a persistent volume for PostgreSQL data:Building from Source
To build your own Docker image from source:Build Arguments
The Dockerfile supports build arguments:NODE_IMAGE_VERSION: Node.js base image version (default: 22-alpine)BASE_PATH: URL base path for serving UmamiPRISMA_VERSION: Prisma version to use (default: 6.19.0)
Management Commands
View Logs
Restart Containers
Stop and Remove
Updating Umami
Database migrations run automatically on startup, so your schema will be updated when you upgrade to a new version.
Troubleshooting
Containers won't start
Containers won't start
Check logs for errors:Common issues:
- Port 3000 already in use (change port mapping)
- DATABASE_URL incorrect
- Insufficient memory or disk space
Database connection failed
Database connection failed
Verify database is healthy:Check DATABASE_URL format:Ensure database is reachable from Umami container.
Can't access localhost:3000
Can't access localhost:3000
- Check container is running:
docker compose ps - Verify port mapping in docker-compose.yml
- Check firewall settings
- Try
http://127.0.0.1:3000instead
Data lost after restart
Data lost after restart
Ensure volumes are properly configured:You should see
umami-db-data volume. If not, your data wasn’t persisted.Production Deployment
Next Steps
Environment Variables
Configure advanced Umami features
Database Setup
Optimize your database configuration
Add Your Website
Start tracking your first website
Running in Production
Production deployment guide