> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hoista.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Variables and domains

> Set environment variables and secrets, and add custom domains.

Set a project's environment variables and secrets, and add custom domains. Values and records go straight to the provider.

## Environment variables

Open a project's **Variables** tab. It lists each variable, which resource uses it, and whether it is a secret, a plain setting, a value Hoista links, or a name the code reads that has no value yet. Use **Add a variable**, or **Edit** on a row. For a watched project, **Paste many** adds several at once.

![The moodboard Variables tab, listing variables with their value, the resource using them and their kind](https://mintcdn.com/mirt-lab/bTbgaR1vteaGCpS-/assets/screens/variables-light.webp?fit=max\&auto=format\&n=bTbgaR1vteaGCpS-\&q=85\&s=01563b78576550aa596505aa5c6e7d0b)

![The moodboard Variables tab, listing variables with their value, the resource using them and their kind](https://mintcdn.com/mirt-lab/bTbgaR1vteaGCpS-/assets/screens/variables-dark.webp?fit=max\&auto=format\&n=bTbgaR1vteaGCpS-\&q=85\&s=6b8233fe26b0505735bba8cf0d22b719)

The Variables tab: each variable, the resource that uses it, and its kind. Secret values are never shown again.

Values go straight to the provider. Hoista never shows a secret value again, to you or to agents.

```bash theme={null}
hoist env list my-app
hoist env set my-app VARIABLE_NAME
hoist env set my-app --file .env
hoist env remove my-app VARIABLE_NAME
```

`hoist env set` asks for each value with a hidden prompt. For scripts, pipe one value in with `--value-stdin`, or read `NAME=value` lines from a file with `--file`. Never pass a secret as a command-line argument. When the project has more than one resource, pick one with `-r RESOURCE`.

On a managed project, the new values go out in a new deploy. On a watched project, Hoista sets them at the provider, which redeploys; add `--no-redeploy` to skip that.

Removing a variable changes it at the provider, and the running app may stop working. Check which resource uses it first.

Secrets do not go through an agent chat. When a deploy fails because a secret is missing, you paste it on the deploy's page in Desktop, and then your agent deploys again.

## Domains

Open the **Domains** tab and use **Add domain**. Pick the resource and enter the hostname. Hoista shows the DNS records to create, then tracks DNS and certificate status.

```bash theme={null}
hoist domains my-app
hoist domains add app.example.com -p my-app
hoist domains check app.example.com -p my-app
hoist domains remove app.example.com -p my-app
```

When the project has more than one resource, pick one with `-r RESOURCE`. Hoista takes the zone from the hostname's last two labels; pass `--zone` if it differs, and add `--create-zone` to create the DNS zone as well. Adding a domain does not make it ready. Wait until DNS and the certificate check pass before you send production traffic to it.

For a watched project, you can add a domain only where the provider supports it through Hoista. Otherwise, change domains at the provider.

## Related

> [card] [Plan and deploy](https://docs.hoista.dev/guides/deploy.md)
>
> Deploy with the new values.

> [card] [Environments](https://docs.hoista.dev/guides/environments.md)
>
> Separate spaces for projects.

> [card] [Credential storage](https://docs.hoista.dev/security/credentials.md)
>
> How Hoista keeps secrets.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.