Blog
How to Deploy a Next.js App
Educational guide to deploying a Next.js application: build for production, GitHub-based deploy, HTTPS URLs, environment variables — plus how to ship on Runex.
· Updated · 2 min read
Direct answer
To deploy a Next.js app you need a production build, a process that serves it (or a platform that runs that process), HTTPS, and configuration via environment variables. On Runex, connect the GitHub repository and deploy to *.runex.cloud.
Product landing: Deploy Next.js on Runex.
General checklist (any host)
- Ensure
next buildsucceeds locally - Decide how you run production (
next startor your documented alternative) - Bind HTTP to
0.0.0.0and respectPORTwhen the host provides it - Keep secrets in environment variables — never in Git
- Put a custom domain behind HTTPS when you go public
Deploy Next.js with Runex
- Push the app to GitHub
- Sign up at runex.cloud and install the Runex GitHub App
- Select repository and branch, then deploy
- Open
https://<deployment-slug>.runex.cloud - Optionally attach a custom domain — custom domains docs
More detail: getting started and deploy from GitHub.
Environment variables
Use the dashboard to set server secrets and any NEXT_PUBLIC_* values your app needs. See environment variables.
Common problems
- Build fails on missing dependencies — check lockfiles and Node version
- App starts but URL fails — port configuration
- Domain not resolving — custom domain troubleshooting
Next step
Open the Next.js deploy page or start from the deploy hub.