Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk12 min

How to Self-Host Umami Web Analytics on a VPS

A practical guide to running privacy-first Umami analytics on your own VPS, covering Docker Compose and source installs, PostgreSQL, reverse-proxy HTTPS, security, backups and upgrades.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The most straightforward way to self-host Umami on one VPS is Docker Compose: it runs the Umami application and PostgreSQL together, exposes Umami on port 3000, and keeps the stack easy to update. A source installation gives you finer control over Node.js, PostgreSQL and the process manager, but requires more administration.

Whichever route you choose, put Umami behind an HTTPS reverse proxy, set a unique APP_SECRET, change the initial administrator password immediately, and establish PostgreSQL backups before collecting production data.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Umami needs on a VPS

Umami is a privacy-first analytics platform for traffic, campaigns, behavior, conversions and revenue. A self-hosted installation keeps the application and its analytics database under your control instead of sending events to a hosted analytics service.

You can deploy it in four broad ways: from source, with the official Docker Compose setup, from a prebuilt Docker image connected to a database you provide, or on Kubernetes through a third-party Helm chart. For a single VPS, Docker Compose is normally the shortest documented route. Source installation is appropriate when you need direct control over the operating system, Node.js process, PostgreSQL service or deployment pipeline.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Minimum source-install requirements

  • Node.js 18.18 or newer.
  • PostgreSQL 12.14 or newer.
  • A Linux server with a persistent disk and permission to run the application and database services.
  • A DNS name that can point to the VPS if the instance will be reachable from the internet.

Docker Compose supplies the application and PostgreSQL containers, so the host does not need a separately installed Node.js runtime or PostgreSQL server. You still need Docker Engine with the Compose plugin, persistent storage, a firewall and a backup plan.

Required and optional configuration

DATABASE_URL is the only required variable in Umami’s environment-variable reference. In production, also set a unique APP_SECRET; the documented generation method is openssl rand -hex 32. Optional variables should be enabled only when you understand the feature they control.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Variable When to use it Important detail
DATABASE_URL Every installation Connection string for PostgreSQL. Compose can provide the database service; source and prebuilt-image deployments must point to an accessible database.
APP_SECRET Every production installation Generate a unique value with openssl rand -hex 32 and keep it secret. Do not reuse a value from another environment.
BASE_PATH Only when serving Umami below a URL path such as /stats The reverse proxy and Umami must use the same path.
API_URL When your deployment needs an explicit API URL Optional; set it deliberately rather than assuming it is required.
TWO_FACTOR_ENCRYPTION_KEY When enabling the related two-factor configuration The repository documents a 64-character hexadecimal key.
MCP_ENABLED=1 Only when you intentionally expose the MCP endpoint Leave it unset unless that endpoint is part of your design and security review.

Choose an architecture before installing

Docker Compose on one VPS

The application and PostgreSQL share one machine and are started with docker compose up -d. This minimizes setup time and gives you a repeatable definition of the services. The trade-off is that you must understand container volumes, image updates and database backups.

Source installation on one VPS

Node.js runs Umami directly, while PostgreSQL runs as a host service or another managed process. You install dependencies with pnpm, build the application and run it directly or under a process manager such as PM2. This layout offers the most control but leaves more components for you to patch and monitor.

Separate database server

Umami can connect to PostgreSQL on another machine. Separating the database reduces contention and lets you scale or back it up independently, but introduces a network failure domain. Restrict PostgreSQL to the application server’s private address, require encrypted connections where appropriate, and avoid exposing the database port publicly.

