-
Notifications
You must be signed in to change notification settings - Fork 0
Environment Variables
Arael Espinosa edited this page Apr 23, 2026
·
4 revisions
Piro is configured entirely via environment variables. In Docker Compose, set them under environment: or in a .env file.
In .NET, nested keys use double-underscore (__) as the section separator — e.g., Auth:JwtSecret → AUTH__JWTSECRET.
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE__CONNECTIONSTRING |
✅ | — | PostgreSQL connection string. Example: Host=db;Port=5432;Database=piro;Username=piro;Password=secret
|
| Variable | Required | Default | Description |
|---|---|---|---|
AUTH__JWTSECRET |
✅ | — | Secret used to sign JWT tokens. Must be at least 32 characters. |
AUTH__ACCESSTOKENEXPIRYMINUTES |
60 |
Access token lifetime in minutes. | |
AUTH__REFRESHTOKENEXPIRYDAYS |
30 |
Refresh token lifetime in days. |
| Variable | Required | Default | Description |
|---|---|---|---|
CORS__ALLOWEDORIGINS__0 |
http://localhost:5173 |
Allowed origin(s) for CORS. Add more with __1, __2, etc. |
| Variable | Required | Default | Description |
|---|---|---|---|
PUBLIC_URL |
— | Publicly accessible URL of the API. Shown in the OpenAPI spec as the server URL. |
| Variable | Required | Default | Description |
|---|---|---|---|
EMAIL__HOST |
— | SMTP host. | |
EMAIL__PORT |
587 |
SMTP port. | |
EMAIL__USESSL |
false |
Use SSL/TLS. | |
EMAIL__USERNAME |
— | SMTP username. | |
EMAIL__PASSWORD |
— | SMTP password. | |
EMAIL__FROM |
— | Sender address shown in alert emails. |
| Variable | Required | Default | Description |
|---|---|---|---|
OIDC__ENABLED |
false |
Enable OpenID Connect SSO. | |
OIDC__AUTHORITY |
— | Identity provider authority URL. | |
OIDC__CLIENTID |
— | OIDC client ID. | |
OIDC__CLIENTSECRET |
— | OIDC client secret. | |
OIDC__DEFAULTROLEID |
viewer |
Role assigned to new SSO users. |
| Variable | Required | Default | Description |
|---|---|---|---|
SAML__ENABLED |
false |
Enable SAML SSO. |
| Variable | Required | Default | Description |
|---|---|---|---|
PIRO_API_WORKER |
false |
Set to true to make the API itself participate as a worker in multi-region check batches. |
|
PIRO_WORKER_REGION |
default |
Region label for results produced by the built-in API worker. |
| Variable | Required | Default | Description |
|---|---|---|---|
PIRO_API_URL |
✅ | — | Base URL of the Piro API. Example: http://api:5117
|
PIRO_WORKER_TOKEN |
✅ | — | Worker token obtained from Configuration → Workers → Register Worker in the admin UI. |
PIRO_WORKER_REGION |
default |
Region label attached to all check results from this worker. |
# Database
DATABASE__CONNECTIONSTRING=Host=db;Port=5432;Database=piro;Username=piro;Password=changeme
# Auth
AUTH__JWTSECRET=replace-with-a-long-random-secret-at-least-32-chars
AUTH__ACCESSTOKENEXPIRYMINUTES=60
AUTH__REFRESHTOKENEXPIRYDAYS=30
# Public URL (optional)
PUBLIC_URL=https://status.example.com
# Email alerts (optional)
EMAIL__HOST=smtp.example.com
EMAIL__PORT=587
EMAIL__USESSL=false
EMAIL__USERNAME=noreply@example.com
EMAIL__PASSWORD=smtp-password
EMAIL__FROM=Piro <noreply@example.com>
# API as local worker (optional)
PIRO_API_WORKER=true
PIRO_WORKER_REGION=primary