Set environment variables
Environment variables are the settings and keys your site reads while it builds and runs, such as DATABASE_URL or STRIPE_SECRET_KEY. Keep them here rather than in your site’s files, so they never end up in a version anyone can download.
Find them on your site’s Environment variables tab. You can add them once your site has its first files.
Who can see values
Section titled “Who can see values”- Owners and admins can show, copy, add, edit and remove variables.
- Members see the names only. Values stay hidden.
- AI tools connected to Cloudzyro can’t see or set environment variables at all.
Values are hidden until you choose to show them. A value marked Sensitive can never be shown again, by anyone, including you.
Add a variable
Section titled “Add a variable”-
Click Add variable.
-
Type the Name, such as
DATABASE_URL. Names can use letters, numbers and underscores, and can’t start with a number. -
Type the Value. Values can be up to 32 KB.
-
Tick Sensitive if it’s a secret you never need to see again. If the name looks like a secret, we suggest ticking it.
-
Click Add variable.
Add several at once from a .env file
Section titled “Add several at once from a .env file”-
Click Add variable, then Paste a .env file instead. Or just paste
.envlines into Name: we spot them and switch for you. -
Paste your lines, one
NAME=valueper line. Comments and blank lines are ignored. We list the names we found. -
Tick Sensitive if you want it for all of them.
-
Click Add variable (or Add 3 variables, and so on).
When you upload files that include a .env file, we leave the file out and offer Add them now. Values added that way are saved as sensitive.
Show, copy and edit
Section titled “Show, copy and edit”Each variable has buttons beside it:
- Show value and Hide value reveal or hide it on the page.
- Copy name and Copy value copy them to your clipboard.
- Edit opens the variable with its current value filled in. Change it and click Save.
- Remove asks you to confirm. Your site won’t have the variable from its next deploy.
Use Filter by name to find a variable when you have a lot of them.
Sensitive values
Section titled “Sensitive values”A Sensitive variable shows a lock instead of its value, and has no Show or Copy button. You can still replace it: click Edit, enter the new value and click Save.
To make a sensitive variable viewable again, click Edit, enter its value again and untick Sensitive.
Deploy to use your changes
Section titled “Deploy to use your changes”Changes apply on your site’s next deploy. After you add, edit or remove a variable, click Deploy now to put your site online again straight away with the new values. Your current version stays online until the new one is ready.
If your site is connected to a repository, the next push also picks up the changes.
Databases
Section titled “Databases”To connect a database, use the site’s Database tab instead. It tests the connection and names the variables the way your code expects, then saves them here. See Connect a database.