---
title: Configuration
description: Where Pipedash finds config.toml, every TOML key and environment variable with its default, config views, variable interpolation, secret files, hot reload and precedence.
---

Pipedash reads one TOML file, `config.toml`, and a small set of environment variables. This page lists where the file lives, every key in it, every variable Pipedash reads, and which source wins.

## Config file discovery

Pipedash picks the first match.

1. `PIPEDASH_CONFIG_PATH`, used as given even when the file does not exist.
2. In desktop mode, `<platform config dir>/pipedash/config.toml` when it exists.
3. In server mode, `/etc/pipedash/config.toml` when it exists.
4. `config.toml` inside the default data directory.

The default data directory is `PIPEDASH_DATA_DIR` when set. Otherwise it is the platform data directory plus `pipedash`, or `.pipedash` when the platform has none. The `storage.data_dir` key does not take part in discovery.

The desktop app sets `PIPEDASH_CONFIG_PATH` to `<app data dir>/config.toml` at startup. On the first run it writes a starter file there with `data_dir` filled in and `default_refresh_interval = 300`.

The web server writes no file at startup. With no file it starts in setup mode, and the [setup wizard](/docs/configuration/setup-wizard) writes the file.

## Server mode detection

Pipedash runs in server mode when any one of these is true. Otherwise it runs in desktop mode.

| Signal | Test |
|---|---|
| `PIPEDASH_SERVER_MODE` | Any value |
| `PIPEDASH_API_MODE` | Any value |
| `KUBERNETES_SERVICE_HOST` | Any value |
| `DOCKER_CONTAINER` | Any value |
| `PIPEDASH_DATA_DIR` | Value starts with `/data` or `/var` |

The mode changes the discovery path above.

## TOML reference

All sections are optional. Missing keys take the defaults below.

```toml
[general]
metrics_enabled = true
default_refresh_interval = 30
status_pages_enabled = true
proxy_url = ""

[server]
bind_addr = "127.0.0.1:8080"
cors_allow_all = false
base_path = ""

[storage]
backend = "sqlite"

[push]
relay_url = ""

[providers.github-work]
name = "GitHub Work"
type = "github"
token = "${GITHUB_TOKEN}"
refresh_interval = 30

[providers.github-work.config]
selected_items = "hcavarsan/pipedash"
```

### general

| Key | Type | Default | Effect |
|---|---|---|---|
| `metrics_enabled` | boolean | `true` | Starts the metrics service at startup. Collection also needs the database switch. The [Metrics](/docs/features/metrics) page covers it. |
| `default_refresh_interval` | integer, seconds | `30` | Saved with the file. Pipedash does not use it to schedule polling. Each provider's `refresh_interval` does. |
| `status_pages_enabled` | boolean | `true` | Reads the public status page of each provider. Settings, General shows it as "Check provider status pages". The [Provider health](/docs/features/provider-health) page covers it. |
| `proxy_url` | string | Empty | HTTP or HTTPS proxy for provider requests and status page checks. |

`proxy_url` accepts `http://` and `https://` URLs without a user name or password. Tekton and FluxCD ignore it because they connect through the kubeconfig. Pipedash ignores an invalid value in the file and logs an error.

Settings, General has a "Proxy URL" field with a "Save proxy" button. A save there applies at once and rewrites the key. A `${VAR}` reference in the key stays in the file after any save in Settings, General, and a new value in the field replaces it. A change made in the file applies at the next start.

With an empty `proxy_url`, requests go direct or through `HTTPS_PROXY` and `HTTP_PROXY` when the environment defines them. Hosts listed in `NO_PROXY` connect directly when `proxy_url` is set.

### server

| Key | Type | Default | Effect |
|---|---|---|---|
| `bind_addr` | string | `127.0.0.1:8080` | Address of the web server. An invalid value stops the server at startup. |
| `cors_allow_all` | boolean | `false` | Allows any origin, method and header, and turns off the cross-origin write check. |
| `base_path` | string | Empty | Path prefix of the web UI behind a reverse proxy, for example `/pipedash`. Empty serves the UI at `/`. |

The web server reads these keys at startup. The environment variables `PIPEDASH_BIND_ADDR`, `PIPEDASH_CORS_ALLOW_ALL` and `PIPEDASH_BASE_PATH` override them. The desktop app ignores the whole section.

`base_path` takes path segments made of letters, digits, `-`, `.`, `_` and `~`. Empty interior segments and segments equal to `.` or `..` are invalid. For example, `/tools//pipedash`, `/./pipedash` and `/tools/../pipedash` stop startup. Pipedash adds the leading and trailing slash. Any other character stops the server at startup. The [Reverse proxy](/docs/deployment/reverse-proxy) page covers the proxy side.

