How to Install Umami Analytics on AlmaLinux 10

By Raman Kumar

Updated on Nov 24, 2025

In this tutorial, we'll learn how to install Umami analytics on AlmaLinux 10.

What Is Umami?

Umami is a self-hosted, privacy-focused website analytics platform designed to give us clear insights without the complexity or tracking issues found in traditional analytics tools. It collects essential metrics such as page views, visitor sources, devices, and screen sizes while keeping data lightweight, fast, and fully in our control. 

Umami does not use cookies, does not track personal information, and easily bypasses most ad-blockers when configured correctly. Because we host it on our own server, we get full ownership of our analytics data with no third-party dependence. It is a great choice for businesses, developers, and agencies that want simple and accurate analytics without sacrificing user privacy.

Prerequisites

Before we begin, ensure we have the following:

  • An AlmaLinux 10 on dedicated server or KVM VPS.
  • Basic Linux Command Line Knowledge.
  • A domain name pointing A record to server IP.

How to Install Umami Analytics on AlmaLinux 10

1. Update AlmaLinux 10

We update the server first so everything runs smoothly.

sudo dnf update -y

2. Install Docker and Docker Compose

Add repository:

sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
 

To install the latest version, run:

sudo dnf install docker-ce -y
sudo systemctl enable --now docker
 

Check versions:

docker --version
docker compose version

3. Create Umami Project Folder

mkdir ~/umami && cd ~/umami

This keeps everything organized.

4. Create Secrets for Database and Umami

export UMAMI_APP_SECRET=$(openssl rand -hex 32)
export POSTGRES_PASSWORD=$(openssl rand -hex 24)

Now create the .env file:

cat > .env <<EOF
UMAMI_DATABASE_URL=postgresql://umami:${POSTGRES_PASSWORD}@umami-db:5432/umami
UMAMI_APP_SECRET=${UMAMI_APP_SECRET}
UMAMI_PORT=3000
DOMAIN=analytics.example.com
EOF

Replace analytics.example.com with your domain.

5. Create Docker compose file

nano docker-compose.yml

Add following content:

services:
  umami-db:
    image: postgres:15
    restart: unless-stopped
    environment:
      POSTGRES_DB: umami
      POSTGRES_USER: umami
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - db_data:/var/lib/postgresql/data

  umami:
    image: ghcr.io/umami-software/umami:postgresql-latest
    restart: unless-stopped
    env_file: .env
    environment:
      DATABASE_URL: ${UMAMI_DATABASE_URL}
      DATABASE_TYPE: postgresql
      APP_SECRET: ${UMAMI_APP_SECRET}
      PORT: ${UMAMI_PORT}
    depends_on:
      - umami-db
    ports:
      - "127.0.0.1:3000:3000"

volumes:
  db_data:

Save and exit the file.

This creates two containers: PostgreSQL and Umami.

Start Umami

docker compose up -d

Check logs:

docker compose logs -f umami

Create Admin User

The official a default login:

Username: admin
Password: umami

We can create it manually:

docker compose exec umami npx umami create-admin-user

Set your admin username and password here.

6. Install Nginx and Enable HTTPS

Install Nginx and Certbot:

sudo dnf install -y nginx certbot python3-certbot-nginx
sudo systemctl enable --now nginx

Enable Firewall

sudo firewall-cmd --add-port={80,443}/tcp --permanent
sudo firewall-cmd --reload

Configure SELinux

sudo setsebool -P httpd_can_network_connect 1

Create a site file:

sudo vi /etc/nginx/conf.d/umami.conf

Paste:

server {
    listen 80;
    server_name analytics.EXAMPLE.COM;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    location = /umami.js {
        proxy_pass http://127.0.0.1:3000/umami.js;
    }
}

Enable the config:

sudo nginx -t
sudo systemctl reload nginx

Get SSL certificate:

sudo certbot --nginx -d analytics.example.com --agree-tos -m admin@example.com --non-interactive

7. Use the Tracking Script

Open Umami dashboard in browser:

https://analytics.example.com

Add this script to our website:

<script defer src="https://analytics.example.com/umami.js" data-website-id="YOUR-ID"></script>

Umami starts tracking instantly.

8. Backup Database

mkdir -p ~/umami/backups
docker compose exec umami-db \
pg_dump -U umami umami > ~/umami/backups/umami-$(date +%F-%H%M).sql

9. Upgrade Umami Later

docker compose pull
docker compose up -d

Conclusion

By installing Umami on AlmaLinux 10, we create a fast, secure, and fully private analytics system that runs on our own infrastructure. The setup with Docker, PostgreSQL, and Nginx keeps everything stable and easy to manage, while HTTPS ensures our data stays protected. 

Once configured, Umami gives us a clean dashboard, real-time tracking, and accurate statistics without relying on external services. This makes it a powerful solution for teams that value privacy, performance, and full control over their analytics data. With regular backups and occasional updates, our Umami setup will stay reliable and ready to support all of our websites.