Home/ Docs/ Integrations/ Vercel

Deploying LaunchSaaS on Vercel

Create a Vercel project, configure environment variables, connect your domain, and set up preview deployments.

Updated Apr 2026
7 min read

Create a Vercel Project

LaunchSaaS requires no custom Vercel configuration. Vercel auto-detects Next.js and configures the build correctly.

Option A: Import from GitHub

  1. Go to vercel.com/new.
  2. Click "Import Project" and select your GitHub repository.
  3. Vercel detects the framework as Next.js automatically. Do not change the build settings.
  4. Add environment variables (see next section).
  5. Click Deploy.

Option B: Deploy via CLI

npm install -g vercel
cd your-launchsaas-project
vercel

Follow the prompts. When asked to link to an existing project, select "Create a new project." When asked about the build settings, accept the defaults.

Environment Variables

Add these in your Vercel project under Settings → Environment Variables. Set each variable for the "Production" environment. For staging, add a separate set for "Preview."

# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbG...
SUPABASE_SERVICE_KEY=eyJhbG...  # Never expose client-side

# Stripe
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...

# App
NEXT_PUBLIC_APP_URL=https://yourdomain.com

# Email (recommended)
RESEND_API_KEY=re_...

After adding variables

Environment variable changes in Vercel do not apply to the currently-running deployment. Trigger a redeployment (or push a new commit) after adding or updating variables.

Custom Domain

  1. In Vercel, go to your project Settings → Domains → Add.
  2. Enter your domain (e.g., myapp.com).
  3. Vercel shows DNS records to add at your domain registrar:
    • For apex domains (myapp.com): add an A record pointing to 76.76.21.21
    • For subdomains (app.myapp.com): add a CNAME pointing to cname.vercel-dns.com
  4. SSL is provisioned automatically within 1–5 minutes of DNS propagation.
  5. Update NEXT_PUBLIC_APP_URL to your new domain and redeploy.
  6. Update the redirect URLs in your Supabase project settings (Authentication → URL Configuration) to use the new domain.

Serverless Function Configuration

LaunchSaaS API routes are Next.js Route Handlers. They run as Vercel serverless functions automatically — no additional configuration is needed.

Function regions

By default, Vercel deploys functions to the region closest to the deploying user. For best latency, deploy to the same region as your Supabase database. In Vercel project settings, go to Settings → Functions and set the region to match your Supabase region:

Function timeout

Vercel Hobby plan has a 10-second function timeout. Vercel Pro extends this to 60 seconds. All LaunchSaaS API routes complete well within 10 seconds under normal conditions. The webhook handler for Stripe is the most time-sensitive — it typically completes in under 2 seconds.

Preview Deployments

Every pull request on the connected GitHub repository gets a unique preview URL (e.g., launchsaas-abc123.vercel.app). This is useful for testing features before merging.

For preview deployments to work correctly with authentication, add the preview URL pattern to Supabase's allowed redirect URLs: https://*-your-project.vercel.app. This is set in Supabase Dashboard → Authentication → URL Configuration → Redirect URLs.

To use a separate database for preview deployments, add a second Supabase project's credentials in Vercel's "Preview" environment variables.

Frequently Asked Questions

Does LaunchSaaS need any special Vercel configuration files?

No. LaunchSaaS works with Vercel's default Next.js detection. No vercel.json file is required. The Next.js app structure, API routes, and next.config.js are all pre-configured. Vercel automatically handles serverless function creation for API routes and edge middleware configuration.

Can I use Vercel's Edge Runtime with LaunchSaaS API routes?

Some LaunchSaaS API routes use the Edge Runtime for low-latency operations (middleware, auth checks). Others use Node.js runtime because they require Node.js-only packages. The runtime is specified per-route and is already configured correctly in the repository.

How do I get preview deployments working with a separate staging database?

In Vercel project settings, set environment variables specifically for the Preview environment using a second set of Supabase credentials pointing to a staging project. This gives each pull request preview deployment its own isolated database.

What happens to LaunchSaaS API routes when Vercel's serverless functions cold start?

Cold starts on Vercel are typically 200–500ms for Node.js functions. LaunchSaaS minimizes cold start impact by using the Supabase connection pooler (PgBouncer) rather than direct PostgreSQL connections and keeping API routes lean.

How do I add a custom domain to my LaunchSaaS deployment on Vercel?

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

How much does it cost to run LaunchSaaS on Vercel?

For most early-stage SaaS applications, Vercel's free Hobby plan is sufficient (100GB bandwidth, unlimited deployments). A typical SaaS with a few hundred users uses well under these limits. Vercel Pro ($20/month) adds team collaboration and higher limits.

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