Skip to content

photon-collider/selfhost-umami-analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup for Self-Hosting Umami Analytics

A ready-to-deploy configuration for self-hosting Umami, a privacy-focused, open-source web analytics platform. This setup includes automatic HTTPS via Caddy and optional automated backups to AWS Glacier Deep Archive.

Prerequisites

  • Docker and Docker Compose
  • A domain name with DNS access (for VPS deployment)
  • (Optional) AWS CLI configured with credentials for automated backups

Quick Start on a VPS

  1. Clone the repository:
   git clone https://github.com/photon-collider/selfhost-umami-analytics
   cd selfhost-umami-analytics
  1. Configure your environment:
   cp .env.example .env
   nano .env  # Update all values

Required changes:

  • DOMAIN: Your domain name
  • POSTGRES_PASSWORD: Strong password for database
  • APP_SECRET: Generate with openssl rand -base64 32
  1. Point your domain's DNS A record to your server's IP

  2. Start the stack:

   docker compose up -d
  1. Access Umami at https://your-domain.com

Local Development & Testing

To test the setup locally before deploying to your VPS:

  1. Create a .env file (same as production setup):
cp .env.example .env
# Update POSTGRES_PASSWORD and APP_SECRET
# DOMAIN can be left as-is (ignored in local mode)
  1. Run with the local override:
docker compose -f docker-compose.yml -f docker-compose.local.yml up
  1. Access Umami at http://localhost:3000

What's different in local mode:

  • Umami is exposed directly on port 3000 (no Caddy/HTTPS)
  • Caddy doesn't run (skipped via profile)
  • Same database and application behavior as production

Default login:

  • Username: admin
  • Password: umami

To stop: Ctrl+C or docker compose -f docker-compose.yml -f docker-compose.local.yml down

About

A simple setup for self-hosting umami analytics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages