---
title: Deploy Rybbit with AI on Blossom
url: "/deploy/rybbit/"
canonical_url: https://blossom88.com/deploy/rybbit/
markdown_url: https://blossom88.com/deploy/rybbit.md
summary: Deploy Rybbit, connect a website, and inspect its visits and custom events.
categories:
- deployment
- analytics
stack:
- TypeScript
- Next.js
- Fastify
- PostgreSQL
- Redis
- ClickHouse
---

# Deploy Rybbit with AI on Blossom

[Rybbit](https://www.rybbit.io/) is website analytics that shows you where
visitors came from, the pages they visited, and what actions they took.

## Ask Your Agent

> **Ask your AI agent:** Deploy Rybbit on Blossom and help me see a test visit from my website.
>
> Follow this guide: https://blossom88.com/deploy/rybbit/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Have Ready

Nothing is required beyond your Blossom account.

- **A website you can edit** (Later): Use a test page first or add the tracker to a website you control.

## How It Runs

| Part | Role | Where |
|---|---|---|
| Rybbit dashboard and API | Show analytics and receive tracker events | Private Services on App Capacity |
| Caddy | Serve the dashboard and API on one host | App Capacity behind Blossom Account access |
| ClickHouse | Keep event and session history | Private Persistent Service |
| PostgreSQL and Redis | Keep accounts and site configuration, and track recent sessions | Blossom Managed Data |

## Deploy Rybbit

Use the Community edition. Keep the dashboard and analytics API behind
Blossom Account access. Allow anonymous access to the tracker script, site
tracking configuration, and collection endpoint.

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom database_instance:create --data postgres.yml --follow
    blossom cache_instance:create --data redis.yml --follow
    blossom environment_link:create --data postgres-link.yml
    blossom environment_link:create --data redis-link.yml
    blossom service:create --data clickhouse.yml
    blossom service:create --data rybbit-web.yml
    blossom service:create --data rybbit-api.yml
    blossom service:create --data rybbit-proxy.yml
    blossom env_var:push --environment environment-100 --file .env
    blossom environment:deploy --id environment-100 --follow

</details>

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Use matching maintained [official Rybbit images](https://github.com/rybbit-io/rybbit/releases).
Follow the upstream reverse proxy setup with Caddy as the public Service.
Send `/api/*` to the private API on port 3001 and dashboard traffic to the
private frontend on port 3002. Allow public requests to `/api/script.js`,
`/api/site/tracking-config/*`, and `/api/track` in Blossom Account access.

Mount the [Persistent Service Volume](/docs/apps/persistent-services/) at
`/var/lib/clickhouse`. Bind the private Services to IPv6 and use the linked
PostgreSQL and Redis connection variables to supply the API's database
settings. Set `BASE_URL` to the proxy's public HTTPS URL and keep
`BETTER_AUTH_SECRET` stable across updates.

</details>

## Connect a Website

Create your Rybbit account behind Blossom Account access. Add a website
and copy its tracking script onto a page you control.

> **Ask your AI agent:** Help me add my website to Rybbit and install its tracker.

> Follow this guide: https://blossom88.com/deploy/rybbit/



## Open a Test Visit

Open your website in a browser that isn't signed in to Rybbit. Send a
test event, then open that visit in **Sessions** and check its page,
event, and referrer.

> **Ask your AI agent:** Help me send a test pageview and a custom event, then find the session in Rybbit.

> Follow this guide: https://blossom88.com/deploy/rybbit/



![Find the checkout receipt visit and its newsletter referrer.](/deploy/assets/images/rybbit/first-checkout-session.webp)

## Keep Visit History Across Updates

Keep ClickHouse, managed PostgreSQL, Redis, and the stable application
secret. After updating the dashboard and API, reopen the original
session and check that Rybbit is still receiving visits.

![Reopen the first visit and see a new delivery visit after replacement.](/deploy/assets/images/rybbit/checkout-sessions.webp)

## What You Get

Rybbit recorded a pageview and custom event from a sample checkout.
The original session and its referrer stayed available after both App
Containers were replaced, and a new browser visit appeared alongside it.

## What You Get

- A private dashboard for website visits and custom events
- A public tracker that your visitors can reach
- Visit history you can reopen after updating the app

Tested on Blossom: The original visit reopened after replacing the dashboard and API Containers. Rybbit also recorded a new visit.
