umami
Product
DocsDevelopersPricing
16.8kLog inSign up
General
About
FAQ
Useful links
Getting started
Getting started
Install
Login
Add a website
Collect data
Basics
Add a user
Enable share URL
Track events
Teams
Updates
Languages
Advanced
Tracker configuration
Tracker functions
Environment variables
Reference
API
Authentication
Users
Teams
Websites
Website stats
Sending stats
Event Data
API Client
Cloud
Overview
API key
Import data
Guides
Migrating v1 to v2
Hosting
Running on DigitalOcean
Running on Vercel
Running on Neon Postgres
Running on Netlify
Running on Heroku
Running on Railway
Running on Supabase
Running on PlanetScale
Running on Qovery
Running on CapRover
Running on Koyeb
Running on Forge
Running on Fly.io
umami
Product
FeaturesPricing
Resources
DocsGuidesAPI ReferenceRelease Notes
Community
Get InvolvedGitHubDiscordTwitter
Company
AboutContactPrivacyTerms
© 2023 Umami Software, Inc.

Running on DigitalOcean

DigitalOcean is an affordable cloud hosting provider that will let you host your own Umami setup. In this setup guide we are going to install Ubuntu, a PostgreSQL or MySQL database, an Nginx webserver, Node.js and Umami. DigitalOcean also has a NodeJS droplet build that comes with Node.js, Ubuntu and Nginx which can get you started quicker.

For personal use, you can start with a single $5 a month cloud server and scale up as needed. You can use this link to get a $100 credit for the first 60 days.

Note, these steps can be repeated on any cloud hosting provider that offers Ubuntu.

Install Ubuntu

  • Initial server setup with Ubuntu 18.04

Install database (PostgreSQL or MySQL)

  • How to install PostgreSQL on Ubuntu 18.04
  • How to install MySQL on Ubuntu 18.04

Install Nginx

  • How to install Nginx on Ubuntu 18.04

Install Node.js

  • How to install Node.js on Ubuntu 18.04

Install Umami

  • See Install under Getting started

Running Umami

You can simply run npm start to start Umami, but it's highly recommended you use a process manager like PM2 which will handle restarts for you.

To run with PM2:

npm install pm2 -g
cd umami
pm2 start npm --name umami -- start
pm2 save

Proxying with Nginx

With Umami now running, you can proxy requests to a domain or subdomain from Nginx to Umami.

The following config will send all requests from umami.yourdomain.com to your local Umami instance.

server {
  server_name umami.yourdomain.com;

  location / {
    proxy_pass http://localhost:3000;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

Adding an SSL certificate (optional)

  • How To Secure Nginx with Let's Encrypt on Ubuntu 18.04

Finish

That's it! You're now self-hosting Umami on your own server.