> ## Documentation Index
> Fetch the complete documentation index at: https://bunnynet-cb9733c2-claude-slack-session-t7p5ro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment Variables

> Configure your container's runtime settings using environment variables.

Environment variables allow you to provide dynamic configuration options to your container without hardcoding values in your code.

## Automatic detection

When you select a registry image, Magic Containers scans the image metadata to identify environment variables the container might use. If detected, the variables are displayed with their names and any default values.

<Note>
  Automatic scanning is currently only supported for public Docker Hub images.
</Note>

<Frame>
  <img src="https://mintcdn.com/bunnynet-cb9733c2-claude-slack-session-t7p5ro/Mdl4X8_EuSLnH7lg/images/docs/1dd222658a76584eb0d68791cd8042c9e7ae84652dedfd055a55190c39567152-image.png?fit=max&auto=format&n=Mdl4X8_EuSLnH7lg&q=85&s=dfc118e50b72397de7e6dd311375fa93" alt="" width="2294" height="794" data-path="images/docs/1dd222658a76584eb0d68791cd8042c9e7ae84652dedfd055a55190c39567152-image.png" />
</Frame>

Click **Go To Environment Variables** to add all detected variables with a single click.

<Frame>
  <img src="https://mintcdn.com/bunnynet-cb9733c2-claude-slack-session-t7p5ro/Mdl4X8_EuSLnH7lg/images/docs/068bfa03c12e199dc92d7b824981751105cb62c4a2c19f3e322991d4f96bcf30-image.png?fit=max&auto=format&n=Mdl4X8_EuSLnH7lg&q=85&s=02410713676a120e7e7f01566d858e51" alt="" width="2308" height="1244" data-path="images/docs/068bfa03c12e199dc92d7b824981751105cb62c4a2c19f3e322991d4f96bcf30-image.png" />
</Frame>

## Manual configuration

If no variables are detected, or you need to add additional ones, you can configure them manually:

1. Go to **Magic Containers** and select your container.

2. Click **Container Settings**, then **Edit**.

3. Select the **Environment Variables** tab and click **+ Add New Variable**.

<Frame>
  <img src="https://mintcdn.com/bunnynet-cb9733c2-claude-slack-session-t7p5ro/paNVHgJgjRp2FXxY/images/docs/f2c12c131ee6d540589efa9d281c2fc585bdf11f43bef60b7dca0d2cd31548ad-image.png?fit=max&auto=format&n=paNVHgJgjRp2FXxY&q=85&s=fc4f7f1bca8bb5b8abc8947d5b2953bc" alt="" width="1874" height="1012" data-path="images/docs/f2c12c131ee6d540589efa9d281c2fc585bdf11f43bef60b7dca0d2cd31548ad-image.png" />
</Frame>

4. Enter the variable name and value, then click **Update Container**.

<Frame>
  <img src="https://mintcdn.com/bunnynet-cb9733c2-claude-slack-session-t7p5ro/Mdl4X8_EuSLnH7lg/images/docs/2d09d6db1ba38fb27ffd441c088d345d2e342a09fa7ba7d33ab4e05848a7b3b7-image.png?fit=max&auto=format&n=Mdl4X8_EuSLnH7lg&q=85&s=9f680d7d9e97bc42009b17de817b80ec" alt="" width="2330" height="732" data-path="images/docs/2d09d6db1ba38fb27ffd441c088d345d2e342a09fa7ba7d33ab4e05848a7b3b7-image.png" />
</Frame>
