Skip to main content
Slik Dev generates a Next.js App Router project, and Vercel — Next.js’s own hosting platform — is the best place to deploy it. You get zero-config builds, automatic preview deployments on every pull request, edge caching, and seamless environment variable management. This guide covers deploying via the Vercel CLI, via GitHub integration, and what to do after your first successful deploy.

Before you deploy: run a production build locally

Before pushing to any platform, verify that your app builds without errors:
Next.js will type-check your TypeScript, lint your code, and generate all static and server-rendered pages. Fix any errors that appear — a passing local build is the fastest way to avoid failed deploys.
After npm run build succeeds, run npm run start to test the production server locally at http://localhost:3000. This catches runtime issues that the development server sometimes masks.

Deploy to Vercel via CLI

1

Install the Vercel CLI

2

Authenticate with your Vercel account

Follow the prompt to authenticate via browser or email.
3

Run the deploy command from your project root

The CLI will ask a few questions on first run:
  • Set up and deploy?Y
  • Which scope? → Select your personal account or team
  • Link to existing project?N (creates a new project)
  • Project name → Accept the default or enter your own
  • In which directory is your code located?. (current directory)
Vercel auto-detects Next.js and configures the build settings correctly.
The first vercel command deploys to a preview URL, not production. To deploy to your production domain, run vercel --prod.
4

Set environment variables

Your Slik Dev app requires several environment variables that must be set in the Vercel dashboard before the app will function correctly in production.Go to your project in the Vercel dashboard → SettingsEnvironment Variables, then add each of the following:
NEXTAUTH_URL must match your actual production domain exactly — including the https:// prefix and without a trailing slash. If this value is wrong, OAuth callbacks will fail and users will not be able to sign in.
5

Redeploy with environment variables active

After setting all environment variables in the Vercel dashboard, trigger a new deployment to pick them up:
Or push a new commit to your connected GitHub branch — Vercel will rebuild automatically.

Deploy via GitHub integration

If you prefer a push-to-deploy workflow, connect your repository to Vercel for automatic deployments on every commit.
1

Push your project to GitHub

2

Import the repository in Vercel

  1. Go to vercel.com/new
  2. Click Import Git Repository
  3. Select your GitHub account and find your repository
  4. Click Import
Vercel detects Next.js automatically and pre-fills the correct build command (next build) and output directory.
3

Configure environment variables before the first build

On the import screen, expand the Environment Variables section and add all required variables (listed in the CLI deploy section above) before clicking Deploy. This ensures the first build succeeds without missing configuration.
4

Deploy

Click Deploy. Vercel builds and deploys your app. From this point forward, every push to main triggers a production deployment, and every pull request gets its own preview URL.

Post-deploy checklist

After your first successful production deployment, work through these items:

Update NEXTAUTH_URL

If your production domain differs from the preview URL (e.g., you added a custom domain), update NEXTAUTH_URL in Vercel environment variables to match. Then redeploy.

Update OAuth callback URLs

Add your final production domain to the allowed callback URLs in each OAuth provider’s settings. OAuth will not work until this matches.

Run database migrations

If you make schema changes after the initial deploy, run npx prisma db push (or npx prisma migrate deploy for production migrations) against your production database.

Add a custom domain

In Vercel dashboard → your project → Domains, add your custom domain and follow the DNS instructions. Vercel provisions TLS automatically.
Never set NEXTAUTH_URL to http://localhost:3000 in production environment variables. This is a common mistake when copy-pasting from a local .env file. It will silently break all authentication flows in production.

Alternative deployment platforms

Vercel is the recommended platform for Slik Dev apps, but Next.js runs on other platforms too:
Netlify supports Next.js via the @netlify/plugin-nextjs adapter. Add it to your project, then deploy via the Netlify CLI or GitHub integration. Environment variables are set in Site configurationEnvironment variables.
Some Next.js App Router features (like edge middleware and incremental static regeneration) have varying levels of support on Netlify. Check Netlify’s Next.js compatibility docs before committing to this platform for complex apps.