Deploy a Next.js App
Deploy Next.js without Vercel — static export to your own domain
Last updated: February 20, 2026Not every Next.js project needs Vercel. If your app works as a static export — marketing sites, docs, dashboards with client-side data fetching — you can deploy it anywhere. Add one line to your config, build, and you have a production site on your own domain with no vendor lock-in.
Deploy in 3 steps
From zero to live in under a minute.
Create your Next.js project
Scaffold a new project with the official Next.js CLI CLI.
npx create-next-app@latest my-app Build for production
Run the build command to generate static output in out/.
cd my-app && npm run build Deploy to ZeroDeploy
One command to push your site to the edge. It's live in seconds.
zerodeploy deploy --dir out Configuration Required
Next.js uses server-side rendering by default. To deploy as a static site, you must enable static exports in your Next.js config.
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
};
export default nextConfig; Things to know
Next.js-specific tips to avoid common pitfalls.
- You must add
output: 'export'tonext.config.mjs. Without this, Next.js builds for server-side rendering which isn't compatible with static hosting. - API routes (
app/api/) and server components with dynamic data won't work in static export mode. Use client-side fetching instead. - Image optimization with
next/imagerequires a server. Useunoptimized: truein your config or use standard<img>tags.
Everything you need
Deploy Next.js apps with the features you'd expect from a modern hosting platform.
Instant Deploys
Push to deploy in under 5 seconds. No queues, no build minutes to worry about.
Preview URLs
Every deployment gets a unique URL. Share any version instantly with your team.
Custom Domains
Connect your own domain with automatic SSL. Just add a CNAME and you're live. Learn more →
GitHub Actions CI/CD
Deploy on every push with GitHub Actions. Get PR comments with preview URLs. Set up CI/CD →
Built-in Analytics
See traffic, top pages, referrers, and countries right in your dashboard. No third-party scripts. Learn more →
Forms That Just Work
Add action="/_forms/contact" to any form. Submissions appear in your dashboard. Learn more →
Deploy other frameworks
ZeroDeploy works with any static build output.
Pair with a backend
Next.js without the vendor lock-in
Static export, your own domain, zero platform fees. Free hosting with analytics and preview URLs.