Server Configuration

There are 3 ways to configure pyroscope. Configuration precedence is evaluated in the following order:

  • command line arguments
  • environment variables
  • config files

Command line arguments

This is the easiest way to configure pyroscope. For the list of command line arguments and default values, run pyroscope server -help:

NameDefault ValueUsage
analytics-opt-outfalseDisables analytics.
log-levelinfoLog level: debug|info|warn|error.
badger-log-levelerrorLog level: debug|info|warn|error.
storage-path/var/lib/pyroscopeDirectory where pyroscope stores profiling data.
api-bind-addr:4040Port for the HTTP server used for data ingestion and web UI.
base-urlBase URL for when the server is behind a reverse proxy with a different path.
cache-evict-threshold0.25Percentage of memory at which cache evictions start.
cache-evict-volume0.33Percentage of cache that is evicted per eviction run.
badger-no-truncatefalseIndicates whether value log files should be truncated to delete corrupt data, if any.
disable-pprof-endpointfalseDisables /debug/pprof route.
max-nodes-serialization2048Max number of nodes used when saving profiles to disk.
max-nodes-render8192Max number of nodes used to display data on the frontend.
hide-applications[]Please don't use, this will soon be deprecated.
out-of-space-threshold512.00 MBThreshold value to consider out of space in bytes.
sample-rate100Sample rate for the profiler in Hz. 100 means reading 100 times per second.

Environment variables

Environment variables MUST have PYROSCOPE_ prefix and be in UPPER_SNAKE_CASE format, for example:

PYROSCOPE_API_BIND_ADDR=:9999 pyroscope server

Authentication

See the server authentication page for more details on how to add authentication to your Pyroscope server.

Configuration file

Config files are stored in YAML format. The default configuration file path is located at:

  • /etc/pyroscope/server.yml on Linux
  • /usr/local/etc/pyroscope/server.yml on Intel macOS
  • /opt/homebrew/etc/pyroscope/server.yml on M1 macOS

You can override the location with -config <path> argument, for example:

pyroscope server -config my-custom-config.yml

Or an environment variable:

PYROSCOPE_CONFIG=/tmp/pyroscope-server.yml pyroscope server
---
# Disables analytics.
analytics-opt-out: "false"
# Log level: debug|info|warn|error.
log-level: "info"
# Log level: debug|info|warn|error.
badger-log-level: "error"
# Directory where pyroscope stores profiling data.
storage-path: "/var/lib/pyroscope"
# Port for the HTTP server used for data ingestion and web UI.
api-bind-addr: ":4040"
# Base URL for when the server is behind a reverse proxy with a different path.
base-url: ""
# Percentage of memory at which cache evictions start.
cache-evict-threshold: "0.25"
# Percentage of cache that is evicted per eviction run.
cache-evict-volume: "0.33"
# Indicates whether value log files should be truncated to delete corrupt data, if any.
badger-no-truncate: "false"
# Disables /debug/pprof route.
disable-pprof-endpoint: "false"
# Max number of nodes used when saving profiles to disk.
max-nodes-serialization: "2048"
# Max number of nodes used to display data on the frontend.
max-nodes-render: "8192"
# Please don't use, this will soon be deprecated.
hide-applications: []
# Threshold value to consider out of space in bytes.
out-of-space-threshold: "512.00 MB"
# Sample rate for the profiler in Hz. 100 means reading 100 times per second.
sample-rate: "100"