> ## 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.

# Plan and deploy

> Review a deployment plan, deploy it, follow it and roll back.

A deployment starts with a plan built from the project's source. The plan lists the resources, provider accounts, regions and environment variables before Hoista changes anything. [Connect](https://docs.hoista.dev/guides/accounts.md) the target account first.

## From Desktop

Desktop has no deploy form. Ask a [connected agent](https://docs.hoista.dev/agents/connect.md) to deploy, for example "Deploy this project with Hoista", or use the CLI below. **Deploys** in the sidebar shows every deploy as it runs, and a project's **Deploys** tab shows that project's history.

For a watched project, the provider still runs the build. Use **Deploy newest commit**, or a row's menu to redeploy, restart or roll back. Hoista asks the provider to do it.

## Create and review a plan

```bash theme={null}
hoist plan ./my-app --project my-app
hoist plan show PLAN_ID
```

Check the detected framework, resource names, accounts, regions, required variables and any database migration step. To change where a resource goes:

```bash theme={null}
hoist plan set PLAN_ID RESOURCE_NAME --account ACCOUNT
hoist plan set PLAN_ID RESOURCE_NAME --region REGION
```

`--region -` clears the region. To change more, pipe edited JSON from `hoist plan show PLAN_ID --json` into `hoist plan edit PLAN_ID`.

If the source changes, create a new plan. Set required values through [variables](https://docs.hoista.dev/guides/environment.md).

## Deploy

Deploy a folder in one step:

```bash theme={null}
hoist deploy ./my-app --project my-app -m "First deploy"
```

The CLI follows the deploy step by step until it is live or fails. `--detach` starts it and returns straight away. `-m` saves a note with the deploy.

Or deploy a reviewed plan:

```bash theme={null}
hoist deploy --project my-app --plan PLAN_ID --plan-revision REVISION --request-key REQUEST_UUID
```

Keep the same request key if you retry the same deployment. Hoista rejects the key if the content changed. `hoist deploys request REQUEST_UUID` finds the deploy a key started.

## Follow, cancel and roll back

```bash theme={null}
hoist status my-app
hoist deploys my-app
hoist deploys show DEPLOY_ID --log
hoist logs my-app --follow
hoist cancel DEPLOY_ID
hoist rollback DEPLOY_ID
```

In a terminal, `hoist rollback` without a deploy ID lets you pick one from the project's deploys.

![The deploy page for moodboard v4, live, with its checks and a Roll back to v3 button](https://mintcdn.com/mirt-lab/bTbgaR1vteaGCpS-/assets/screens/deploy-live-light.webp?fit=max\&auto=format\&n=bTbgaR1vteaGCpS-\&q=85\&s=f0845df9cf8825d3858291133725aa2e)

![The deploy page for moodboard v4, live, with its checks and a Roll back to v3 button](https://mintcdn.com/mirt-lab/bTbgaR1vteaGCpS-/assets/screens/deploy-live-dark.webp?fit=max\&auto=format\&n=bTbgaR1vteaGCpS-\&q=85\&s=a92d062e62c6de5697fed100dbbf3c6a)

A finished deploy, with its checks and a button to roll back to v3.

A successful build does not prove the app works. Check the running project as well.

Cancelling asks the provider to stop, and the provider may already be past that point. Rolling back switches which version serves traffic. It does not undo database migrations.

If a request times out, check what happened before you retry. See [operation outcomes](https://docs.hoista.dev/guides/backups.md).

[Providers](https://docs.hoista.dev/providers/overview.md) lists the build types and actions each provider supports.

## Related

> [card] [A failed deployment](https://docs.hoista.dev/examples/failed-deployment.md)
>
> Find where it failed and fix it.

> [card] [Variables and domains](https://docs.hoista.dev/guides/environment.md)
>
> Set what the deploy needs.

> [card] [Logs and metrics](https://docs.hoista.dev/guides/logs.md)
>
> Check the running app afterwards.


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