StudyStudio
Production Environment

Convex Database

Deploy your Convex schema and functions to production

Your Convex development and production deployments can be linked or separate. For a simple launch, most teams use a single production deployment.

Deploy Functions

From the project root (or your CI pipeline), run:

npx convex deploy

This pushes the schema and all functions in convex/ to your production deployment and applies any schema changes.

Confirm the URL

Verify the NEXT_PUBLIC_CONVEX_URL in Vercel points to the same deployment the app reads from. It is printed when you run npx convex dev and visible in the Convex dashboard.

Set Convex Env Variables

In the Convex dashboard (Settings → Environment Variables), add BETTER_AUTH_SECRET, RESEND_API_KEY, RESEND_SENDER_EMAIL, and GOOGLE_GENERATIVE_AI_API_KEY so your Convex functions can read them at runtime.

Convex dashboard - environment variables

Convex indexes, the schema, and migrations are applied during npx convex deploy. Check the dashboard after deploying to confirm the new schema is live.

On this page