Before you deploy: run a production build locally
Before pushing to any platform, verify that your app builds without errors:Deploy to Vercel via CLI
1
Install the Vercel CLI
2
Authenticate with your Vercel account
3
Run the deploy command from your project root
- 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)
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 → Settings → Environment Variables, then add each of the following:
- Auth variables
- Database variables
- OAuth provider variables
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
- Go to vercel.com/new
- Click Import Git Repository
- Select your GitHub account and find your repository
- Click Import
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.
Alternative deployment platforms
Vercel is the recommended platform for Slik Dev apps, but Next.js runs on other platforms too:- Netlify
- Railway
- Self-hosted (Docker)
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 configuration → Environment 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.