compose.yaml with the ghcr.io/umami-software/umami:latest and postgres:15-alpine images, set a random APP_SECRET and database password, and run sudo docker compose up -d. Serve port 3000 through Nginx with HTTPS, log in with admin / umami, change the password and add your website.
What is Umami?
Umami is an open-source, privacy-focused web analytics tool, a self-hosted alternative to Google Analytics. A small script on your site records page views and events in your own PostgreSQL database, and Umami shows them on a dashboard.Before you start
- Install Docker and Nginx. The commands use
sudo; leave it out if you areroot. - Point a subdomain such as
stats.example.comat your server. See point a domain to your server. - Use HTTPS. Browsers block a tracking script loaded over HTTP from an HTTPS website.
How to install Umami with Docker Compose
1
Create a folder and secrets
APP_SECRET secures login tokens and must be unique per installation. TWO_FACTOR_ENCRYPTION_KEY (64 hex characters) is needed before anyone can turn on two-factor authentication.2
Create compose.yaml
This is the official Umami compose file with the secrets moved to
.env and the port bound to 127.0.0.1:DATABASE_URL is the only setting Umami requires. The database is reachable only on the internal Compose network.3
Start Umami
How to serve Umami over HTTPS with Nginx
1
Create the Nginx site
Create
/etc/nginx/sites-available/stats.example.com (Ubuntu / Debian) or /etc/nginx/conf.d/stats.example.com.conf (AlmaLinux / Rocky):2
Enable, test and get a certificate
sudo setsebool -P httpd_can_network_connect 1 before testing.How to log in and add your website
1
Log in and change the password
Open
https://stats.example.com and log in with username admin and password umami. Change the password at once: open the profile button in the side navigation, select Settings, go to Profile and click Change password.2
Add a website
Click Websites in the sidebar, then Add website. Enter a Name and the site’s Domain, for example
example.com, and click Save.3
Install the tracking code
Click Edit on the website, copy the code from the Tracking code section and paste it into the
<head> of every page of your site.How to check it worked
Up (healthy), and the heartbeat request returns a response. Open your website in another browser tab, then open the website in Umami: the visit appears on its dashboard.
How to back up Umami
All analytics data is in PostgreSQL. Dump it to a file:.env off the server. See back up Docker volumes and back up to cloud storage with rclone.
How to update Umami
Back up first, then:ANALYZE; on the database:
Frequently asked questions
What is the default Umami login?
Usernameadmin, password umami. Umami creates this user when it first sets up the database.
Why are visits not recorded?
Ad blockers often blockscript.js. Set TRACKER_SCRIPT_NAME to a different name in the Umami environment, recreate the container and copy the new tracking code. Also check that the website’s Domain in Umami matches your site.
Can I track several websites with one Umami?
Yes. Add each site under Websites > Add website. Each website has its own tracking code under Edit > Tracking code.How do I turn off Umami’s telemetry?
AddDISABLE_TELEMETRY: 1 to the umami service’s environment and run sudo docker compose up -d.
Related guides
VPS and dedicated server guides
Every guide in this section.
Docker Compose tutorial
How compose.yaml works.
Nginx reverse proxy
Serve containers on your domain.
Free SSL with Certbot
HTTPS for your analytics domain.
Update Docker containers
Pull new images safely.
Checked against the official Umami documentation and compose file on 4 November 2026 (images
ghcr.io/umami-software/umami:latest and postgres:15-alpine); compose.yaml validated with docker compose config and the Nginx configuration syntax-tested on Ubuntu 24.04 LTS. Menu names can change between Umami releases.Need Extra Help?
If you encounter any issues, our support team is ready to assist:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026