Decision area Docker Compose Source installation
Initial setup Fastest for a single VPS; application and database are defined together. Slower; you install and configure Node.js, pnpm, PostgreSQL and a process manager.
Runtime control Container images determine the application runtime; host-level tuning is less direct. Direct control of Node.js, PostgreSQL and operating-system services.
Updates Pull a new image and recreate the Compose services. Pull source, install dependencies, rebuild and restart the process.
Backups Back up the PostgreSQL volume or, preferably, perform logical PostgreSQL dumps from the database container. Back up the host PostgreSQL database and its configuration.
Reverse proxy Nginx or Apache forwards to the published application port, normally 3000. Nginx or Apache forwards to the local process port.
Operational complexity Lower at first, but Docker storage and image lifecycle become part of operations. Higher day to day because every runtime component is managed separately.

Prepare the VPS

  1. Provision a supported Linux server. Use a current, maintained distribution and apply its security updates before installing Umami. The official walkthrough pattern uses Ubuntu, PostgreSQL, Node.js, PM2 and Nginx, but the same roles can be implemented on another supported Linux distribution.
  2. Create DNS records. Point an A or AAAA record such as analytics.example.com to the VPS. Wait for the record to resolve before requesting a certificate.
  3. Configure the firewall. Allow SSH from your administration addresses, HTTP on port 80 for certificate issuance and redirects, and HTTPS on port 443. Do not expose PostgreSQL’s port to the public internet. If Docker publishes port 3000, bind it to localhost or restrict it at the firewall so visitors use the proxy instead.
  4. Plan persistent storage. Keep PostgreSQL data on a persistent volume or disk, monitor free space and account for retention and query load. The project does not publish a universal CPU, RAM or visitor-volume sizing table, so size the VPS from expected traffic, retention period and dashboard query activity rather than a fixed recommendation.
  5. Decide where backups go. A backup stored only on the same VPS does not protect against disk loss or a compromised host. Schedule PostgreSQL dumps or volume snapshots to separate storage, test restoration and record the restore procedure.

Install Umami with Docker Compose

This is the practical default for a single server. Obtain Umami’s documented Compose file in a dedicated directory, review the services and volume definitions, and keep the file under change control.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

1. Create the deployment directory and secrets

mkdir -p /opt/umami
cd /opt/umami
openssl rand -hex 32

Place the generated value in the environment file used by the Compose setup as APP_SECRET. Keep that file readable only by the account that administers the deployment. The Compose configuration includes an application service and a PostgreSQL service; do not replace its persistent database volume with an ephemeral container filesystem.

2. Start the stack

docker compose up -d

Check that both services are running with docker compose ps and inspect startup output with docker compose logs. The documented stack serves Umami at http://localhost:3000 on the VPS. A local request or an SSH tunnel can confirm that the application responds before you add the public proxy.

3. Confirm database initialization

On its first start, Umami creates the database schema and the initial account. Wait for the application and database health checks to settle; a browser error immediately after up -d can simply mean migrations are still running. Do not repeatedly delete and recreate the database volume, because doing so destroys collected data.

Install Umami from source

Choose this route when you need host-level process control, a separately managed PostgreSQL service or a deployment pipeline that builds from a reviewed source revision.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Install the runtime and database

Install Node.js 18.18 or newer, pnpm, and PostgreSQL 12.14 or newer using your distribution’s supported packages or the project’s recommended installation method. Create a dedicated PostgreSQL database and role with a strong password. Permit connections only from the Umami host or private network.

2. Fetch the application and create the environment file

From the Umami source directory, create a .env file containing a PostgreSQL connection string and a unique secret:

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
DATABASE_URL=postgresql://umami_user:[email protected]:5432/umami
APP_SECRET=replace-with-the-output-of-openssl-rand-hex-32

Protect the file with filesystem permissions and keep it out of source-control commits. If PostgreSQL is on another host, replace 127.0.0.1 with its private address and apply the database server’s network and TLS policy.

3. Install, build and start

pnpm install
pnpm build
pnpm start

The build process creates the database tables on first setup and creates the initial administrator account. For a persistent service, run Umami under a process manager and configure it to restart after a failure or reboot. Record the exact source revision, Node.js version, pnpm version and environment values needed to reproduce the deployment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the local installation and secure the first login

