Running on Supabase
Supabase is a open source Firebase alternative built on the Postgres database.
Setup
- Create a project on Supabase with a given name in a region close to where you will be hosting your Umami project.
- Get the database connection string from the Settings > Database page, then scroll to the bottom for the Connection Pooling section and copy the Connection string. It should look something like this:
postgres://postgres:[YOUR-PASSWORD]@host:6543/postgres
- Important: add
?pgbouncer=true
to the connection string you just copied. - Add
DATABASE_URL
andHASH_SALT
(any random string) to your.env
file:
DATABASE_URL=postgres://postgres:[YOUR-PASSWORD]@host:6543/postgres?pgbouncer=true
HASH_SALT=any-random-string
- You can create the tables by using pgsql or by copying and pasting the content of the
sql/schema.postgresql.sql
file into the Supabase Dashboard SQL editor.
# pgsql
pgsql -h hostname -U postgres -d postgres -f sql/schema.postgresql.sql
- You should now be able to build and start Umami (
npm run build
followed bynpm start
). - Follow the Getting started guide starting from the Login step and be sure to change the default password.