Deploying an Umami App
Introduction
Umami is a privacy-focused web analytics platform that runs on Node.js with a PostgreSQL backend. This guide walks through containerizing Umami, configuring secrets, connecting to Postgres, and deploying to Klutch.sh over HTTP.
Prerequisites
- GitHub repository containing your Dockerfile.
- PostgreSQL database (managed or deployed separately).
- Klutch.sh project ready in klutch.sh/app.
Project structure
.└── DockerfileSample Dockerfile
FROM ghcr.io/umami-software/umami:postgresql-latest
# Default Umami portENV PORT=3000EXPOSE 3000Required environment variables
DATABASE_URL– e.g.,postgres://USER:PASSWORD@HOST:PORT/DBAPP_SECRET– strong random string for signingPORT– internal port (default3000)
Optional environment variables
TRACKER_SCRIPT_NAME– customize tracker path (defaultumami.js)HASH_SALT– add salt for hashed IPsNODE_ENV=production
Persistence
All data lives in PostgreSQL. No local volume is required unless you extend Umami to store files.
Networking
- Protocol: HTTP
- Internal port:
3000 - Users reach
https://example-app.klutch.shwhile Klutch.sh routes to port3000inside the container.
Health check (recommended)
curl -I http://localhost:3000Deployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Select HTTP traffic and set the internal port to
3000. - Add environment variables for
DATABASE_URL,APP_SECRET, and any tracker customization. Mark secrets as sensitive. - Deploy. After first boot, create your admin user in the Umami UI.
Verification
-
UI: open
https://example-app.klutch.shand confirm the login page appears. -
Quick check:
Terminal window curl -I https://example-app.klutch.sh
Next steps
- Add your domains and tracking script to your sites.
- Set up database backups for PostgreSQL.
- Rotate
APP_SECRETperiodically and maintain strong database credentials.