---
title: "Ship to production"
description: "Test the backend, deploy both halves on any host with Vercel first, switch every provider from its test mode to production, gate the launch on doctor --prod, then run it: errors and uptime, flags and kill switches, runbooks, backups and releases."
canonical_url: "https://nuxt-backend.dev/docs/ship"
---
# Ship to production

> Test the backend, deploy both halves on any host with Vercel first, switch every provider from its test mode to production, gate the launch on doctor --prod, then run it: errors and uptime, flags and kill switches, runbooks, backups and releases.

Version: nuxt-backend 0.6.x · Tab: Ship · Kind: landing · 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.

Everything you build on the other tabs runs first on your dev deployment. This tab takes your app to production and keeps it healthy there. Going live takes six steps, listed in [How it fits together](#how-it-fits-together): test, set production's env, deploy, switch the providers, pass `doctor --prod`, and run it. Start with [Deploy to production](https://nuxt-backend.dev/docs/ship/deploy).

## What it gives your app

<table>
<thead>
  <tr>
    <th>
      Part
    </th>
    
    <th>
      What you get
    </th>
    
    <th>
      Powered by
    </th>
    
    <th>
      Before production
    </th>
    
    <th>
      Start at
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Tests
    </td>
    
    <td>
      Your functions in <code>
        convex-test
      </code>
      
       with every component mounted and callers signed in; pages over a mock backend; Convex's lint rules
    </td>
    
    <td>
      Vitest, <code>
        convex-test
      </code>
      
      , <code>
        @nuxt/test-utils
      </code>
    </td>
    
    <td>
      The same tests, with no deployment and no provider
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/develop/testing">
        Testing
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Hosting
    </td>
    
    <td>
      One build command that ships the backend, then the app; the env split between them; previews, demos and custom domains; one-command production and a deploy template
    </td>
    
    <td>
      Convex deployments, and Vercel or any host Nitro deploys to
    </td>
    
    <td>
      A dev deployment and the Nuxt dev server
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/deploy">
        Deploy to production
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      The launch gate
    </td>
    
    <td>
      <code>
        doctor --prod
      </code>
      
       fails on what a live product cannot run without, reads production's values and probes the live site
    </td>
    
    <td>
      The package's CLI
    </td>
    
    <td>
      <code>
        doctor
      </code>
      
       against the dev deployment
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/checklist">
        Prepare for launch
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Protection
    </td>
    
    <td>
      A Content Security Policy that knows the deployment, webhooks verified once that fail closed, rate limits on every route that sends mail or acts on others, bot checks
    </td>
    
    <td>
      <code>
        nuxt-security
      </code>
      
      , the Convex rate limiter, Vercel BotID or Cloudflare Turnstile
    </td>
    
    <td>
      Bot checks answer human; everything else as in production
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/security">
        Security model
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Compliance
    </td>
    
    <td>
      Which laws reach a client app and who answers for what; generated legal pages and a data map, a minimum age, a consent manager, the EU withdrawal button and AI-generated labels
    </td>
    
    <td>
      Your counsel, with the providers' DPAs and Polar as merchant of record
    </td>
    
    <td>
      The same pages, filled from your dev deployment's capabilities
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/compliance">
        Compliance
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Monitoring
    </td>
    
    <td>
      Error reports from the browser, the Nuxt server and the backend, cron check-ins, and a health endpoint
    </td>
    
    <td>
      Sentry
    </td>
    
    <td>
      A local error log in DevTools
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring">
        Monitor errors and uptime
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Flags
    </td>
    
    <td>
      Feature flags read inside your functions, targeted by account, workspace, plan or percentage; kill switches; a maintenance notice
    </td>
    
    <td>
      The backend component, on Convex
    </td>
    
    <td>
      The same code, on the dev deployment
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/operate/flags">
        Flags and kill switches
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Operations
    </td>
    
    <td>
      Runbooks, backups, the webhook delivery log with replay, secret rotation, and the provider settings <code>
        doctor --fix
      </code>
      
       applies
    </td>
    
    <td>
      The package, Convex, Polar and Resend
    </td>
    
    <td>
      The same tools, on the providers' test modes
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/operate">
        Monitor production
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Releases
    </td>
    
    <td>
      Provenance, an attested tarball and an SBOM for every release, a stability promise, and an upgrade command
    </td>
    
    <td>
      GitHub, npm and Sigstore
    </td>
    
    <td>
      
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/releases">
        What's new in 0.2
      </a>
    </td>
  </tr>
</tbody>
</table>

Each part's state is detected, never configured: `npx nuxt-backend status --prod` shows each capability of production with its state ([Capabilities](https://nuxt-backend.dev/docs/start/concepts/capabilities)). The [demo](https://nuxt-backend.dev/docs/start/playground) runs as a sandbox deployment: its [strips page](https://nuxt-backend.dev/playground/strips) reads a flag as an experiment, and a spend limit turns on the `pause_ai` kill switch for the rest of a costly day.

## How it fits together

A production app has two halves. The **Convex deployment** runs your functions and the `backend` component, with an env of its own. The **Nuxt app** runs on your host, pointed at that deployment. One variable on the deployment, `BACKEND_ENVIRONMENT`, decides whether the providers run in their test modes or live ([Environments](https://nuxt-backend.dev/docs/start/concepts/environments)). Going live takes the same steps every time:

1. **Test and lint the backend.** `defineBackendTestApp` and `asUser` run your functions as the deployment would ([Testing](https://nuxt-backend.dev/docs/develop/testing)), and `backendEslint` applies Convex's rules ([Linting](https://nuxt-backend.dev/docs/develop/testing/linting)).
2. **Set production's env.** Production's own secrets and provider keys on the deployment, then `npx nuxt-backend env push --prod` for the rest. The host gets the backend URL and a production deploy key ([The env split](https://nuxt-backend.dev/docs/ship/deploy#the-env-split)).
3. **Deploy both halves.** `npx convex deploy --cmd 'npm run build' --cmd-url-env-var-name NUXT_PUBLIC_BACKEND_URL` pushes the backend, then builds the app against it ([Deploy to production](https://nuxt-backend.dev/docs/ship/deploy)).
4. **Switch the providers to production.** `billing sync --env production`, `email sync --prod` with PREFS, a verified sending domain, both webhooks registered, production's bot-check keys, a model route and the error-reporting DSN ([Service map](https://nuxt-backend.dev/docs/services)).
5. **Gate the launch.** `npx nuxt-backend doctor --prod`, then the list of what it can't see, and the first administrator ([Prepare for launch](https://nuxt-backend.dev/docs/ship/checklist)).
6. **Run it.** Errors and uptime, flags and kill switches, the delivery log and the activity trail, with runbooks for when something breaks ([Monitor production](https://nuxt-backend.dev/docs/ship/operate)).

[One-command production](https://nuxt-backend.dev/docs/ship/deploy/one-command) runs steps 2 to 5 as one command, and writes the app's env into a Vercel project for you.

The webhooks here are the ones your app receives. API keys and outgoing webhooks, for apps that other systems call, wait for a later release ([Roadmap](https://nuxt-backend.dev/docs/start/roadmap)).

## What you get

What the package ships for this part of the app, generated from the code: each name links to its
reference entry.

- Pages: [`/legal/accessibility`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/legal/privacy`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/legal/subprocessors`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/legal/terms`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app)
- Components: [`<LegalProcessors>`](https://nuxt-backend.dev/docs/reference/components/shell#legalprocessors), [`<LegalStorage>`](https://nuxt-backend.dev/docs/reference/components/shell#legalstorage), [`<LegalDetail>`](https://nuxt-backend.dev/docs/reference/components/shell#legaldetail), [`<LegalVersion>`](https://nuxt-backend.dev/docs/reference/components/shell#legalversion), [`<LegalContactPoints>`](https://nuxt-backend.dev/docs/reference/components/shell#legalcontactpoints), [`<LegalModeration>`](https://nuxt-backend.dev/docs/reference/components/shell#legalmoderation)
- Composables: [`useFlag`](https://nuxt-backend.dev/docs/reference/api/use-flags), [`useFlagAdmin`](https://nuxt-backend.dev/docs/reference/api/use-flags), [`useReportForm`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useReportAppeal`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useExperiment`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance)
- Setup helpers: [`setupRateLimiter`](https://nuxt-backend.dev/docs/reference/api/rate-limit), [`setupWebhooks`](https://nuxt-backend.dev/docs/reference/api/admin), [`defineFlags`](https://nuxt-backend.dev/docs/reference/api/flags), [`setupFlags`](https://nuxt-backend.dev/docs/reference/api/flags)
- Findings: [`backend-site-url`](https://nuxt-backend.dev/docs/reference/cli/diagnostics#backend-site-url), [`deployment-env`](https://nuxt-backend.dev/docs/reference/cli/diagnostics#deployment-env), [`deployment-backend-environment`](https://nuxt-backend.dev/docs/reference/cli/diagnostics#deployment-backend-environment), [`deployment-removed-env`](https://nuxt-backend.dev/docs/reference/cli/diagnostics#deployment-removed-env), [`env-defaults`](https://nuxt-backend.dev/docs/reference/cli/diagnostics#env-defaults)

## Deploy

Set up each service first: the [Service map](https://nuxt-backend.dev/docs/services) has the order, and a page per provider from sign-up to a passing `doctor`. Tests and linting run before every deploy ([Test your app](https://nuxt-backend.dev/docs/develop/testing)).

<card-group>
<card icon="i-lucide-rocket" title="Deploy to production" to="https://nuxt-backend.dev/docs/ship/deploy">

One build command on any host, the env split, and the first deploy step by step.

</card>

<card icon="i-simple-icons-vercel" title="Deploy to Vercel" to="https://nuxt-backend.dev/docs/ship/deploy/vercel">

BotID, Sentry's integration and the AI Gateway, then this site's setup: analytics without cookies and edge rate limits.

</card>

<card icon="i-lucide-wand-sparkles" title="One-command production" to="https://nuxt-backend.dev/docs/ship/deploy/one-command">

One command sets up production and writes the app's Vercel env.

</card>

<card icon="i-lucide-layout-template" title="Deploy template" to="https://nuxt-backend.dev/docs/ship/deploy/template">

A new app on Vercel from its first commit, with Convex through the Marketplace.

</card>

<card icon="i-lucide-git-branch" title="Previews" to="https://nuxt-backend.dev/docs/ship/deploy/previews">

A backend per branch, with its exact origin and every provider in its test mode.

</card>

<card icon="i-lucide-server" title="Self-hosting and domains" to="https://nuxt-backend.dev/docs/ship/deploy/self-hosting">

A self-hosted backend, and custom domains for the deployment.

</card>

<card icon="i-lucide-presentation" title="Demo and staging" to="https://nuxt-backend.dev/docs/ship/deploy/staging">

Production mode on the providers' test modes, with `BACKEND_ENVIRONMENT=sandbox`.

</card>
</card-group>

## Launch safely

<card-group>
<card icon="i-lucide-clipboard-check" title="Production checklist" to="https://nuxt-backend.dev/docs/ship/checklist">

What `doctor --prod` fails on, what it probes on the live site, and the list for what no command can see.

</card>

<card icon="i-lucide-shield-check" title="Security model" to="https://nuxt-backend.dev/docs/ship/security">

The policy, the webhook edge, sign-in limits, step-up, administrator visits and what stays internal.

</card>

<card icon="i-lucide-gauge" title="Rate limits" to="https://nuxt-backend.dev/docs/ship/security/rate-limits">

Every limit on a route that sends mail or acts on others, and how to tune it.

</card>

<card icon="i-lucide-webhook" title="Webhooks" to="https://nuxt-backend.dev/docs/ship/security/webhooks">

The routes providers call, verified once and failing closed, with the delivery log.

</card>

<card icon="i-lucide-rotate-ccw-key" title="Rotate secrets" to="https://nuxt-backend.dev/docs/ship/security/secrets">

Every secret replaced without signing anyone out or dropping a delivery.

</card>

<card icon="i-lucide-scan-search" title="Security surface" to="https://nuxt-backend.dev/docs/ship/security/surface">

Everything an outsider can reach, reviewed as one checkpoint.

</card>

<card icon="i-lucide-package-check" title="Supply chain" to="https://nuxt-backend.dev/docs/ship/security/supply-chain">

Lockfiles, an install cooldown, scripts allowed by name and reviewed agent config.

</card>

<card icon="i-lucide-scale" title="Compliance" to="https://nuxt-backend.dev/docs/ship/compliance">

Which laws reach a client app: privacy, accessibility, AI labels, moderation, email and subscriptions.

</card>
</card-group>

## Operate

<card-group>
<card icon="i-lucide-radar" title="Monitor production" to="https://nuxt-backend.dev/docs/ship/operate">

Where to look once the app is live, and what each place tells you.

</card>

<card icon="i-lucide-activity" title="Monitor errors and uptime" to="https://nuxt-backend.dev/docs/ship/operate/monitoring">

Error reports from every side, cron check-ins and the health endpoint.

</card>

<card icon="i-lucide-toggle-right" title="Flags and kill switches" to="https://nuxt-backend.dev/docs/ship/operate/flags">

Roll features out by account, workspace, plan or percentage, and pause services in one switch.

</card>

<card icon="i-lucide-siren" title="Respond to incidents" to="https://nuxt-backend.dev/docs/ship/operate/runbooks">

What to do first when something breaks.

</card>

<card icon="i-lucide-refresh-cw" title="Replay deliveries" to="https://nuxt-backend.dev/docs/ship/operate/replay">

Send a webhook delivery an endpoint missed again.

</card>

<card icon="i-lucide-life-buoy" title="Troubleshooting" to="https://nuxt-backend.dev/docs/ship/operate/troubleshooting">

Symptoms, log codes and their fixes.

</card>

<card icon="i-lucide-database-backup" title="Backup and restore" to="https://nuxt-backend.dev/docs/ship/operate/backup">

Snapshots of the deployment, a restore with the providers caught up, and a rollback.

</card>

<card icon="i-lucide-message-circle-question" title="Get help" to="https://nuxt-backend.dev/docs/ship/operate/help">

Where to ask, what to include, and how a security report differs.

</card>
</card-group>

## Releases

<card-group>
<card icon="i-lucide-newspaper" title="What's new in 0.2" to="https://nuxt-backend.dev/docs/ship/releases">

The first release, capability by capability, and what is still experimental.

</card>

<card icon="i-lucide-history" title="Changelog" to="https://nuxt-backend.dev/docs/ship/releases/changelog">

Every release, generated from the commits.

</card>

<card icon="i-lucide-shield-check" title="Stability" to="https://nuxt-backend.dev/docs/ship/releases/stability">

What a minor or a patch release may change, and the experimental tier.

</card>

<card icon="i-lucide-badge-check" title="Verify a release" to="https://nuxt-backend.dev/docs/ship/releases/verify">

npm's provenance, the attested tarball and its SBOM.

</card>

<card icon="i-lucide-arrow-up-circle" title="Upgrade to a new version" to="https://nuxt-backend.dev/docs/ship/releases/upgrade">

Install a release, repair the scaffold and migrate the package's data in one command.

</card>
</card-group>


## Sitemap

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