Configuration
Piri uses a TOML configuration file. The piri init command generates a complete config file for you - this reference helps you understand and tune it.
Priority
Configuration is evaluated in this order (highest to lowest priority):
- CLI flags
- Environment variables
- Config file
- Network preset defaults
- Built-in defaults
Config File Locations
Piri searches for config files in this order:
- Path specified via
--configflag ~/.config/piri/config.tomlpiri-config.tomlin current directory
Environment Variables
Override any config value with PIRI_ prefix, replacing dots with underscores:
Dynamic Configuration
Most settings require a restart. The following can be changed at runtime via the admin config commands:
| Key | Type | Default | Description |
|---|---|---|---|
pdp.aggregation.manager.poll_interval |
duration | 30s |
How often the aggregation manager polls for new work |
pdp.aggregation.manager.batch_size |
duration | 10 |
Maximum number of items to process in a single batch |
Minimal Example
network = "forge-prod"
[identity]
key_file = "/path/to/service.pem"
[repo]
data_dir = "/data/piri"
temp_dir = "/tmp/piri"
[server]
port = 3000
host = "0.0.0.0"
public_url = "https://piri.example.com"
[pdp]
owner_address = "0x..."
lotus_endpoint = "wss://lotus.example.com/rpc/v1"
[ucan]
proof_set = 123
Sections
network
Network selection (forge-prod, warm-staging).
identity
Node identity configuration.
repo
Storage directory configuration.
server
HTTP server configuration.
pdp
PDP (Provable Data Possession) configuration.
ucan
UCAN service configuration.
telemetry
Observability configuration.