Home/ Docs/ Deployment

Deploying LaunchSaaS to Production

Vercel deployment, environment variable checklist, Stripe webhook configuration, health monitoring, and CI/CD with GitHub Actions.

Updated Apr 2026
9 min read

Vercel Deployment (Recommended)

Vercel is the recommended deployment platform for LaunchSaaS. The project is pre-configured for Vercel — no additional configuration files are needed.

Deploy from GitHub

  1. Push the repository to your personal GitHub account.
  2. Go to vercel.com/new and click "Import Project."
  3. Select the repository. Vercel detects Next.js automatically.
  4. Add your environment variables (see checklist below).
  5. Click Deploy. The first build takes 2–3 minutes.

After the initial setup, every push to the main branch triggers an automatic deployment. Pull request branches get preview deployments at temporary URLs.

Deploy via CLI

npm install -g vercel
vercel --prod

The CLI will prompt you for environment variables and project settings on the first run.

Custom domain

In your Vercel project, go to Settings → Domains → Add. Follow the DNS instructions. SSL is provisioned automatically within a few minutes. After adding the domain, update NEXT_PUBLIC_APP_URL to the new domain and trigger a redeployment.

Environment Variables Checklist

Set all of these in your Vercel project settings (Settings → Environment Variables). Use the "Production" environment for live variables and "Preview" for staging.

VariableRequiredNotes
NEXT_PUBLIC_SUPABASE_URLYesSupabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEYYesSupabase public (anon) key
SUPABASE_SERVICE_KEYYesSupabase service role key — server only, never expose client-side
STRIPE_SECRET_KEYYesUse sk_live_... in production
STRIPE_WEBHOOK_SECRETYesFrom Stripe webhook endpoint — different from local CLI secret
NEXT_PUBLIC_APP_URLYesYour production domain, e.g. https://myapp.com
RESEND_API_KEYRecommendedRequired for transactional emails

Important

The STRIPE_WEBHOOK_SECRET used in production is different from the one generated by the Stripe CLI for local development. After creating a production webhook endpoint in the Stripe Dashboard, copy the new signing secret and set it as the production environment variable.

Stripe Webhooks in Production

Your local Stripe CLI webhook listener only forwards events to localhost. For production, you must register a webhook endpoint in the Stripe Dashboard:

  1. Go to Stripe Dashboard → Developers → Webhooks → Add endpoint.
  2. Set the endpoint URL to https://yourdomain.com/api/webhooks.
  3. Select these events: checkout.session.completed, customer.subscription.created, customer.subscription.updated, customer.subscription.deleted, invoice.payment_succeeded, invoice.payment_failed.
  4. After saving, Stripe shows the signing secret. Copy it.
  5. In Vercel, update STRIPE_WEBHOOK_SECRET with this new value and redeploy.

Test that the webhook is working by using the Stripe Dashboard's "Send test webhook" button to send a checkout.session.completed event. Check your Vercel function logs to confirm it was received and processed.

Health Check Endpoints

LaunchSaaS includes a health check endpoint at /api/health. It returns a JSON object:

{
  "status": "ok",
  "timestamp": "2026-04-01T12:00:00Z",
  "database": "connected"
}

A 200 response indicates the app and Supabase connection are operational. A 503 indicates a connectivity problem.

Use this endpoint with uptime monitoring services (Better Uptime, Pingdom, UptimeRobot) to receive alerts if the application goes down. Configure the monitor to check every 1–5 minutes.

CI/CD with GitHub Actions

LaunchSaaS includes a GitHub Actions workflow at .github/workflows/ci.yml that runs on every push and pull request:

name: CI

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npm ci
      - run: npm run type-check
      - run: npm test
      - run: npm run build

The CI pipeline runs TypeScript type checking, all 2,335 tests, and a production build check. Pull requests cannot be merged if any step fails.

Vercel automatically deploys the main branch after CI passes. You can configure this in Vercel's Git integration settings — set "Ignored Build Step" to skip builds if CI has already verified the code.

Frequently Asked Questions

How do I deploy LaunchSaaS to Vercel for the first time?

Push the repository to GitHub, then go to vercel.com/new and import the repository. Add your environment variables in the Vercel project settings, then click Deploy. Vercel auto-detects Next.js. The first deployment typically takes 2–3 minutes.

What environment variables does LaunchSaaS need on Vercel in production?

Required: NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, and NEXT_PUBLIC_APP_URL. Recommended: RESEND_API_KEY for transactional email. Use live Stripe keys (sk_live_...) in production.

Does LaunchSaaS work on Vercel's free Hobby plan?

Yes, for development and early production use. Vercel's Hobby plan includes 100GB bandwidth, unlimited deployments, and serverless functions with 10-second timeouts — sufficient for all LaunchSaaS API routes. You would upgrade to Vercel Pro primarily for longer function timeouts or team collaboration features.

How do I set up a custom domain for my LaunchSaaS app on Vercel?

In the Vercel dashboard, go to your project Settings → Domains → Add. Enter your domain and follow the DNS instructions. SSL is provisioned automatically. After adding the domain, update NEXT_PUBLIC_APP_URL in your environment variables and redeploy.

How do I configure Stripe webhooks to work with my production Vercel deployment?

In Stripe Dashboard → Developers → Webhooks → Add endpoint. Set the URL to https://yourdomain.com/api/webhooks, select the relevant events, copy the signing secret, and set it as STRIPE_WEBHOOK_SECRET in Vercel. Redeploy after updating the variable.

Does LaunchSaaS have a health check endpoint I can use for monitoring?

Yes. LaunchSaaS includes a health check endpoint at /api/health that returns JSON with service status and database connectivity. A 200 response means the app and database are operational. Use this with uptime monitoring services like Better Uptime or UptimeRobot.

Ready to ship

Skip the boilerplate. Ship your product.

14 production packages. 2,335 tests. Battle-tested by 13,000+ users. One-time payment. Lifetime access.

Get Instant Access — $99