Skip to content
Docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Environment variables

Store API keys, tokens and other values. Conic encrypts them and sets them as Cloudflare secrets on your Workers.

Open the project from your projects, click Settings, then Environment Variables.

web · Environment Variables
DATABASE_URL••••••••••••Secret
STRIPE_SECRET_KEY••••••••••••Secret
SESSION_SECRET••••••••••••Secret
Encrypted with AWS KMS

Add a variable

Open the form

Click Add Environment Variable.

Type the name and the value

Type the name, for example API_KEY, and the Production Value. To add many variables, paste lines such as API_KEY=... in the form.

Set the preview value

Select Same value for Preview, or Different value for Preview and type the preview value.

Save

Save the form.

How Conic keeps the values

Conic encrypts each value with AWS KMS. Then it sets the value as a Cloudflare secret on your Worker. After you save a value, nobody can see it again, in Conic or in Cloudflare. To change a value, type the new value.

When a change applies

When you save a variable, the production Worker gets it immediately. Your Worker code reads it from the next request.

Your build can also read variables, for example to put a public key in the client code. The build reads the values only when it runs. After you change such a variable, redeploy production. Conic tells you when a redeploy is necessary.

Previews get the preview value from their next deployment.

Remove a variable

Open the menu of the variable and click Remove this variable. Conic removes it from Conic and from the production Worker.

Was this page helpful?