---
title: Deploy Umami Analytics
url: "/guides/umami/"
canonical_url: https://docs.blossom88.com/guides/umami/
markdown_url: https://docs.blossom88.com/guides/umami.md
summary: Deploy website analytics with your AI agent, managed PostgreSQL, and a private
  dashboard that keeps its history across app updates.
categories:
- deployment
- analytics
---

# Deploy Umami Analytics

[Umami](https://umami.is/) is a website analytics app that shows pageviews,
visitors, referrers, and custom events. Add its tracking script to your site
to see how people find and use it.

Ask your agent to deploy Umami on Blossom with managed PostgreSQL. Keep the
dashboard private while your website's visitors send analytics through the
public tracker endpoints.

[Install the Blossom CLI and skill](/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)](/learn/getting-started/choose-your-cloud/#blossom-byoc).
Have a website ready, or ask your agent to use a small demo page first.

## 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://docs.blossom88.com/guides/umami/



Your agent selects compatible versions and sizing for your workload, then
saves those choices with the deployment configuration.

| Part | Purpose |
|---|---|
| Umami web Service | Collects visits and serves analytics reports |
| Managed PostgreSQL | Keeps users, websites, and analytics history |
| Public tracker paths | Let visitors send analytics without a Blossom login |
| Private dashboard | Blossom Account access followed by your Umami login |

The web Service uses regular App Capacity. Its saved data lives in PostgreSQL,
so the Container needs no attached Volume. Keep `APP_SECRET` stable across
updates; retain the two-factor encryption key if you enable two-factor login.

Replace the initial administrator password before using the dashboard.

<details class="optional-reading" markdown="1">
<summary>Commands behind the deployment</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. Set `APP_SECRET` and, for two-factor login,
`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>

## Track Your Website


> **Ask your AI agent:** Help me add my website to Umami and check that visits and events show up.

> Follow this guide: https://docs.blossom88.com/guides/umami/



Add a 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. The dashboard shows which pages and actions receive
traffic. Open a test page without a Blossom session and confirm that its
pageview and a custom event appear in Umami.

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

## Keep Analytics Across App Updates


> **Ask your AI agent:** Redeploy Umami and check that my analytics history is still there.

> Follow this guide: https://docs.blossom88.com/guides/umami/



Check the saved website settings and send another pageview to confirm that
new traffic still arrives.

<details class="optional-reading" markdown="1">
<summary>Commands to inspect and update the App</summary>

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

</details>

For higher traffic or additional web Containers, have your agent plan shared
data and sessions using Umami's [Redis guidance](https://docs.umami.is/docs/enable-redis).
Keep the same application secrets on every instance and coordinate migrations
before scaling out.

## What You Get

- Website analytics collected through your own HTTPS endpoint
- A private dashboard for pageviews, visitors, referrers, and custom events
- Website settings and analytics history in managed PostgreSQL
- Analytics history that survives replacing the app Container
