---
title: Deploy Grafana with AI on Blossom
url: "/deploy/grafana/"
canonical_url: https://blossom88.com/deploy/grafana/
markdown_url: https://blossom88.com/deploy/grafana.md
summary: Deploy Grafana with AI on Blossom. Build private dashboards on regular App
  Capacity, with users and dashboard settings in managed PostgreSQL.
categories:
- deployment
- analytics
stack:
- Go
- TypeScript
- React
- PostgreSQL
---

# Deploy Grafana with AI on Blossom

[Grafana](https://grafana.com/oss/grafana/) turns data from your applications
and infrastructure into dashboards. Connect a data source, build panels, and
share the views your team needs.

## Ask Your Agent

> **Ask your AI agent:** Deploy Grafana on Blossom with managed Postgres. Help me build a dashboard for my app.
>
> Follow this guide: https://blossom88.com/deploy/grafana/

[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).

## Your Dashboard Setup

| Part | Purpose |
|---|---|
| Grafana Service | Dashboard editor, visualizations, and queries |
| Managed PostgreSQL | Users, dashboards, permissions, and data-source settings |
| Your data sources | The metrics or other data shown in panels |

Grafana's PostgreSQL database keeps dashboards and settings; your connected
data sources provide the metrics. Keep the dashboard behind Blossom Account
access and Grafana sign-in. This recipe uses one instance and bundled plugins.

![Grafana displaying two sample time-series panels generated by its bundled TestData data source.](/deploy/assets/images/grafana/dashboard.png)

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

Upstream requirements: [configuration requirements](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/).

Keep Grafana behind **Blossom Account access** and native Grafana sign-in.
Create the administrator privately, disable open sign-up, and keep Grafana's
security secret stable across updates.

[Source code](https://github.com/grafana/grafana).

Create a prebuilt-image Environment, connect PostgreSQL, and add the Service:

    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom database_instance:create --data postgres.yml --follow
    blossom environment_link:create --data database-link.yml
    blossom env_var:push --environment environment-100 --file .env.production
    blossom service:create --data grafana-service.yml
    blossom environment:deploy --id environment-100 --follow

Set `GF_DATABASE_TYPE=postgres` and use the linked database URL for
`GF_DATABASE_URL`. Grafana expects the `postgres://` scheme; normalize a
`postgresql://` link without changing its credentials, database, or connection
options. Set `GF_SERVER_ROOT_URL` to the generated public URL before starting
Grafana through the image's supported entrypoint.

Use a strong initial `GF_SECURITY_ADMIN_PASSWORD`, a stable
`GF_SECURITY_SECRET_KEY`, and `GF_USERS_ALLOW_SIGN_UP=false`. Keep native sign-in
enabled. Use an HTTP health check against `/api/health` and allow startup time
for Grafana's database migrations.

This recipe uses bundled plugins and stores application records in PostgreSQL.
Declare additional plugins and provisioning files in your deployment
configuration so replacement Containers can recreate them.

</details>

## Build Your First Dashboard

Try the bundled
[TestData source](https://grafana.com/docs/grafana/latest/datasources/testdata/)
without another service. Build and save a panel, then connect your real data.
Give viewers read access and reserve editing permissions for your team.

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

Preserve PostgreSQL and the security secret. Sign in again after replacement,
find a saved dashboard through dashboard search, and refresh its panels.
Save a small edit to confirm that the new Container can still write settings.

This guide tests one Grafana instance. Configure alerting and any additional
instances for your workload before relying on them.

</details>

## What You Get

- A private Grafana dashboard editor and viewer
- Users, dashboards, and data-source settings in managed PostgreSQL
- Regular App Capacity with bundled plugins
- Saved dashboards that survive application Container replacement
