---
title: Deploy Umami Analytics with AI on Blossom
url: "/deploy/umami/"
canonical_url: https://blossom88.com/deploy/umami/
markdown_url: https://blossom88.com/deploy/umami.md
summary: Deploy Umami Analytics with AI on Blossom. Self-host website analytics with
  managed PostgreSQL, public tracking, and a private dashboard.
categories:
- deployment
- analytics
stack:
- TypeScript
- Next.js
- PostgreSQL
---

# Deploy Umami Analytics with AI on Blossom

[Umami](https://umami.is/) shows website traffic and custom events in a simple,
private analytics dashboard.

## Ask Your Agent

> **Ask your AI agent:** Deploy Umami on Blossom with managed Postgres. Keep the dashboard private and help me connect my website.
>
> Follow this guide: https://blossom88.com/deploy/umami/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and choose a Blossom Cloud Location when you log in. You can also use [Blossom BYOC (bring your own cloud)](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Your Analytics Setup

| Part | Purpose |
|---|---|
| Umami | Collects visits and serves the dashboard on regular App Capacity |
| Managed PostgreSQL | Keeps accounts, websites and analytics history |

Your dashboard stays behind Blossom Account access and your Umami login.
Visitors can send analytics through the public tracker endpoints. Umami's
saved data lives in PostgreSQL, so its Container needs no attached Volume.

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

Your agent checks the current CLI help and Umami's
[installation requirements](https://docs.umami.is/docs/install), then prepares
the deployment files. Replace these example IDs with those returned by Blossom.

### Create the App and Database

    blossom profile:show
    blossom app:create --data '{"app":{"name":"umami"}}'

The agent writes environment.yml with your App ID and a maintained official
image suited to the Location's architecture:

```yaml
environment:
  app_id: app-100
  name: production
  source_type: prebuilt_image
  prebuilt_image: <official image pinned by your agent>
  access_mode: members
  access_public_paths:
    - /script.js
    - /api/send
    - /api/batch
```

Only the tracking paths bypass Blossom Account access. Umami still checks
its own login for dashboard API requests.

The agent prepares database_instance.yml for managed PostgreSQL with storage,
resources, and backups suited to your traffic.

    blossom environment:create --data environment.yml
    blossom database_instance:create --data database_instance.yml --follow
    blossom database:list --database_instance database_instance-100
    blossom environment_link:create --data '{"environment_link":{"environment_id":"environment-100","target_type":"Database","target_id":"database-100","var_name":"DATABASE_URL"}}'

### Configure and Deploy Umami

Store application secrets in a private .env.production file outside the
application repository. Keep `APP_SECRET` stable across updates. If you enable
two-factor login, set and preserve `TWO_FACTOR_ENCRYPTION_KEY` using Umami's
current requirements.

    blossom env_var:push --environment environment-100 --file .env.production

The agent writes service.yml with the official image's startup command,
resources, and an HTTP health check at `/api/heartbeat`. Its startup applies
Umami's database migrations before serving traffic.

    blossom service:create --data service.yml
    blossom environment:deploy --id environment-100 --follow
    blossom environment:show --id environment-100

</details>

## Connect Your Website

Add your website in Umami and copy its generated tracking script into your
site's HTML. Track a useful action, such as opening pricing or requesting a
demo, with a custom event. Open the site without a Blossom session and check
that its pageview and event appear in Umami.

Replace the default administrator password before inviting your team.

![Umami displaying pageviews, visitors, and page activity from a synthetic demo website.](/deploy/assets/images/umami/dashboard.webp)

<details class="optional-reading" markdown="1">
<summary>Updates and extra Containers</summary>

Keep the same PostgreSQL database and application secrets across updates.
Website settings and analytics history survive replacing the web Container.
After an update, sign in again and send a pageview to check that collection
still works.

    blossom service:show --id service-100
    blossom environment:deploy --id environment-100 --follow
    blossom logs --environment environment-100 --lines 30

For additional web Containers, follow Umami's
[Redis guidance](https://docs.umami.is/docs/enable-redis) for shared data and
sessions. Use the same application secrets on every instance and coordinate
migrations before scaling out.

</details>

## What You Get

- Website traffic and custom events through your own HTTPS endpoint
- A private dashboard for visitors, pages and referrers
- Settings and analytics history in managed PostgreSQL across app updates
