Notebook Studio
Custom Server Environment

Convex Database

Point the app at your Convex deployment

Even on a custom server, Notebook Studio uses Convex Cloud for its database - you do not self-host the database.

Deploy Convex Functions

From the server (or your local machine with access to the repo), run:

npx convex deploy

This pushes the schema and functions to your production Convex deployment.

Set the URLs

Make sure NEXT_PUBLIC_CONVEX_URL and NEXT_PUBLIC_CONVEX_SITE_URL in your server's .env match your Convex deployment URLs.

Set Convex Env Variables

In the Convex dashboard, add the runtime secrets your functions need: BETTER_AUTH_SECRET, RESEND_API_KEY, RESEND_SENDER_EMAIL, and GOOGLE_GENERATIVE_AI_API_KEY.

Payment webhooks and the subscription-cancel action also run inside Convex, so add the gateway secrets there too: STRIPE_SECRET_KEY + STRIPE_WEBHOOK_SECRET, NEXT_PUBLIC_PAYPAL_CLIENT_ID + PAYPAL_CLIENT_SECRET + PAYPAL_WEBHOOK_ID, NEXT_PUBLIC_RAZORPAY_KEY_ID + RAZORPAY_KEY_SECRET + RAZORPAY_WEBHOOK_SECRET, FLUTTERWAVE_SECRET_KEY + FLUTTERWAVE_SECRET_HASH, NEXT_PUBLIC_DODO_ENV + DODO_PAYMENTS_API_KEY + DODO_PAYMENTS_WEBHOOK_KEY, and NEXT_PUBLIC_PADDLE_ENV + PADDLE_API_KEY + PADDLE_WEBHOOK_SECRET.

On this page