Secrets
A secret is a variable whose value nobody reads back. You set it, a deploy hands it to your service, and from then on it shows as a secret with no value, in the console, the CLI, the API and MCP alike.
Set a secret
On the service's Variables tab, or the project's Shared variables page, click Add variable, give its Name and Value, tick Secret, and click Add variable. To replace a secret's value, click Set a new value on its row; the old value cannot be shown.
A secret can be set on a project, an environment or a service, like any variable, and the narrowest scope wins the same way.
What happens to the value
- Sealed when you save it. OpenPanel seals the value with AES-256-GCM under its own key before it is stored, bound to that variable, so a sealed value copied elsewhere does not open. See Secrets and encryption.
- Never read back. Lists show the name,
"secret": trueand no value. Nobody can read it back, whatever their role. - Sealed again for one server. At a deploy, the value is sealed for OpenPanel's gateway alone, bound to the server that runs the service and to that version of its state. Only the gateway can open it.
- Sent to the agent over its encrypted connection. The gateway hands the value to the agent on that server, which gives it to the container as an environment variable.
A deployment's record never holds a secret's value: its copy of the variables names the secret, not what it contains.
On your server, a secret is an environment variable
Inside the container, and to anyone with root on the server, a secret is an ordinary environment variable. Sealing protects it in OpenPanel's database and on the way to your server, not from people who control the server.
Change or remove a secret
Set it again with a new value, or remove it with openpanel env unset, then deploy. Until the deploy, the service may run with either the old value or the new one: a secret's value is read again whenever its server's state is written, for example when another service on that server deploys.
To turn a secret back into a plain variable, set the name again without --secret ("secret": false). The new value replaces the sealed one.
Values built from a secret
A plain variable that refers to a secret, such as PAYMENT_URL=https://${{api.STRIPE_KEY}}@pay.example.com, becomes a secret itself when the service is deployed: its worked-out value is sealed and sent the same way. Lists still show such a variable as you typed it, with the reference and not the secret's value.
Who can do what
- Set, replace and remove a secret: members with deploy access to the project.
- Read its value: nobody, through the CLI, the API or MCP. Only your service's containers receive it.
- The audit log records each change by name, never the value.
Variables
Environment variables for a service, set on the whole project, on one environment or on the service itself, and how they reach its containers.
References
Build a variable's value from a shared variable or from another service's, with ${{shared.NAME}} and ${{service.NAME}}, worked out at each deploy.