Connect your generated app to Vercel. Your Git repository supplies the code, and pushes to `main` deploy to Production.

## Before you begin

Prepare these first:

- **Node.js 24.15+, npm and Git** on your computer.
- A Git repository with your app published on **`main`**.
- A Vercel account with access to the repository. Authorize Vercel's Git provider app for your team.
- For admin projects, a configured **production database**. Prepare staging too if you want Preview deployments.

If database setup is pending, run this inside your project:

```sh npm
npx dinvolt setup
```

```sh bun
bunx dinvolt setup
```

```sh pnpm
pnpm dlx dinvolt setup
```

```sh yarn
yarn dlx dinvolt setup
```

Review and apply migrations before hosting setup. Connecting Git can start a build of your published code.

Automatic Git connection supports GitHub.com, GitLab.com (including groups) and Bitbucket.org. Other providers and self-hosted servers need their official Vercel integration.

## Connect your project

### 1. Run the wizard

From your generated app:

```sh npm
npx dinvolt vercel setup
```

```sh bun
bunx dinvolt vercel setup
```

```sh pnpm
pnpm dlx dinvolt vercel setup
```

```sh yarn
yarn dlx dinvolt vercel setup
```

Or point to it from another directory:

```sh npm
npx dinvolt vercel setup --cwd ./my-app
```

```sh bun
bunx dinvolt vercel setup --cwd ./my-app
```

```sh pnpm
pnpm dlx dinvolt vercel setup --cwd ./my-app
```

```sh yarn
yarn dlx dinvolt vercel setup --cwd ./my-app
```

### 2. Choose the destination

Select your Git remote, Vercel team and an existing or new project. Sign in to Vercel if prompted.

Dinvolt verifies the published `main` branch and checks that any existing project link matches.

### 3. Review the configuration

Choose your Production domain and whether to enable staging-backed Preview deployments. Admin projects can also configure password-recovery email.

Review the destination and environment-variable plan, then confirm. Existing variables are preserved unless you choose to replace them.

### 4. Deploy through Git

Connecting Git may trigger Vercel's initial build. After setup, future pushes or merges to `main` trigger Production deployments.

Check the deployment in Vercel. Saving environment variables does not update a deployment already running.

## When a deployment happens

Dinvolt saves and verifies the approved configuration before connecting a new Git integration. Project creation itself receives no Git repository or source files.

**Connecting Git can trigger an initial build of the published repository.** Have the database and that commit's code ready before confirming setup.

An existing Git integration remains active throughout setup. Coordinate pushes and other configuration changes until setup finishes.

The command does not invoke a deploy, redeploy or deploy hook. After setup, pushes or merges to `main` produce Git deployments.

## Troubleshooting

Setup preserves completed operations if it fails or is cancelled. Check the current state, then rerun.

| Problem | Next step |
| --- | --- |
| Authentication or provider access fails | Check Vercel login, team permissions and the Git provider app's repository access. |
| Custom domain is pending | Complete the requested DNS/ownership steps in Vercel Domains, then rerun. |
| Database credentials are missing | Complete the required environment with `setup`. |
| Project creation result is unclear | Select the existing project on retry; in scripts, use `--project`. |
| Hosting variables conflict | Review the named keys in Vercel, resolve the conflict and rerun. |

Provider errors are summarized to avoid exposing submitted values. A failed command may still have completed a remote change.


## In this section

- <span id="environments-and-origins"></span><span id="production-domains"></span><span id="preview-deployments"></span><span id="social-images"></span><span id="password-recovery"></span>[Domains and environments](/guides/vercel/environments): Configure Production, Preview, domains and recovery email.
- <span id="agents-and-scripts"></span><span id="configure-an-existing-project"></span><span id="create-a-new-project"></span><span id="replace-an-existing-variable"></span><span id="supply-recovery-email-settings"></span>[Automate Vercel setup](/guides/vercel/automation): Connect hosting with explicit options and JSON results.
- <span id="what-the-command-changes"></span><span id="existing-links-and-custom-builds"></span><span id="older-or-customized-starters"></span><span id="secrets-and-variable-handling"></span><span id="advanced-implementation-details"></span><span id="official-contracts"></span>[Hosting configuration](/guides/vercel/configuration): Review project settings, secret handling and existing links.

