umami/README.md

5.8 KiB

Umami Logo

Umami

Umami is a simple, fast, privacy-focused alternative to Google Analytics.

GitHub Release MIT License Build Status Umami Demo


🚀 Getting Started

A detailed getting started guide can be found at umami.is/docs.


🛠 Installing from Source

Requirements

  • A server with Node.js version 18.18 or newer
  • A database. Umami supports PostgreSQL (minimum v12.14) databases.

Use our interactive setup wizard for a guided installation:

git clone https://github.com/umami-software/umami.git
cd umami
pnpm install
pnpm run setup

The wizard will guide you through:

  • Checking prerequisites
  • Configuring your database
  • Creating the .env file
  • Building the application

Manual Setup

1. Get the Source Code and Install Packages

git clone https://github.com/umami-software/umami.git
cd umami
pnpm install

2. Validate Your Setup

Before proceeding, validate your environment:

pnpm run validate-setup

This will check:

  • Node.js version (>= 18.18)
  • pnpm installation
  • Environment configuration
  • Database connectivity
  • Dependencies

3. Configure Umami

Create an .env file with the following:

DATABASE_URL=connection-url

You can use .env.example as a template:

cp .env.example .env

The connection URL format:

postgresql://username:mypassword@localhost:5432/mydb

4. Build the Application

pnpm run build

The build step will create tables in your database if you are installing for the first time. It will also create a login user with username admin and password umami.

⚠️ Important: Change the default password immediately after first login!

5. Start the Application

For development:

pnpm run dev

Development server runs on http://localhost:3001 with hot-reload enabled.

For production:

pnpm run start

Production server runs on http://localhost:3000. You will need to either proxy requests from your web server or change the port to serve the application directly.

Troubleshooting

If you encounter issues during setup, see our detailed Setup Guide which includes:

  • Step-by-step installation instructions
  • Common error scenarios and solutions
  • Database configuration help
  • Environment variable reference

You can also run diagnostics:

# Check environment variables
pnpm run check-env

# Check database connection
pnpm run check-db

# Validate complete setup
pnpm run validate-setup

🐳 Installing with Docker

To build the Umami container and start up a Postgres database, run:

docker compose up -d

Alternatively, to pull just the Umami Docker image with PostgreSQL support:

docker pull docker.umami.is/umami-software/umami:latest

🔄 Getting Updates

To get the latest features, simply do a pull, install any new dependencies, and rebuild:

git pull
pnpm install
pnpm run build

To update the Docker image, simply pull the new images and rebuild:

docker compose pull
docker compose up --force-recreate -d

🛟 Support

GitHub Twitter LinkedIn Discord