Check the application before publishing it

  • Confirm that the process or containers remain running after a restart.
  • Open the local port through an SSH tunnel or test it from the VPS itself.
  • Review application and PostgreSQL logs for connection, migration or permission errors.
  • Confirm that the database volume is mounted persistently and that a backup job can read it.

Replace the default credentials immediately

Umami creates a default login with username admin and password umami when it first sets up the database. Sign in as soon as the local check succeeds, change that password to a unique, long passphrase and create individual accounts rather than sharing the administrator login. If the instance was exposed before the password was changed, rotate the password and review logs for unexpected access.

Add a tracking site

In the Umami interface, create a website entry for each property you own, then copy the generated tracking snippet into that site’s pages. Start with a staging or low-risk property, verify that page views arrive, and only then deploy the script broadly. Keep site identifiers and administrator credentials separate; a tracking script is not a substitute for authentication.

Put Umami behind Nginx or Apache

Do not make the application port your public endpoint when the VPS is internet-facing. A reverse proxy terminates TLS, redirects plain HTTP to HTTPS and forwards requests to the local Umami process. Nginx and Apache are both supported proxy choices.

Root-domain deployment

For a host such as analytics.example.com, create a virtual host that listens on ports 80 and 443, obtains a certificate from your chosen certificate authority, and proxies HTTPS requests to http://127.0.0.1:3000. Preserve the original host and forwarding headers so Umami can generate correct absolute URLs. After enabling the site, reload the proxy and test the HTTPS URL from an external network.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Subdirectory deployment

If the public URL is https://example.com/stats, set BASE_PATH=/stats in Umami’s environment and configure the proxy to forward that same path to the application. A mismatch produces missing assets, redirect loops or API calls aimed at the wrong URL. Keep the path spelling and trailing-slash behavior consistent between the proxy and Umami, then restart the application after changing the variable.

HTTPS checks

  • Port 80 redirects to the canonical HTTPS URL.
  • The certificate covers the exact hostname visitors use.
  • Cookies and login forms are delivered only over HTTPS.
  • WebSocket or long-lived request settings, if required by your proxy configuration, are preserved rather than stripped.
  • The proxy cannot reach an unintended administrative service on another local port.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Security hardening for production

  • Use a unique APP_SECRET and keep it out of shell history, public repositories and support tickets.
  • Change the default administrator password before opening the endpoint to the internet.
  • Apply operating-system, Docker, Node.js, PostgreSQL and Umami updates on a schedule.
  • Limit SSH to keys and trusted source addresses where practical, and disable password login after confirming key access.
  • Keep PostgreSQL private; the reverse proxy is the only service that should normally be public.
  • Use least-privilege database credentials. The Umami role should not be a PostgreSQL superuser.
  • Protect .env, Compose files containing secrets, proxy configuration and backup archives with restrictive permissions.
  • Decide deliberately whether to enable MCP_ENABLED=1 or two-factor-related encryption settings; an unused endpoint expands the attack surface.
  • Monitor authentication failures, disk usage, database growth and repeated application errors.

Backups, restoration and routine maintenance

Back up the data that matters

Umami’s irreplaceable state is in PostgreSQL: websites, users, settings and collected analytics. Back up the database on a schedule that matches your acceptable data loss, copy backups off the VPS, encrypt them and retain multiple restore points. Also preserve the Compose file or source revision, environment-secret inventory, proxy configuration and any upgrade notes. Secrets themselves should be stored in a protected secrets system or encrypted archive, not in an unencrypted backup directory.

A logical PostgreSQL dump is portable between hosts and useful for migrations. A volume snapshot can be faster for large databases but must be coordinated with PostgreSQL’s consistency requirements. Whichever method you choose, perform a test restore on a separate instance; a file that cannot be restored is not a backup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Watch growth and query performance

