> For the complete documentation index, see [llms.txt](https://docs.glbnxt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.glbnxt.com/configure-glbnxt/platform-configuration/application-management/my-apps/environment-variable-rules.md).

# Environment variable rules

{% hint style="info" icon="user-lock" %}
**Role-based access**

What each role can do on this page. Roles are assigned in [User management](/configure-glbnxt/platform-configuration/user-management.md).

| Administrator                                  | Moderator                                 | User                                      |
| ---------------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| <i class="fa-check">:check:</i> Read and write | <i class="fa-xmark">:xmark:</i> No access | <i class="fa-xmark">:xmark:</i> No access |
| {% endhint %}                                  |                                           |                                           |

***

What the platform accepts for an application's environment variables, and how the values are stored. For the steps to set them, see [Set environment variables](/configure-glbnxt/platform-configuration/application-management/my-apps/set-environment-variables.md).

### Per application

An application may have at most **50** environment variables.

### Names

| Rule               | Value                                     |
| ------------------ | ----------------------------------------- |
| Allowed characters | Letters, numbers and underscores          |
| First character    | A letter or an underscore, never a number |
| Maximum length     | 128 characters                            |
| Reserved           | Names beginning `GLBNXT_`                 |
| Duplicates         | Refused within one application            |

Names are case-sensitive, and `DATABASE_HOST` and `database_host` are two different variables. That is how the container reads them, so it is how the platform treats them. The reserved prefix is checked without regard to case, so `glbnxt_url` is refused as well as `GLBNXT_URL`.

`GLBNXT_` is reserved for variables the platform supplies itself. Reserving the prefix means one of your variables can never replace one of ours.

### Values

| Rule           | Value                                     |
| -------------- | ----------------------------------------- |
| Type           | Text, always                              |
| Maximum length | 4000 characters                           |
| Lines          | One. A value may not contain a line break |
| Empty          | Allowed                                   |

A value is always handed to your container as text. If you set `REPLICAS` to `16`, your application receives the string `16`, not a number; this is how environment variables work everywhere, and it is worth remembering if your application reads them without converting.

An empty value is a legitimate setting and is not the same as not setting the variable at all.

### How the values are stored

{% hint style="warning" %}
**Values are stored as plain text. Anyone who can open the application in the portal can read them**, including GLBNXT support staff, who need to see them in order to help you.

**Do not put credentials, API keys or tokens in an environment variable.**
{% endhint %}

### When a change takes effect

Adding, changing or removing a variable replaces the running container. The application restarts and keeps its address. Nothing takes effect until you choose **Save and restart**.

### How the rules are checked

The form warns you as you type when a name or value breaks a rule. The platform then validates every variable when you save, and again during the deployment. A variable that fails validation is not applied, and the message tells you which one to fix: under its row for a single variable, or on the card for the list as a whole, such as the 50-variable limit.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.glbnxt.com/configure-glbnxt/platform-configuration/application-management/my-apps/environment-variable-rules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
