Request secrets
Declare which secrets your worker or API needs:os.environ:
Manage secrets
Via the dashboard
The dashboard has a Secrets page where you can create, update, and delete secrets. Navigate to it from the sidebar.Via the REST API
You can also manage secrets programmatically through the server’s API:How it works
- You create secrets in the dashboard or via the API
- Secrets are encrypted and stored in the server’s database
- When a worker or API starts, it fetches declared secrets from the server
- Secrets are injected as environment variables before your code runs
- Your code accesses them via
os.environ
Best practices
- Use descriptive names like
stripe_api_keyrather than generic names likekey1 - Only declare the secrets each service actually needs
- Rotate secrets by updating their value in the dashboard — services pick up the new value on next restart