# How do I deploy a new version or change variables and the port?

> Deploy a new image tag to your Phluit Edge Container, and change its environment variables or the port it listens on from the Deploy and Settings tabs.

Source: https://docs.phluit.com/products/edge-containers/update-an-edge-container/

## Deploy a new version

1.  Push the new version of your image with a new tag, for example `ghcr.io/you/app:v2`.
2.  Open your container's page and the **Deploy** tab. It shows what runs now under **Running now**.
3.  Enter the image with its new tag and click **Deploy**, then confirm.

The new version starts and takes over once it is up, within a few minutes. The image you enter is checked first, the same way as when you deployed: it must exist with that tag in a public registry.

## Change environment variables

1.  Open the **Settings** tab.
2.  Under **Environment variables**, edit the list: one per line, as `NAME=value`. Lines that start with `#` are ignored.
3.  Click **Save variables** and confirm.

The container restarts with the new values, within a minute.

Rules for variables:

-   Names use letters, digits and `_`, and don't start with a digit.
-   A value can be up to 4,000 characters.
-   Up to 60 variables.

## Change the port

The port is the one your app listens on inside the container. The HTTPS address forwards to it.

1.  On the **Settings** tab, under **Port**, enter the new port (1 to 65535).
2.  Click **Save port** and confirm.

## Good to know

-   Use a new tag for each version, such as v2 or the commit, so you always know what runs.
-   After a change, check the status on the **Overview** tab. **Failing to start** usually means a wrong port or a missing variable.
-   In a shared project, Developers and Admins can deploy and change settings too.
