# Self-host Pyroscope

> A continuous profiling database with a web UI and a data volume. The UI has no login, so restrict access before exposing it. Applications push profiles to port 4040.

- Page: https://levelrail.com/templates/pyroscope/
- JSON: https://levelrail.com/templates/pyroscope.json
- Category: Monitoring
- Licence: AGPL-3.0 (Network copyleft (AGPL) license)
- Source: https://github.com/grafana/pyroscope
- Upstream docs: https://grafana.com/docs/pyroscope/latest/

## Requirements
- Memory: about 256 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 1.10.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| pyroscope | grafana/pyroscope | 1.10.0 | 4040 | pyroscope_data -> /data |

## Deploy

### CLI

```bash
levelrail-cli templates deploy pyroscope --name my-pyroscope
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/pyroscope/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## First run
1. Point profiling agents in this project at http://pyroscope:4040, then open the UI to explore flame graphs.

## Questions

### Can I deploy Pyroscope on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Pyroscope, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image grafana/pyroscope:1.10.0 is what you deploy there.

Self-host Pyroscope, Pyroscope docker compose file, deploy Pyroscope on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
