Best VPS for Umami 2026: Self-Host Your Web Analytics
REVIEW 10 min read fordnox

Best VPS for Umami 2026: Self-Host Your Web Analytics

Find the best VPS for hosting Umami, the privacy-focused Google Analytics alternative. Complete setup guide with Docker, PostgreSQL, and reverse proxy.


Best VPS for Umami in 2026

Umami is a simple, fast, privacy-focused web analytics tool. Track your website visitors without cookies, without GDPR consent banners, and without sending data to Google.

Why Self-Host Umami?

Why Self-Host Umami?

Why Self-Host Umami?

FactorGoogle AnalyticsUmami (Self-Hosted)
CostFree (you pay with data)~$5/mo (VPS only)
PrivacyTracks everythingNo cookies, no PII
GDPRConsent requiredNo consent needed
Data OwnershipGoogle’s serversYour server
SpeedHeavy script (~45KB)Lightweight (~2KB)
ComplexityOverwhelming UIClean, simple dashboard

Umami gives you the metrics that actually matter — pageviews, referrers, devices, countries — without the bloat.

VPS Requirements

Umami is lightweight but needs a database:

Minimum:

Recommended (up to 100K pageviews/month):

High Traffic (1M+ pageviews/month):

Most of the resources go to PostgreSQL, not Umami itself.

Best VPS for Umami

1. Hetzner CX22 (Best Value)

€4.35/mo | 2 vCPU, 4GB RAM, 40GB NVMe

Plenty of room for Umami + PostgreSQL. European data centers keep analytics data in the EU.

2. Hostinger KVM1 (Best Budget)

$4.99/mo | 1 vCPU, 4GB RAM, 50GB NVMe

4GB RAM handles PostgreSQL comfortably. Great starting point for small to medium sites.

3. DigitalOcean (Best Managed Database Option)

$6/mo | 1 vCPU, 1GB RAM, 25GB

Add a managed PostgreSQL database ($15/mo) if you don’t want to manage the DB yourself.

4. Vultr (Best Locations)

$6/mo | 1 vCPU, 1GB RAM, 25GB

32 data center locations. Host analytics close to your audience for faster tracking pixel response.

Complete Setup Guide

Step 1: Create Your VPS

Using Hetzner as example:

  1. Sign up at Hetzner Cloud
  2. Create server → Ubuntu 24.04 → CX22
  3. Add SSH key
  4. Note the IP address

Step 2: DNS Setup

Point your domain:

A    analytics.yourdomain.com → your-server-ip

Step 3: Initial Server Setup

ssh root@your-server-ip

# Update system
apt update && apt upgrade -y

# Install Docker
curl -fsSL https://get.docker.com | sh

# Create user for umami
adduser umami
usermod -aG docker umami

# Setup firewall
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable

Step 4: Deploy Umami

su - umami
mkdir umami && cd umami

Create a docker-compose.yml:

version: '3.8'

services:
  umami:
    image: ghcr.io/umami-software/umami:postgresql-latest
    container_name: umami
    restart: unless-stopped
    environment:
      DATABASE_URL: postgresql://umami:your-secure-password@db:5432/umami
      APP_SECRET: your-random-secret-string
    depends_on:
      db:
        condition: service_healthy
    ports:
      - 3000:3000

  db:
    image: postgres:16-alpine
    container_name: umami-db
    restart: unless-stopped
    environment:
      POSTGRES_DB: umami
      POSTGRES_USER: umami
      POSTGRES_PASSWORD: your-secure-password
    volumes:
      - pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U umami"]
      interval: 5s
      timeout: 5s
      retries: 5

  caddy:
    image: caddy:alpine
    container_name: caddy
    restart: unless-stopped
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data
      - caddy_config:/config

volumes:
  pgdata:
  caddy_data:
  caddy_config:

Create Caddyfile:

analytics.yourdomain.com {
    reverse_proxy umami:3000

    encode gzip

    header {
        Strict-Transport-Security "max-age=31536000; includeSubDomains"
        X-Content-Type-Options "nosniff"
    }
}

Step 5: Generate Secrets

# Generate APP_SECRET
openssl rand -base64 32

# Generate database password
openssl rand -base64 24

Replace the placeholder values in docker-compose.yml.

Step 6: Launch

docker compose up -d

Wait 30 seconds for the database to initialize.

Step 7: Log In

  1. Open https://analytics.yourdomain.com
  2. Default credentials: admin / umami
  3. Change the password immediately

Step 8: Add Your Website

  1. Settings → Websites → Add website
  2. Enter name and domain
  3. Copy the tracking code
  4. Add it to your site’s <head>:
<script defer src="https://analytics.yourdomain.com/script.js"
  data-website-id="your-website-id"></script>

That’s it. No cookie banners needed.

Tracking Script Options

Umami’s script supports useful attributes:

<!-- Exclude yourself from tracking -->
<script defer src="https://analytics.yourdomain.com/script.js"
  data-website-id="xxx"
  data-do-not-track="true"></script>

<!-- Track specific domains only -->
<script defer src="https://analytics.yourdomain.com/script.js"
  data-website-id="xxx"
  data-domains="yourdomain.com,www.yourdomain.com"></script>

