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.

Watch the guide

38 steps

20 days ago

1
2
Login to Supabase 
and click "New Project"
Login to Supabase&nbsp;<div>and click "<b>New Project"</b></div>
3
Click "Create new project"
Click "<b>Create new project"</b>
4
Click "Connect"
Click "<b>Connect"</b>
5
Copy Connection String
Copy <b>Connection String</b>
6
Fork your copy of Umami software
<b>Fork </b>your copy of<b>&nbsp;Umami software</b>
7
Click "Creating fork"
Click "<b>Creating fork"</b>
8
Click to copy the URL for cloning
Click to copy the URL for cloning
9
Open the file 
`db/postgresql/schema.prisma`
Open the file&nbsp;<div>`<b>db/postgresql/schema.prisma</b>`</div>
10
Add `directUrl = env("DIRECT_DATABASE_URL")`
Add `<b>directUrl = env("DIRECT_DATABASE_URL")</b>`
11
Commit and push changes to GitHub repo
<b>Commit and push</b> changes to GitHub repo
12
Login to Netlify
Login to <b>Netlify</b>
13
Click "Add new site"
Click "<b>Add new site"</b>
14
Click "Import an existing project"
Click "<b>Import an existing project"</b>
15
Select "GitHub"
Select "<b>GitHub"</b>
16
Select your Umami repository
Select your <b>Umami repository</b>
17
Change the build command to 
`yarn run build`
Change the build command to&nbsp;<div>`<b>yarn run build</b>`</div>
18
Add new environment variables
Add new <b>environment variables</b>
19
Add `?pgbouncer=true&connection_limit=1
at the end of Connection String
Add `<b>?pgbouncer=true&amp;connection_limit=1</b>`&nbsp;<div>at the end of <b>Connection String</b></div>
20
Change Connection String's port number
from 6543 to 5432.
Change <b>Connection String</b>'s port number<div>from <b>6543</b> to <b>5432</b>.</div>
21
Click "Deploy"
Click "<b>Deploy"</b>
22
Go to your deployed site
Go to your deployed site
23
Username: admin
<b>Username:</b> admin
24
Password: umami
<b>Password:</b> umami
25
Click "Login"
Click <b>"Login"</b>
26
Click "Go to settings"
Click <b>"Go to settings"</b>
27
Click "Users"
Click <b>"Users"</b>
28
Click "Edit"
Click <b>"Edit"</b>
29
Set a new password 
and click "Save"
<b>Set a new password</b>&nbsp;<div>and click <b>"Save"</b></div>
30
Click "Websites"
Click <b>"Websites"</b>
31
Click "Add website"
Click <b>"Add website"</b>
32
Enter Name and Domain 
and click "Save"
Enter&nbsp;<b>Name</b> and <b>Domain</b>&nbsp;<div>and click <b>"Save"</b></div>
33
Click "Edit"
Click <b>"Edit"</b>
34
Select "Tracking code"
Select&nbsp;<b>"Tracking code"</b>
35
Copy the tracking code
Copy the <b>tracking code</b>
36
Add the tracking code to your website's <head>
Add the tracking code to your website's <b>&lt;head&gt;</b>
37
Click "View"
Click <b>"View"</b>
38
Hello, the first visitor!
Hello, the first visitor!