How to Self Host Umami Analytics on Netlify and Supabase

Track your website's performance with self-hosted Umami Analytics. Learn how to deploy on Netlify and Supabase for privacy-focused analytics.

Login to Supabase 

and click "New Project"

Click "Create new project"

Click "Connect"

Copy Connection String

Fork your copy of Umami software

Click "Creating fork"

Click to copy the URL for cloning

Open the file 

`db/postgresql/schema.prisma`

Add `directUrl = env("DIRECT_DATABASE_URL")`

Commit and push changes to GitHub repo

Login to Netlify

Click "Add new site"

Click "Import an existing project"

Select "GitHub"

Select your Umami repository

Change the build command to 

`yarn run build`

Add new environment variables

Add `?pgbouncer=true&connection_limit=1

at the end of Connection String

Change Connection String's port number

from 6543 to 5432.

Click "Deploy"

Go to your deployed site

Username: admin

Password: umami

Click "Login"

Click "Go to settings"

Click "Users"

Click "Edit"

Set a new password 

and click "Save"

Click "Websites"

Click "Add website"

Enter Name and Domain 

and click "Save"

Click "Edit"

Select "Tracking code"

Copy the tracking code

Add the tracking code to your website's <head>

Click "View"

Hello, the first visitor!

You successfully completed the guide!

Visit My Site