Custom Event Tracking

Track button clicks, signups, and conversions:

// Track an event
umami.track('signup-button-click');

// Track with data
umami.track('purchase', { plan: 'pro', price: 29 });

View events in the Umami dashboard under Events.

Performance Optimization

PostgreSQL Tuning

For sites with 100K+ monthly pageviews, tune PostgreSQL:

db:
  image: postgres:16-alpine
  command:
    - "postgres"
    - "-c" 
    - "shared_buffers=256MB"
    - "-c"
    - "effective_cache_size=512MB"
    - "-c"
    - "work_mem=4MB"
    - "-c"
    - "maintenance_work_mem=64MB"

Data Retention

Umami stores all data by default. For high-traffic sites, set up cleanup:

# Connect to PostgreSQL
docker exec -it umami-db psql -U umami

# Delete data older than 1 year
DELETE FROM website_event WHERE created_at < NOW() - INTERVAL '1 year';

Or automate with a cron job.

Backup Strategy

Analytics data is valuable. Back it up.

Automated Database Backup

Create backup.sh:

#!/bin/bash
BACKUP_DIR="/home/umami/backups"
DATE=$(date +%Y%m%d_%H%M%S)

mkdir -p $BACKUP_DIR

# Dump PostgreSQL
docker exec umami-db pg_dump -U umami umami | gzip > $BACKUP_DIR/umami_$DATE.sql.gz

# Keep only last 14 backups
ls -t $BACKUP_DIR/umami_*.sql.gz | tail -n +15 | xargs -r rm

Schedule with cron:

crontab -e
# Add:
0 2 * * * /home/umami/backup.sh

Umami vs Alternatives

FeatureUmamiPlausibleMatomo
Script Size~2KB~1KB~22KB
RAM Usage~200MB~500MB~1GB+
DatabasePostgreSQL/MySQLClickHouse/PostgreSQLMySQL
Cookie-freeOptional
Real-time
Self-host DifficultyEasyMediumMedium
Free Self-host

Umami wins on simplicity. If you want more features, check our Plausible VPS guide.

Multiple Websites

Umami handles multiple sites from a single installation:

  1. Settings → Websites → Add website
  2. Each site gets its own tracking code
  3. Switch between sites in the dashboard

A single $5 VPS can track 10+ low-traffic sites easily.

API Access

Umami includes a REST API for pulling data programmatically:

# Get auth token
curl -X POST https://analytics.yourdomain.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"your-password"}'

# Get pageviews
curl https://analytics.yourdomain.com/api/websites/{id}/pageviews \
  -H "Authorization: Bearer your-token" \
  -G -d "startAt=1704067200000&endAt=1706745600000&unit=day"

Build custom dashboards or pipe data into your own tools.

Updating Umami

cd /home/umami/umami

# Pull latest image
docker compose pull

# Restart with new image
docker compose up -d

# Clean old images
docker image prune -f

Umami handles database migrations automatically on startup.

Security Tips

1. Change Default Credentials

First thing after install. Use a strong password.

2. Restrict Admin Access

Use Tailscale or IP allowlists for the admin panel.

3. Use HTTPS Only

The Caddy setup above handles this automatically with Let’s Encrypt.

4. Keep Updated

Umami gets regular security updates. Pull new images monthly at minimum.

Resource Usage

Typical Umami + PostgreSQL footprint:

MetricValue
RAM200-400 MB
CPU<5% idle
Disk~500 MB base + data
BandwidthMinimal (tiny tracking script)

Lightweight enough to share a VPS with other services like Vaultwarden or n8n.

FAQ

Does Umami use cookies?

No. Umami is completely cookie-free and GDPR compliant by default.

Can I import Google Analytics data?

Not directly. Umami starts fresh — but that’s the point. Clean data from day one.

Very. Umami uses a hash of IP + user agent for unique visitor detection, reset daily. No cross-site tracking.

Can I share dashboards publicly?

Yes. Each website has a “Share URL” option for public, read-only dashboards.

What about ad blockers?

Some block the default /script.js path. You can proxy the script through your own domain to avoid this.

Use CaseVPSMonthly Cost
Personal BlogHostinger KVM1$4.99
Multiple SitesHetzner CX22€4.35
High TrafficHetzner CX32€8.49

Start with Hostinger KVM1 — $4.99/month for privacy-respecting analytics. Cheaper than Plausible Cloud ($9/mo) and you keep full control of your data.

~/best-vps-for-umami/get-started

Ready to get started?

Get the best VPS hosting deal today. Hostinger offers 4GB RAM VPS starting at just $4.99/mo.

Get Hostinger VPS — $4.99/mo

// up to 75% off + free domain included

// related topics

best vps for umami umami hosting self-hosted analytics privacy analytics vps umami setup

// related guides

Andrius Putna

Andrius Putna

I am Andrius Putna. Geek. Since early 2000 in love tinkering with web technologies. Now AI. Bridging business and technology to drive meaningful impact. Combining expertise in customer experience, technology, and business strategy to deliver valuable insights. Father, open-source contributor, investor, 2xIronman, MBA graduate.

// last updated: March 7, 2026. Disclosure: This article may contain affiliate links.