Deployment Guide


Launchpad Next is designed to deploy anywhere modern Next.js apps run. Whether you prefer serverless platforms or container-based infrastructure, the setup remains simple and consistent.


Deployment Options

All deployment configurations live here:

deployment/
  vercel.json
  netlify.toml
  Dockerfile
  railway.json

Vercel

Vercel is the recommended platform for Next.js — zero configuration required.

Option A: Deploy via CLI

Step 1: Install the Vercel CLI

npm install -g vercel

Step 2: Login to Vercel

vercel login

Step 3: Deploy from your project root

vercel

For production:

vercel --prod

Option B: Deploy via GitHub

Step 1: Push your project to a GitHub repository.

Step 2: Go to vercel.com and click Add New Project.

Step 3: Import your GitHub repository.

Step 4: Vercel auto-detects Next.js — click Deploy.

Every push to main will trigger an automatic redeployment.

Environment Variables

Add your env vars in the Vercel dashboard under Settings → Environment Variables, or via CLI:

vercel env add NEXT_PUBLIC_APP_URL

Netlify

Step 1: Install the Netlify CLI

npm install -g netlify-cli

Step 2: Login to Netlify

netlify login

Step 3: Initialize your site

netlify init

Step 4: Add a netlify.toml config

Create netlify.toml in your project root:

[build]
  command = "npm run build"
  publish = ".next"
 
[[plugins]]
  package = "@netlify/plugin-nextjs"

Step 5: Deploy

netlify deploy --prod

Environment Variables

netlify env:set NEXT_PUBLIC_APP_URL https://yourdomain.com

Docker

Use Docker when you need full control over your runtime environment.

Step 1: Add a Dockerfile

Create a Dockerfile in your project root:

FROM node:20-alpine AS base
 
FROM base AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
 
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
 
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
 
EXPOSE 3000
CMD ["node", "server.js"]

Step 2: Enable standalone output in next.config.ts

const config: NextConfig = {
  output: "standalone",
}
 
export default config

Step 3: Build the Docker image

docker build -t launchpad-next .

Step 4: Run the container

docker run -p 3000:3000 launchpad-next

Your app is now running at http://localhost:3000.

Step 5: Pass environment variables

docker run -p 3000:3000 \
  -e NEXT_PUBLIC_APP_URL=https://yourdomain.com \
  launchpad-next

Railway

Step 1: Install the Railway CLI

npm install -g @railway/cli

Step 2: Login to Railway

railway login

Step 3: Initialize your project

railway init

Step 4: Add a railway.json config

{
  "$schema": "https://railway.app/railway.schema.json",
  "build": {
    "builder": "DOCKERFILE",
    "dockerfilePath": "Dockerfile"
  },
  "deploy": {
    "restartPolicyType": "ON_FAILURE",
    "restartPolicyMaxRetries": 3
  }
}

Step 5: Deploy

railway up

Environment Variables

railway variables set NEXT_PUBLIC_APP_URL=https://yourdomain.com

Platform Comparison

| Feature | Vercel | Netlify | Docker | Railway |
| --- | --- | --- | --- | --- |
| Setup time | ~2 min | ~5 min | ~10 min | ~5 min |
| Next.js native | ✅ | ✅ | Manual | Via Docker |
| Auto deploys | ✅ | ✅ | ❌ | ✅ |
| Custom runtime | ❌ | ❌ | ✅ | ✅ |
| Free tier | ✅ | ✅ | Self-hosted | ✅ |

You're Live 🚀

Once deployed, make sure to:

  • Set all environment variables on your platform
  • Point your custom domain in the platform dashboard
  • Enable HTTPS (all platforms handle this automatically)
  • Set NEXT_PUBLIC_APP_URL to your production domain