A ready-to-deploy configuration for self-hosting Umami, a privacy-focused, open-source web analytics platform. This setup includes automatic HTTPS via Caddy and optional automated backups to AWS Glacier Deep Archive.
- Docker and Docker Compose
- A domain name with DNS access (for VPS deployment)
- (Optional) AWS CLI configured with credentials for automated backups
- Clone the repository:
git clone https://github.com/photon-collider/selfhost-umami-analytics
cd selfhost-umami-analytics- Configure your environment:
cp .env.example .env
nano .env # Update all valuesRequired changes:
DOMAIN: Your domain namePOSTGRES_PASSWORD: Strong password for databaseAPP_SECRET: Generate withopenssl rand -base64 32
-
Point your domain's DNS A record to your server's IP
-
Start the stack:
docker compose up -d- Access Umami at
https://your-domain.com
To test the setup locally before deploying to your VPS:
- Create a
.envfile (same as production setup):
cp .env.example .env
# Update POSTGRES_PASSWORD and APP_SECRET
# DOMAIN can be left as-is (ignored in local mode)- Run with the local override:
docker compose -f docker-compose.yml -f docker-compose.local.yml up- Access Umami at
http://localhost:3000
What's different in local mode:
- Umami is exposed directly on port 3000 (no Caddy/HTTPS)
- Caddy doesn't run (skipped via profile)
- Same database and application behavior as production
Default login:
- Username:
admin - Password:
umami
To stop: Ctrl+C or docker compose -f docker-compose.yml -f docker-compose.local.yml down