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

# Deploy project

> Build and deploy a Veryfront project.

## Prerequisites

* A project that runs locally with `veryfront dev` (see
  [Create project](/code/getting-started/create-project)).
* For Veryfront Cloud: a `VERYFRONT_API_TOKEN` and a project reference. Run
  `veryfront login` or set the env vars. See
  [Configuration](/code/guides/configuration).
* For another host: any container or Node-compatible runtime that can serve the
  build output.

## Build

Create a production build:

```bash theme={null}
veryfront build
```

This writes the production output to `dist/`.

## Run the production build locally

Stop the dev server, then serve the production build:

```bash theme={null}
veryfront serve
```

Open [http://localhost:3000](http://localhost:3000). Confirm the same pages and
endpoints work.

## Deploy to Veryfront Cloud

```bash theme={null}
veryfront deploy
```

For a preview deployment per branch:

```bash theme={null}
veryfront deploy --branch feature-x
```

## Deploy somewhere else

For a non-Cloud target, run `veryfront build` and ship the `dist/` output. See
[Building and deploying](/code/guides/deploying).

## Verify it worked

After `veryfront deploy`, run:

```bash theme={null}
veryfront open
```

The deployed page and API routes respond.