Retention length, visitor volume and dashboard query patterns determine storage and CPU needs. Review PostgreSQL size and slow-query indicators before increasing the VPS plan. Do not infer capacity from a generic RAM or visitor number because Umami does not publish a universal sizing table.

Update a self-hosted Umami installation

Source deployment updates

  1. Read the release notes and confirm that your PostgreSQL version meets the target release.
  2. Back up PostgreSQL and record the current source revision.
  3. Fetch the new source with git pull.
  4. Install changed dependencies with pnpm install.
  5. Build the release with pnpm build.
  6. Restart Umami with pnpm start or restart the PM2 process.
  7. Check logs, sign in, load a dashboard and verify that new events are recorded.

Docker Compose updates

  1. Back up PostgreSQL and save a copy of the current Compose file and environment settings.
  2. Pull the new image with docker compose pull.
  3. Recreate the services with docker compose up --force-recreate -d.
  4. Follow startup logs and confirm that the application can connect to the existing database volume.
  5. Test login, dashboards, tracking and the public HTTPS endpoint.

Do not remove the database volume as part of an update. If a release requires a migration, let the application complete it and keep the backup until the new version has been validated.

PostgreSQL statistics after major upgrades

After a major Umami upgrade, run PostgreSQL ANALYZE to refresh planner statistics. Updated statistics help PostgreSQL choose efficient query plans for dashboards, especially after schema or data-volume changes. Schedule this maintenance during a controlled window and confirm that the command completes without errors.

Troubleshooting common failures

The browser cannot connect

Check container or process status, then test localhost:3000 on the VPS. If local access works, inspect Nginx or Apache’s upstream address, firewall rules, DNS and certificate configuration. If local access fails, inspect Umami logs first, followed by PostgreSQL availability and the DATABASE_URL.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Database connection or migration errors

Verify the hostname, port, database name, role password and URL encoding of special characters. Confirm that PostgreSQL is listening on the expected interface and that its access rules allow the Umami host. For Compose, make sure both services share the intended network and that the database volume is healthy.

Assets or API calls fail under a subpath

Set BASE_PATH to the exact public path, update proxy rewrite and forwarding rules, restart Umami, clear stale browser cache and test the path without adding a second prefix. A root deployment should not retain a leftover BASE_PATH from an earlier configuration.

Updates leave the site unhealthy

Read the migration and application logs, check the database backup, and compare the running environment with the previous known-good configuration. If a rollback is necessary, restore the prior image or source revision and database backup as a coordinated set; reverting only the application can leave schema changes behind.

Single-server or separate database: which is right?

Layout Best fit Trade-offs
Application and PostgreSQL on one VPS Small teams, a single property or a simple internal deployment. Lowest network complexity and cost, but one host failure takes out both services and resource contention is possible.
Application VPS plus private PostgreSQL host Organizations needing database isolation, independent backups or a path to scale. Separate failure domains and easier database scaling, balanced by private-network design, latency, credentials and firewall work.

Start with one server when its failure domain and expected query load are acceptable. Move PostgreSQL to a separate protected service when backup, isolation or scaling requirements justify the added network and operational work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Production readiness checklist

  • DNS resolves to the VPS and the canonical HTTPS hostname is selected.
  • Only required firewall ports are open; PostgreSQL is not public.
  • Umami runs on Node.js 18.18 or newer for source installs, or through the selected container image.
  • PostgreSQL is 12.14 or newer for source installs.
  • DATABASE_URL is valid and the database persists across restarts.
  • APP_SECRET is unique and protected.
  • BASE_PATH matches the proxy when using a subdirectory.
  • The initial admin/umami credentials have been replaced.
  • Nginx or Apache serves HTTPS and forwards to the local application port.
  • PostgreSQL backups run off-host and a restoration test has succeeded.
  • Source or image update steps, rollback notes and ownership of each task are documented.
  • Monitoring covers uptime, disk space, database growth, logs and authentication failures.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.