---
title: "Managing Enviroment Variables in App Platform | Hostman Docs"
description: "Learn how to create, manage, and delete local and global enviroment variables in Hostman App Platform."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

In App Platform, you can use variables to store and pass configuration values such as passwords, file paths, tokens, and other environment parameters.

> [!NOTE]
> 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.

1.  Go to **App Platform** and start creating an application.
2.  In the **App settings** step, click **Add** in the **Variables** section.

![55f95d3a 48d3 4781 A878 F0bb0cadf6ec](https://content.hostman.com/assets/3341a40e-4eec-467d-b197-246872c03b6e.png?width=636&height=520)

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

![894ee047 D580 424b 9def 6eb6cdc0f60c](https://content.hostman.com/assets/8259c495-cdc8-4f3a-be02-b412d4138d86.png?width=660&height=577)

4.  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:

```shell
APP_NAME=MyApp
APP_ENV=production
DB_HOST=localhost
DB_PORT=3306
```

#### In an Existing Application

1.  Go to **App Platform** and select the application.
2.  Open the **Settings** tab and click **Edit** next to **Deploy Settings**.

![371959d8 47a6 42c0 9b1b 9a00a93f0999](https://content.hostman.com/assets/d9623937-59ff-4e80-a018-395c2589adfb.png?width=1548&height=804)

3.  In the **Variables** section, click **Add**.

![Ceffe6bc 5e4f 4783 9d96 Ee873103841b](https://content.hostman.com/assets/773448ce-8876-4b76-9943-c441bff3a5b7.png?width=1536&height=1340)

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

![894ee047 D580 424b 9def 6eb6cdc0f60c](https://content.hostman.com/assets/8259c495-cdc8-4f3a-be02-b412d4138d86.png?width=660&height=577)

### Editing a Local Variable

1.  Go to **App Platform** and select the application.
2.  Open the **Settings** tab and click **Edit** next to **Deploy Settings**.

![371959d8 47a6 42c0 9b1b 9a00a93f0999](https://content.hostman.com/assets/d9623937-59ff-4e80-a018-395c2589adfb.png?width=1548&height=804)

3.  In the **Variables** section, click the pencil icon next to the variable you want to edit.
4.  Make the changes and save.

### Deleting a Local Variable

1.  Go to **App Platform** and select the application.
2.  Open the **Settings** tab and click **Edit** next to **Deploy Settings**.
3.  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

1.  Go to **App Platform** → **Variables** and click **Add**.
2.  Enter the variable name and value. To add more variables, click **Add More**.
3.  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:

```shell
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

1.  Go to **App Platform** → **Variables**.
2.  Click the three-dot menu next to the variable and select **Edit**.

![F807e719 Cf3f 46c3 9fb1 32cff263cc9a](https://content.hostman.com/assets/376bd84e-a84a-4d2e-a1c3-da16d81d6c45.png?width=1537&height=794)

3.  Make the changes and click **Save**.

### Deleting a Global Variable

1.  Go to **App Platform** → **Variables**.
2.  Click the three-dot menu next to the variable and select **Delete**.
3.  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**.

![54414636 4d09 45ee 99d0 6aa99fce58a5](https://content.hostman.com/assets/a98f789e-1c02-45b8-81dd-2f7eceb5534a.png?width=1552&height=840)
