A dashboard goes public in two parts: a public cut in build.py, and a public-dashboard record created through the Grafana API on the home server.
Before you start
- Grafana public dashboards do not resolve template variables. A dashboard with variables gets a cut without them.
- Panels that show log lines, traces, names of private work or private repository details stay out of the cut.
claude_code_publicandhost_publicin grafana/build.py show both techniques: dropping panels and aggregating labels away. - The front door at https://grafana.scoetzee.de passes only
/public-dashboards/*,/api/public/*and/public/*, so the API call below runs on the home server.
Steps
- In
grafana/build.py, add a function that returns a copy of the dashboard with an empty variable list, every variable filter replaced (for example$modelwith.*) and identifying labels aggregated away. Give it a uid that ends in-public. - Add the function to the list at the bottom of build.py, run
python3 grafana/build.pyand commit the JSON. - Copy the repository to the home server and run
docker compose up -d --build. Grafana provisions the new dashboard in the folder "Agent Observability". - On the home server, create the public record with the command below. curl prompts for the admin password, which is
GRAFANA_ADMIN_PASSWORDin.env. - Read
accessTokenin the JSON response. The public URL is https://grafana.scoetzee.de/public-dashboards/ followed by that token. - From outside the home network, open the URL and confirm the panels load.
- Add the dashboard to Public dashboards. To frame it on Inside, see Inside portal.
DASH=local-llm-public # uid of the dashboard to share
curl -u admin -X POST -H 'Content-Type: application/json' \
-d '{"isEnabled": true, "share": "public"}' \
"http://localhost:3000/api/dashboards/uid/$DASH/public-dashboards"
Check the result
| Check | Expected |
|---|---|
| Public URL from outside | Dashboard loads, no login |
| https://grafana.scoetzee.de/login from outside | 404 |
| Any panel with a template variable | None; the cut has an empty variable list |
| Panel queries | Hidden: on 2026-10-09 the public API served panel targets without query expressions; the annotation query of Website deploys was served |
Which dashboards are public today, and what each one shows: Public dashboards.