---
title: "Deploy Pyroscope profiling"
description: "Protected continuous profiling with durable Pyroscope storage."
category: "Observability"
url: https://railway.com/deploy/pyroscope-profiling
---

# Deploy Pyroscope profiling

Protected continuous profiling with durable Pyroscope storage.

**[Deploy Pyroscope profiling on Railway](https://railway.com/template/pyroscope-profiling)**

- **Creator:** Anton Orel's Projects
- **Category:** Observability
- **Total deploys:** 1

## Template content

### Pyroscope

- **Image:** grafana/pyroscope:2.0.2@sha256:644515bfa06cb3779b8666514b1bab2295bd11f1e1a53834bd9584a43f77c4f5
- **Start command:** `/usr/bin/pyroscope -config.file=/etc/pyroscope/config.yaml -pyroscopedb.data-path=/data -compactor.data-dir=/data/compactor -metastore.data-dir=/data/metastore/data -metastore.raft.dir=/data/metastore/raft -metastore.raft.snapshots-dir=/data/metastore/snapshots -embedded-grafana.data-path=/data/grafana -pyroscopedb.retention-policy-min-free-disk-gb=1 -retention-period=14d -self-profiling.disable-push=true`
- **Health check:** /ready

### Pyroscope Gateway

- **Image:** caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648
- **Start command:** `/bin/sh -ec 'password_hash="$(caddy hash-password --plaintext "$GATEWAY_PASSWORD")"; printf "%s\n" "$GATEWAY_CONFIG" | sed -e "s|__USERNAME__|$GATEWAY_USERNAME|g" -e "s|__PASSWORD_HASH__|$password_hash|g" -e "s|__UPSTREAM__|$UPSTREAM|g" >/tmp/Caddyfile; exec caddy run --config /tmp/Caddyfile --adapter caddyfile'`
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Grafana Pyroscope on Railway

## About Hosting Grafana Pyroscope

Grafana Pyroscope stores continuous CPU and memory profiles and renders flamegraphs over time. This template runs the official 2.0.2 single-binary release with a protected UI, protected ingestion APIs, and durable profile storage.

## Why Deploy Grafana Pyroscope on Railway

Railway creates the private profiling runtime, a generated Basic Auth boundary, health checks, and a 5 GB volume. Applications can send profiles to one HTTPS endpoint while the database and control APIs stay behind the same credential.

## Common Use Cases

- Find CPU-heavy functions and allocation hot spots.
- Compare application profiles before and after a release.
- Correlate long-running performance changes with deployed versions.

## Dependencies for Grafana Pyroscope Hosting

The template uses Grafana Pyroscope, Caddy, and one Railway volume. A supported Pyroscope SDK or Grafana Alloy is required to collect application profiles.

### Deployment Dependencies

- [Grafana Pyroscope](https://grafana.com/oss/pyroscope/) provides profile ingestion, storage, querying, and flamegraphs.
- [Caddy](https://caddyserver.com) protects the public endpoint.
- [Railway](https://railway.com) provides private networking, generated credentials, and persistent storage.


## Similar templates

- [SigOnly](https://railway.com/deploy/sigonly) — Deploy SigNoz with a working demo app & config in one click
- [Unwrapped Spotify Music Stats](https://railway.com/deploy/wide-bold) — Unwrapped Spotify Music Stats, Estatísticas de músicas disponíveis
- [OpenTelemetry Collector and Backend](https://railway.com/deploy/7KNDff) — OpenTelemetry Collector with Backend Stack

Open this page in a browser: https://railway.com/deploy/pyroscope-profiling
