Skip to main content
Use Towbar-managed secrets when you want to enter values directly in the dashboard. The manifest contains only variable names; Towbar stores their values separately.

Choose when a value is used

The stage controls when Towbar supplies a value. Declare only the stages your app needs: Resources support runtime secrets only. Hook values are supplied only when that hook is configured. External-service imports use runtime only; see Secrets from external services.

Declare and save a secret

Add the names an app needs to its manifest. For example, an app that only needs values while running declares runtime:
.towbar/apps/api.app.yml
Sync the repository. Then open App → Settings → Secrets, choose the environment and Runtime stage, enter DATABASE_URL and API_TOKEN, and click Save. For a resource, use Resource → Settings → Secrets. Newly declared keys appear unset; they must have a value before deployment. A missing value blocks deployment, not repository sync.
An app's Runtime Secrets screen in Towbar with two saved values masked.
An app's Runtime Secrets screen in Towbar with two saved values masked.

The Runtime stage for an example app. Saved values stay masked until revealed by an authorized Admin.

Use Form to edit one value at a time. Stored values are masked until an authorized Admin reveals them with the eye icon; reveal a masked value before editing it. The Editor tab lets an Admin work with KEY=value lines for the selected stage. It accepts quoted values, comments, and multiline quoted strings. An unchanged value stays saved. Removing a declared key from the manifest removes its saved value on the next successful sync of that environment.

Reuse a shared value

If several workloads need the same value, save it once under Manage → Shared secrets for the appropriate stage. Keep API_TOKEN declared in each workload manifest, then set its workload value to a reference:
App → Settings → Secrets → Runtime
The reference reads the workspace Runtime value for API_TOKEN when the workload runs. Shared values are not injected into workloads automatically. A reference can also appear within a larger value, such as Bearer {{globals.API_TOKEN}}. A missing reference stops deployment. Shared values are stage-specific but available across environments, including previews, so use distinct workspace keys when environments need different credentials. Only an authorized Admin can reveal a saved value. Hovering over a visible {{globals.KEY}} expression can preview its referenced shared value; hovering over a variable name does not reveal a secret.
Shared secret names remain visible while saved values are masked.
Shared secret names remain visible while saved values are masked.

Apply changes

Save does not restart a container or queue a deployment. Deploy the app or resource after saving to use the new values. Build-stage changes require a new build; runtime changes require a replacement deployment. Preview app values are isolated from persistent environments. Changing a database password in Towbar does not change the password inside an existing database, so coordinate that rotation with the database itself before redeploying consumers.
Last modified on September 26, 2026