Skip to content

Deployment

Complete guide for deploying your ShipFast app to production.

Pre-Deployment Checklist

  • [ ] All environment variables configured
  • [ ] Database connected and accessible
  • [ ] Stripe production keys in place (if using payments)
  • [ ] NEXTAUTH_URL set to your production domain
  • [ ] NEXTAUTH_SECRET is 15+ characters and unique
  • [ ] Google OAuth redirect URIs include production domain

Procedure (NextAuth + MongoDB)

  1. Commit your code and push to a private GitHub repository
  2. Create a new project on Vercel (or any Next.js-compatible host) linked to the repo
  3. Add all environment variables in the hosting provider's dashboard — .env.local is not committed

Environment Variables for Production

VariableValue
NEXTAUTH_URLhttps://yourdomain.com
NEXTAUTH_SECRETRandom 15+ char string
MONGODB_URIMongoDB Atlas connection string
GOOGLE_IDGoogle OAuth Client ID
GOOGLE_SECRETGoogle OAuth Client Secret
RESEND_API_KEYResend API key
STRIPE_PUBLIC_KEYStripe publishable key (live)
STRIPE_SECRET_KEYStripe secret key (live)
STRIPE_WEBHOOK_SECRETStripe webhook signing secret (live)

Stripe Production Setup

After deploying:

  1. Turn OFF Test Mode in your Stripe Dashboard
  2. Copy live public and private keys to production environment variables
  3. In Developers > Webhooks, click Add Endpoint
  4. Set endpoint URL: https://yourdomain.com/api/webhook/stripe
  5. Select the checkout.session.completed event
  6. Copy the signing secret to STRIPE_WEBHOOK_SECRET in production

NextAuth URL

NEXTAUTH_URL must exactly match your production domain for auth to work:

NEXTAUTH_URL=https://yourdomain.com

If using a www subdomain, include it.

Supported Hosts

ShipFast deploys anywhere Next.js is supported:

  • Vercel (recommended)
  • Netlify
  • Render
  • Railway
  • Any VPS with Node 18.17+

See Also