---
title: "Vercel"
description: "Set up Vercel to host the Nuxt app: the account, the project, its environments, preview deployments, the function region and the env it needs from the backend."
canonical_url: "https://nuxt-backend.dev/docs/services/vercel"
---
# Vercel

> Set up Vercel to host the Nuxt app: the account, the project, its environments, preview deployments, the function region and the env it needs from the backend.

Version: nuxt-backend 0.6.x · Tab: Services · Kind: how-to · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

Vercel hosts the Nuxt app. Any host that runs Nuxt works; Vercel is the one the package is built and checked on first, and on it bot protection, error reports and edge rate limits take what the platform gives.

<table>
<thead>
  <tr>
    <th>
      You need
    </th>
    
    <th>
      Time
    </th>
    
    <th>
      Cost to start
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      A Vercel account and the app in a Git repository
    </td>
    
    <td>
      10 minutes
    </td>
    
    <td>
      Free for a personal project. A commercial app needs Pro, $20 a month
    </td>
  </tr>
</tbody>
</table>

## What it powers

<table>
<thead>
  <tr>
    <th>
      Capability
    </th>
    
    <th>
      What Vercel gives
    </th>
    
    <th>
      Pages
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        hosting
      </code>
    </td>
    
    <td>
      The Nuxt server, previews per branch, the CDN and custom domains
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/deploy">
        Deploy to production
      </a>
      
      , <a href="https://nuxt-backend.dev/docs/ship/deploy/previews">
        Set up preview environments
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        protection
      </code>
    </td>
    
    <td>
      BotID, an invisible bot check before a sign-in code is sent
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/services/bot-protection">
        Bot protection
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        protection
      </code>
    </td>
    
    <td>
      Firewall rate limits, counted at the edge
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/deploy/vercel#rate-limit-at-the-edge">
        Deploy to Vercel
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        analytics
      </code>
    </td>
    
    <td>
      Web Analytics and Speed Insights, without cookies
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/deploy/vercel#count-visits-without-cookies">
        Deploy to Vercel
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        monitoring
      </code>
    </td>
    
    <td>
      Sentry's integration, which sets the source-map names
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/services/sentry">
        Sentry
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai
      </code>
    </td>
    
    <td>
      The AI Gateway, with a key, where <code>
        setupAi({ gateway })
      </code>
      
       names <code>
        'vercel'
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/services/ai-gateway#choose-a-gateway">
        AI gateway
      </a>
    </td>
  </tr>
</tbody>
</table>