Until a config file exists, the server runs in setup mode with the defaults `127.0.0.1:8080`, `cors_allow_all = false` and no base path. The environment variables still apply. The web wizard writes `bind_addr = "127.0.0.1:8080"` into the new file, so a server without `PIPEDASH_BIND_ADDR` listens on loopback after the restart.

### storage

| Key | Type | Default | Effect |
|---|---|---|---|
| `data_dir` | string | Empty | Directory for `pipedash.db` and local files. Empty means the default data directory. Pipedash omits an empty value when it saves. |
| `backend` | `sqlite` or `postgres` | `sqlite` | Storage backend. The [Storage backends](/docs/configuration/storage-backends) page covers it. |
| `vault_password` | string | None | Password for encrypted tokens. Pipedash reads it and never writes it back. It wins over `PIPEDASH_VAULT_PASSWORD`. |

### storage.postgres

| Key | Type | Default | Effect |
|---|---|---|---|
| `connection_string` | string | Empty | PostgreSQL URL. Required when `backend = "postgres"`. Pipedash omits an empty value when it saves. |

### push

| Key | Type | Default | Effect |
|---|---|---|---|
| `relay_url` | string | Empty | Push relay URL of the web server. `PIPEDASH_PUSH_RELAY_URL` overrides it. |

Pipedash omits the `[push]` table from a saved file while the URL is empty. The web server uses the relay to send push alerts to iPhone and iPad. Settings, Notifications has a "Background notifications" switch. Turning it on writes `relay_url = "https://relay.pipedash.app"`. Turning it off removes the table.

The switch starts off on a new web server and on a computer that never shared. A desktop app that shares on the network uses the same setting. A computer that was already sharing before the upgrade keeps push on once, and later choices stick.

A nonblank `PIPEDASH_PUSH_RELAY_URL` overrides the file and disables the switch with the note "Set by PIPEDASH_PUSH_RELAY_URL." A blank value also overrides the file, but selects no relay and leaves the switch enabled. Unset the variable to use `push.relay_url`.

