In App Platform, you can use variables to store and pass configuration values such as passwords, file paths, tokens, and other environment parameters.
An application can have a maximum of 100 variables, regardless of type.
Types of Variables
There are two types of variables: local and global.
Local variables:
- Are scoped to a single application
- Are deleted together with the application
- Are configured when creating or editing an application
Global variables:
- Are stored separately from applications
- Can be reused across multiple applications
- Are managed centrally in App Platform → Variables
Local Variables
Local variables can be defined when creating an application or by editing the settings of an existing one.
Creating a Local Variable
When creating an Application
You can add local variables during application creation.
- Go to App Platform and start creating an application.
- In the App settings step, click Add in the Variables section.

- Enter the variable name and value. To add more variables, click Add More.

- Enable Save as global if you want this variable to be available to other applications.
You can also upload variables from a file. To do this, click Upload from File and select a .env file. Only files named .env are supported. Variables must be defined in the following format:
APP_NAME=MyApp
APP_ENV=production
DB_HOST=localhost
DB_PORT=3306
In an Existing Application
- Go to App Platform and select the application.
- Open the Settings tab and click Edit next to Deploy Settings.

- In the Variables section, click Add.

- Enter the variable name and value. To add more variables, click Add More.
- Enable Save as global if you want this variable to be available to other applications.

Editing a Local Variable
- Go to App Platform and select the application.
- Open the Settings tab and click Edit next to Deploy Settings.

- In the Variables section, click the pencil icon next to the variable you want to edit.
- Make the changes and save.
Deleting a Local Variable
- Go to App Platform and select the application.
- Open the Settings tab and click Edit next to Deploy Settings.
- Click the ✕ icon next to the variable you want to delete.
Global Variables
Global variables are managed centrally and are available under App Platform → Variables.
Creating a Global Variable
- Go to App Platform → Variables and click Add.
- Enter the variable name and value. To add more variables, click Add More.
- You can also upload variables from a file by clicking Upload from file. Only
.env files are supported. Variables must be defined in the following format:
APP_NAME=MyApp
APP_ENV=production
DB_HOST=localhost
DB_PORT=3306
Once added, global variables can be selected when creating a new application or editing an existing one.
Editing a Global Variable
- Go to App Platform → Variables.
- Click the three-dot menu next to the variable and select Edit.

- Make the changes and click Save.
Deleting a Global Variable
- Go to App Platform → Variables.
- Click the three-dot menu next to the variable and select Delete.
- Confirm the deletion.
If the variable is used by any applications, a list of those applications will be shown. To keep the variable in those applications as a local variable, enable Keep variable as local.