The backend never runs on Vercel: it runs on Convex. [Deploy to Vercel](https://nuxt-backend.dev/docs/ship/deploy/vercel) has what an app gets there, part by part.

## Create the account

<steps level="3">

### Sign up

At [vercel.com/signup](https://vercel.com/signup), with the Git provider that holds your app. Hobby, the free plan, is for personal, non-commercial use: an app that takes payments or pays a developer needs Pro ([Fair use](https://vercel.com/docs/limits/fair-use-guidelines#commercial-usage)).

### Import the project

**Add New**, **Project**, then pick the repository. Vercel detects Nuxt and needs no configuration for it.

### Set the build command

In **Settings**, **Build and Deployment**, override the build command so the backend deploys first:

```bash
npx convex deploy --cmd 'npm run build' --cmd-url-env-var-name NUXT_PUBLIC_BACKEND_URL
```

### Pick the function region

New projects run their functions in `iad1` (Washington, D.C.). Move them next to your Convex deployment in **Settings**, **Functions**: `fra1` or `dub1` for a deployment in Ireland. Every request the Nuxt server makes to the backend crosses that distance.

</steps>

**Who should own it.** Create the project in a team, not a personal account. The team's owner pays the bill and holds the production env. Members deploy; viewer seats are free.

## Sandbox and test mode

Vercel's environments map to the deployments of your backend:

<table>
<thead>
  <tr>
    <th>
      Vercel environment
    </th>
    
    <th>
      Its deploy key
    </th>
    
    <th>
      <code>
        BACKEND_ENVIRONMENT
      </code>
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Production
    </td>
    
    <td>
      The production deploy key
    </td>
    
    <td>
      <code>
        production
      </code>
      
      , or <code>
        sandbox
      </code>
      
       for a <a href="https://nuxt-backend.dev/docs/ship/deploy/staging">
        demo or staging app
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Preview
    </td>
    
    <td>
      A preview deploy key: each branch gets a backend of its own
    </td>
    
    <td>
      <code>
        preview
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Development
    </td>
    
    <td>
      None: <code>
        npx nuxt-backend dev
      </code>
      
       runs locally
    </td>
    
    <td>
      <code>
        development
      </code>
    </td>
  </tr>
</tbody>
</table>

Turn on Vercel Authentication for previews, on every plan, so only your team opens them. An end-to-end run against a preview passes the **Protection Bypass for Automation** secret in the `x-vercel-protection-bypass` header ([Deployment protection](https://vercel.com/docs/deployment-protection)).

## Keys and environment

Set these in **Settings**, **Environment Variables**, each for its environment. Mark the secret ones as **Secret**: Vercel never shows them again.

<table>
<thead>
  <tr>
    <th>
      Variable
    </th>
    
    <th>
      Where to find it
    </th>
    
    <th>
      Preview
    </th>
    
    <th>
      Production
    </th>
    
    <th>
      Secret
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        CONVEX_DEPLOY_KEY
      </code>
    </td>
    
    <td>
      Convex: the project's preview deploy key, or the production deployment's deploy key (<a href="https://nuxt-backend.dev/docs/services/convex#keys-and-environment">
        Convex
      </a>
      
      )
    </td>
    
    <td>
      The preview key
    </td>
    
    <td>
      The production key
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        NUXT_PUBLIC_BACKEND_URL
      </code>
    </td>
    
    <td>
      Written by the build command
    </td>
    
    <td>
      Written
    </td>
    
    <td>
      Written
    </td>
    
    <td>
      No
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PROTECTION_PROOF_SECRET
      </code>
    </td>
    
    <td>
      Generate it: <code>
        openssl rand -base64 32
      </code>
      
      . The same value as the deployment's
    </td>
    
    <td>
      Optional
    </td>
    
    <td>
      Production's own (<a href="https://nuxt-backend.dev/docs/services/bot-protection">
        Bot protection
      </a>
      
      )
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        MONITORING_DSN
      </code>
    </td>
    
    <td>
      Sentry: <strong>
        Project Settings
      </strong>
      
      , <strong>
        Client Keys (DSN)
      </strong>
      
       (<a href="https://nuxt-backend.dev/docs/services/sentry">
        Sentry
      </a>
      
      )
    </td>
    
    <td>
      Optional
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      No
    </td>
  </tr>
</tbody>
</table>

Leave **Enable access to System Environment Variables** on: the package reads `VERCEL` and `VERCEL_ENV` to know it runs on Vercel.

## Link it

<steps level="3">

### Link the folder to the project

```bash
npx vercel link
```

### Write the app's env into the project

```bash
npx nuxt-backend deploy
```

`deploy` writes the env the Nuxt app needs into the project's production environment through your own Vercel login, and stores no token. Without it, set each variable above by hand, or with `vercel env add <name> production`.

### Push a branch

A push to a branch builds a preview with a backend of its own; a push to the production branch deploys both halves.

</steps>

## Check it

```bash
npx nuxt-backend doctor --only hosting
```

Under `--prod`, `doctor` probes the live site at production's `SITE_URL`:

<table>
<thead>
  <tr>
    <th>
      Finding
    </th>
    
    <th>
      What it checks
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#site-https">
        <code>
          site-https
        </code>
      </a>
    </td>
    
    <td>
      The site answers over HTTPS, with HSTS
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#site-csp">
        <code>
          site-csp
        </code>
      </a>
    </td>
    
    <td>
      The security headers carry a content security policy
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#site-backend-url">
        <code>
          site-backend-url
        </code>
      </a>
    </td>
    
    <td>
      The served app talks to the production deployment
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#agent-docs">
        <code>
          agent-docs
        </code>
      </a>
    </td>
    
    <td>
      The site serves its docs for agents, where the app declares them
    </td>
  </tr>
</tbody>
</table>

## Go to production

<steps level="3">

### Move to pro before you charge anyone

Hobby's terms exclude commercial use.

### Add the domain

**Settings**, **Domains**, then add `app.example.com` and the DNS records Vercel shows. Set the same origin as `SITE_URL` on the Convex deployment ([Self-host and add domains](https://nuxt-backend.dev/docs/ship/deploy/self-hosting)).

### Deploy and check

```bash
npx nuxt-backend doctor --prod
```

</steps>

[Deploy to Vercel](https://nuxt-backend.dev/docs/ship/deploy/vercel#check-the-dashboard) lists the dashboard settings to check once per project: Analytics, the Firewall rules, OIDC and the AI Gateway budget.

## Costs and limits

Checked on 2026-10-25 against [Vercel's plans](https://vercel.com/docs/plans/pro-plan):

<table>
<thead>
  <tr>
    <th>
      
    </th>
    
    <th>
      Hobby
    </th>
    
    <th>
      Pro
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Price
    </td>
    
    <td>
      $0, personal and non-commercial only
    </td>
    
    <td>
      $20 a month, with one deploying seat and $20 of usage credit
    </td>
  </tr>
  
  <tr>
    <td>
      Extra seats
    </td>
    
    <td>
      None
    </td>
    
    <td>
      $20 a month per member; viewers free
    </td>
  </tr>
  
  <tr>
    <td>
      Function regions
    </td>
    
    <td>
      One
    </td>
    
    <td>
      Several
    </td>
  </tr>
  
  <tr>
    <td>
      Firewall rate-limit rules
    </td>
    
    <td>
      1 per project, 1M allowed requests included
    </td>
    
    <td>
      40 per project, $0.50 per 1M allowed requests in <code>
        iad1
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      BotID
    </td>
    
    <td>
      Basic check
    </td>
    
    <td>
      Basic check, plus Deep Analysis at $1 per 1,000 checks
    </td>
  </tr>
  
  <tr>
    <td>
      Password-protected previews
    </td>
    
    <td>
      No
    </td>
    
    <td>
      $20 a month per project
    </td>
  </tr>
</tbody>
</table>

Pro warns you once spend reaches $200 by default. Set a spend limit in the team's billing settings before launch.

## Data and compliance

- **What it holds:** request logs, the env you set, build output, and Web Analytics counts, which use no cookies.
- **Region:** functions run where you pick; logs and the account live in the US. Vercel may transfer data worldwide under its DPA.
- **Role:** Vercel processes data on your behalf. Its [DPA](https://vercel.com/legal/dpa) is part of the agreement you accept at sign-up, and its subprocessors are on its [trust center](https://security.vercel.com). It holds SOC 2 Type 2 and ISO 27001, and is certified under the EU-US Data Privacy Framework ([Compliance](https://vercel.com/docs/security/compliance)).

Name Vercel in your privacy policy as your host ([Privacy, GDPR and cookies](https://nuxt-backend.dev/docs/ship/compliance/privacy)). This is not legal advice.

## Related

- [Deploy to Vercel](https://nuxt-backend.dev/docs/ship/deploy/vercel): what an app gets on Vercel, part by part.
- [Deploy to production](https://nuxt-backend.dev/docs/ship/deploy): the first deploy on any host.
- [Set up preview environments](https://nuxt-backend.dev/docs/ship/deploy/previews): a backend per branch.
- [Bot protection](https://nuxt-backend.dev/docs/services/bot-protection): BotID's setup.
- [Service map](https://nuxt-backend.dev/docs/services): every service, and the order to set them up in.


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