The read-only demo mode allows `GET /api/v1/push/relay` and refuses changes to the relay setting. The [Docker](/docs/deployment/docker#push-alerts-for-iphone-and-ipad) page covers the setup.

Paired devices and their notification preferences live in the database. They do not use `[devices]` or `[notifications]` tables in `config.toml`.

### `providers.<id>`

Each table key is a provider id. Pipedash stores it as the provider name and matches on it during sync.

| Key | Type | Default | Effect |
|---|---|---|---|
| `name` | string | Table key | Name shown in the UI. |
| `type` | string | Required | One of `github`, `gitea`, `woodpecker`, `gitlab`, `azure-devops`, `bitbucket`, `buildkite`, `circleci`, `jenkins`, `tekton`, `argocd`, `fluxcd`, `komodo`, `coolify` or `prow`. An unknown type logs a warning at startup and fails a hot reload. |
| `token` | string | Empty | A token reference. Empty keeps the token already stored for the provider. |
| `refresh_interval` | integer, seconds | `30` | Seconds between polls of this provider. `0` turns scheduled polling off. Settings, Providers accepts 5 to 300. |

Use the canonical provider type. The aliases `argo`, `azure`, `flux` and `forgejo` appear in plugin package metadata but are not registered as config types.

The [Refresh](/docs/features/refresh) page covers polling and backoff.

In TOML, `refresh_interval` and `general.default_refresh_interval` accept whole numbers from `0` to `4294967295`. Negative values and decimal values fail parsing. The file does not enforce the Settings range of 5 to 300 seconds.

For a provider, `refresh_interval = 0` disables scheduled polling. Manual refresh remains available. `general.default_refresh_interval` does not replace the interval of a provider.

### `providers.<id>.config`

A table of string values. The keys depend on the provider type, for example `base_url` and `selected_items`. `selected_items` is a comma-separated list of repositories or pipelines. The [Providers](/docs/providers) page covers the keys of each provider.

### `views.<key>`

A table that defines a read-only view of the Pipelines page. The keys are `name`, `providers`, `repositories`, `name_contains`, `statuses`, `sort`, `direction`, `sections` and `layout`. The [Views](/docs/features/views#views-in-configtoml) page lists them with their defaults. Pipedash validates the tables at startup and on each reload, and an invalid table stops the load of the file.

### Validation

Pipedash logs these checks at startup.

| Level | Condition |
|---|---|
| Error | `backend = "postgres"` with an empty `connection_string` |
| Error | A provider with an empty `type` or an empty table key |
| Warning | An unknown provider `type` |
| Warning | An empty `token`, which means a lookup in the token store |
| Warning | `refresh_interval = 0`, which means manual refresh only |

## Provider hot reload

Pipedash applies changes to the `[providers]` blocks without a restart.

- **Settings editor:** a save in the "Edit config.toml" editor applies the blocks at once.
- **File on disk:** a watcher checks the modification time and size of the file every 5 seconds. A change, for example a mounted Kubernetes ConfigMap, applies within about 5 seconds.
- **Scope:** only new or changed blocks reach the database. Edits made in Settings to other providers stay.
- **Removal:** deleting a block removes its provider from Pipedash at the next apply, as the [section below](#removing-a-provider-block) describes.
- **Errors:** an invalid file, an unknown `type` or an invalid `[views.<key>]` table leaves the providers and the views unchanged. The watcher logs the first failure and retries every 5 seconds.
- **Token store failure:** when the token store fails while Pipedash applies a changed block, the whole apply fails. The block stays pending, and the next save of the editor or the next check of the watcher retries it.
- **Views:** a change to a `[views.<key>]` table reloads the [config views](/docs/features/views#views-in-configtoml) too, and the Pipelines page updates.

Providers added by an [import](/docs/configuration/import-export) live in the database and not in the file.

### Removing a provider block

The `[providers]` blocks work as provisioning. Adding a block adds the provider, editing it updates the provider and deleting it removes the provider.

- **File providers:** Pipedash marks a provider as a file provider when an apply of the file creates it or finds an existing provider with the same name as the table key. The mark stays after that, even for a provider that was first added in Settings.
- **When:** each apply removes every file provider whose block is gone. That covers a save in the editor, a change the watcher finds and the first apply of the watcher at startup, so a block deleted while Pipedash was stopped goes away on the next start.
- **What goes:** the removal is the same as Remove in Settings. It deletes the provider, its stored token and its cached pipelines and runs, and the log reads `Removed provider deleted from config file`.
- **Providers from Settings and imports:** they are never marked unless a block uses their name, so editing the file leaves them alone.
- **Errors:** a file that fails to parse or validate, or an apply that fails part way, removes nothing.
- **Missing file:** when `config.toml` is gone, Pipedash writes a new default file at startup, which removes every file provider like deleting every block.
- **Upgrades:** providers that existed before this behavior get the mark on the first apply after the upgrade. A block deleted while an older version was running stays until a user removes the provider in Settings.

## Variable interpolation

Pipedash replaces variables in every string value after it parses the TOML.

| Syntax | Result |
|---|---|
| `${NAME}` | The value of `NAME`. If `NAME` is unset, Pipedash reads the file named in `NAME_FILE`. If neither exists, loading fails with `Required environment variable not found: NAME (set NAME or NAME_FILE)`. |
| `${NAME:-default}` | The value of `NAME` or `NAME_FILE`, or `default` when neither exists. The default can contain more variables. |
| `${NAME:-}` | The value of `NAME` or `NAME_FILE`, or an empty string when neither exists. |

Names match `[A-Za-z_][A-Za-z0-9_]*`. Nesting stops at 10 levels with `Recursive interpolation limit exceeded`.

Pipedash inserts the value of a variable as is. A `${...}` inside the value stays as written.

The "Edit config.toml" editor accepts the same references. It validates the resolved values and saves the text as entered, so `${VAR}` references stay in the file. An unresolved required reference or an invalid resolved value prevents the save. The editor reports `Invalid config fields or environment references` without exposing the resolved value.

<Screenshot src="config-editor-environment-references" alt="The Edit config.toml editor showing backend and connection_string as environment references" caption="The editor keeps the environment references in the text. Resolved values never appear, and no error banner means the analysis passed." />

### Secret files

A `NAME_FILE` variable points at a file, such as a Docker or Kubernetes secret. Pipedash reads the file and removes the trailing line break.

```text
GITHUB_TOKEN_FILE=/run/secrets/github_token
PIPEDASH_POSTGRES_URL_FILE=/run/secrets/postgres_url
```

A set `NAME` wins over `NAME_FILE`. An unreadable file fails the load with `Failed to read NAME_FILE file <path>`, and the default is not used. `PIPEDASH_VAULT_PASSWORD` has no `_FILE` form because Pipedash reads it directly and not through interpolation.

## Token references

The `token` key holds a reference to a secret. The loader replaces `${VAR}` first, so the sync receives the value of the variable.

| Form | Meaning |
|---|---|
| `${VAR}` or `${VAR:-x}` | The loader inserts the value of `VAR`. The provider stores that value as its token. |
| `env:VAR` | Read the environment variable `VAR` |
| An uppercase name such as `GITHUB_TOKEN` | Read that environment variable |
| `keyring:name` or `storage:<id>` | Valid forms that the provider sync does not support. Pipedash logs a warning and stores no token. |
| Empty | Keep the stored token. A new provider gets an empty token, which the edit dialog replaces. A provider without a token can be opened, edited and removed in Settings. |

Use token references rather than literal secrets. Config validation accepts literal token values, and provider sync can store them as credentials. Saving the file does not remove a literal secret from it.

## Environment variables

| Variable | Default | Effect |
|---|---|---|
| `PIPEDASH_CONFIG_PATH` | Discovered | Path of `config.toml` |
| `PIPEDASH_DATA_DIR` | Platform data dir + `pipedash` | Data directory when `storage.data_dir` is empty. Also a server mode signal. On iOS the app points it at the app container. |
| `PIPEDASH_SERVER_MODE` | Unset | Any value selects server mode |
| `PIPEDASH_API_MODE` | Unset | Any value selects server mode |
| `PIPEDASH_VAULT_PASSWORD` | None | Encrypts tokens and doubles as the API bearer token. The [Token storage](/docs/configuration/token-storage) page covers it. |
| `PIPEDASH_BIND_ADDR` | `127.0.0.1:8080` | Web server address. Overrides `server.bind_addr`. An invalid value stops the server at startup. |
| `PIPEDASH_CORS_ALLOW_ALL` | `false` | `true` or `1` allows any origin, method and header. Any other value turns it off. Overrides `server.cors_allow_all`. |
| `PIPEDASH_BASE_PATH` | Empty | Path prefix of the web UI. Overrides `server.base_path`. |
| `PIPEDASH_EMBEDDED_FRONTEND` | `true` | Serves the frontend from the web server. Any value except `true` or `1` turns it off. |
| `PIPEDASH_STATUS_PAGES_ENABLED` | Unset | `true`, `1` or `yes` turns status page checks on. Any other value turns them off. Overrides `general.status_pages_enabled`. |
| `PIPEDASH_PUSH_RELAY_URL` | Unset | Push relay URL. Overrides `push.relay_url`. A nonblank value disables the "Background notifications" switch in Settings, Notifications. A blank value selects no relay rather than falling back to the file, and leaves the switch enabled. |
| `PIPEDASH_HTTP_POOL_SIZE` | `10` | Idle connections kept per host in the provider HTTP client. An invalid value gives `10`. |
| `PIPEDASH_DEMO_MODE` | Unset | `true` or `1` turns on the read-only demo mode of the web server. The [Docker](/docs/deployment/docker#read-only-demo-mode) page covers it. |
| `HTTPS_PROXY`, `HTTP_PROXY` | Unset | Proxy for provider requests while `general.proxy_url` is empty |
| `NO_PROXY` | Unset | Hosts that skip the proxy set in `general.proxy_url` |
| `KUBECONFIG` | `~/.kube/config` | Default kubeconfig path for the Tekton and FluxCD providers |
| `KUBERNETES_SERVICE_HOST` | Unset | Any value selects server mode |
| `DOCKER_CONTAINER` | Unset | Any value selects server mode |
| `RUST_LOG` | `pipedash=info,pipedash_core=info,pipedash_api=info,tower_http=info` | Log filter of the web server |
| `<NAME>_FILE` | Unset | Secret file for the variable `<NAME>` in a `${NAME}` reference |

The current version does not read the 4 variables that map to config keys: `PIPEDASH_METRICS_ENABLED`, `PIPEDASH_DEFAULT_REFRESH_INTERVAL`, `PIPEDASH_STORAGE_BACKEND` and `PIPEDASH_POSTGRES_URL`. `PIPEDASH_TOKEN_<provider_id>` has no effect either. The TOML keys hold these settings, and `${VAR}` interpolation or a token reference takes a value from the environment. A token reference such as `${GITHUB_TOKEN}` can name any variable.

`PIPEDASH_DB_PATH` and `PIPEDASH_METRICS_DB_PATH` are not supported. `storage.data_dir` moves the database.

## Precedence

Each setting has its own winner.

| Setting | Winner |
|---|---|
| Config path | `PIPEDASH_CONFIG_PATH`, then platform path, then data directory |
| Data directory | `storage.data_dir`, then `PIPEDASH_DATA_DIR`, then the platform directory |
| Bind address, CORS and base path | The environment variable, then the `[server]` key, then the default |
| Status page checks | `PIPEDASH_STATUS_PAGES_ENABLED`, then `general.status_pages_enabled` |
| Push relay URL | `PIPEDASH_PUSH_RELAY_URL`, then `push.relay_url` |
| Proxy | `general.proxy_url`, then `HTTPS_PROXY` and `HTTP_PROXY` |
| Metrics service | `general.metrics_enabled` from the file |
| Vault password | `storage.vault_password`, then `PIPEDASH_VAULT_PASSWORD` |
