Why self-host Umami on a VPS
Mainstream analytics solutions collect your visitors' data and use it for their own purposes. Umami reverses the logic: it sets no cookies, does not track individuals, and keeps your statistics with you. On a dedicated VPS, the audience database remains your property, you avoid the consent banner tied to third-party tracking, and the service handles a comfortable load for a fixed cost.
The concrete benefits of a self-hosted Umami
- Privacy-compliant: no cookies, no personal data, often no consent banner required.
- Your audience statistics stay on your server, with no sharing to a third party.
- Ultra-lightweight tracking script, with no noticeable impact on page speed.
- Clear, multi-site dashboard from a single instance.
- Fixed cost regardless of the volume of page views.
Hardware and software requirements
Umami is very lightweight. 1 vCPU and 1 GB of RAM are enough to start, 2 GB if you track heavy traffic or several sites. Plan for 5 GB of disk for PostgreSQL. On the software side: Docker and Docker Compose, a subdomain (e.g. stats.your-domain.com) pointing to the VPS IP, and port 443 open.
Deploy Umami with Docker and HTTPS
Prepare the VPS and Docker
Over SSH, update the system and install Docker via curl -fsSL https://get.docker.com | sh. Create mkdir -p /opt/umami && cd /opt/umami.
Write the docker-compose.yml
Define two services: ghcr.io/umami-software/umami:postgresql-latest and a postgres database. Fill in DATABASE_URL and a random APP_SECRET.
Start the containers
Run docker compose up -d. Umami listens locally on port 3000; the database is initialised automatically on first start.
Configure the reverse proxy
With Caddy: stats.your-domain.com { reverse_proxy localhost:3000 }. The Let's Encrypt certificate is obtained and renewed automatically.
Add your site and the script
Log in (admin/umami by default, change it immediately), add your site and paste the tracking snippet provided into the <head> of your pages.
Change the default administrator password on your first login, and back up the PostgreSQL database regularly: it is what holds your entire audience history.
The official documentation
For advanced configuration and options specific to the tool, refer to the official Umami documentation. This guide covers going live on a VPS; the vendor's documentation remains the reference for fine-tuning, major updates and specific use cases.