Hosting

Running on Vercel

Deploy Umami to Vercel from a fork of the GitHub repository with a PostgreSQL database, and optionally proxy the tracker through your own domain.

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 add a PostgreSQL database to your project through a Vercel Marketplace integration such as Neon. You can also follow the Running on Neon or Running on Supabase guide to get a database up and running. You can also check out the Managed databases section under Hosting.

Setup#

Deploy with Vercel

Automate steps 1-5 using the button above

  1. Fork the https://github.com/umami-software/umami project to your GitHub account.

  2. Create an account on Vercel.

  3. From the dashboard page click Import Project then specify the URL to your fork of the project on GitHub.

  4. Add the required environment variables DATABASE_URL and APP_SECRET to your Vercel project. These values are defined in the Configure Umami step from Install. You can also add a PostgreSQL database through a Vercel Marketplace integration at this point.

    • If your database provider gives you a pooled connection string, use it as DATABASE_URL for Umami.
    • Set DIRECT_DATABASE_URL to the direct (non-pooled) connection string so database migrations do not run through the pooler. This is supported from v3.2.0. See Environment variables.
  5. Deploy and visit your application at <deploy-id>.vercel.app.

  6. Follow the Quickstart 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 blockers 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: