Configure your environment variables

Last modified: September 13th, 2024

If you have yet to configure your first Site build, CloudCannon will suggest environment variables based on your SSG and the contents of your Site files.

Environment variables may be required for your site to build correctly. For example, Jekyll sites may want to set the JEKYLL_ENV environment variable to production when hosting a live site. Environment variables can also be used to change behavior for different deployment targets. For example, you might use a different CDN for your development, staging and production sites.

To configure your environment variables:

  1. Navigate to the Build configuration page under Site Settings.
  2. Under Command line options, enter the Key and Value for your Environment Variables.
  3. Click the Add Environment Variable button to add more text fields as needed.
  4. Click the Update Site button.
A screenshot of the Build Configuration page shows a text field for configuring your environment variables and an Add Environment Variable button.

Environment variables are often used in conjunction with command line options. For more information, please read our documentation on configuring your command line options.

Open in a new tab