Running on Vercel
Vercel is the company behind the framework Next.js which is used by Umami. They also provide a free hosting service which is ideal for Next.js applications.
If you don't already have a database, you can create a Vercel Postgres database integration. You can also follow the Running on DigitalOcean guide or the Running on PlanetScale guide to get a database up and running. You can also check out the Managed databases section under Hosting.
Setup#
Automate steps 1-5 using the button above
- Fork the https://github.com/umami-software/umami project to your GitHub account.
- Create an account on Vercel.
- From the dashboard page click Import Project then specify the URL to your fork of the project on GitHub.
- Add the required environment variables
DATABASE_URLto your Vercel project. These values are defined in the Configure Umami step from Install. You can also create a Vercel Postgres database at this point.
- You should use
POSTGRES_PRISMA_URLfor umami, which is in the form ofpostgres://user:passwd@endpoint-pooler.postgres.vercel-storage.com/verceldb?pgbouncer=true&connect_timeout=10. - The environment variable used for the database URL can be changed in the
db/postgresql/schema.prismafile.
- Deploy and visit your application at
<deploy-id>.vercel.app. - Follow the Getting started guide starting from the Login step and be sure to change the default password.
Proxy Umami Analytics via Vercel#
Optionally, you can proxy Umami Analytics to serve Umami Analytics from your main domain. This is also useful for bypassing ad-blocker when using Umami Cloud.
See Vercel's rewrites docs.
In the root of your project, add the vercel.json file with the following contents:
The tracking code script tag should use /stats/script.js as src value: