> For the complete documentation index, see [llms.txt](https://docs.uibakery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uibakery.io/on-premise/install-and-update/updating-environment-variables.md).

# Updating environment variables

[Environment variables](/on-premise/environment-variables.md) are a crucial part of configuring your UI Bakery On-Premise installation. They can control various settings, including your [license key](/on-premise/install-and-update/updating-license-key.md), [database connections](/on-premise/install-and-update/recommendations/running-a-standalone-database-instance.md), [domain name](/on-premise/networking-and-security/setting-up-a-domain-name.md) and application behavior. Here's how you can modify them.

After the installation of UI Bakery On-Premise, a directory named `ui-bakery-on-premise` is created. Within this directory, you will find a file named `.env`. This file contains the [environment variables](/on-premise/environment-variables.md) for your instance.

To modify any variable, such as your license key or other settings:

1. Open the `.env` file using a text editor. You can do this through the command line or by navigating through the file explorer to `ui-bakery-on-premise` and opening the `.env` file.
2. Find and modify or add a new variable:
3. ```bash
   UI_BAKERY_LICENSE_KEY=new_license_key_value
   ```

   Make sure to save the file after making your changes.
4. To apply the changes, a system restart is necessary. Accomplish this by running the following commands in your terminal:

   ```sh
   docker compose down
   docker compose up -d
   ```

{% hint style="info" %}
Restarting your UI Bakery On-Premise instance with `docker compose down` and `docker compose up -d` does not erase your data. Persistent data is stored in Docker volumes, ensuring it remains safe across container restarts.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.uibakery.io/on-premise/install-and-update/updating-environment-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
