How to deploy a Next.js static export for free, from the out folder
Quick answer
To deploy a Next.js app for free as a static export, set output: 'export' in next.config.js, run npm run build, and drop the out folder on Convika's upload screen. Convika serves it at its own address, such as my-app.convika.page: /about opens about.html, the _next chunks load from their own paths, and your 404.html answers missing pages. Sign up free, with no credit card and no Git.
Free plan: no credit card, 5 published pages, 10,000 page views a month.
On this page
To deploy a Next.js app for free, export it as static files and drop the out folder on Convika's upload screen. Add output: 'export' to next.config.js and run npm run build. Convika serves out as a site at its own address, such as my-app.convika.page: /about opens about.html, the chunks in _next/static load from their own paths, and a missing page gets the 404.html Next.js builds. No Git, no server, and no credit card.
What to build, and the folder to drop
With a static export, next build writes one HTML file per route, plus the JavaScript and CSS the pages use, to out. That folder is the whole site, and it is the only thing you upload.
| Your project | Build command | Folder to drop |
|---|---|---|
Next.js, App Router or Pages Router, with output: 'export' | npm run build | out |
Turn on the static export
Set the output mode in next.config.js:
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
images: { unoptimized: true },
};
module.exports = nextConfig;
images: { unoptimized: true } serves the images of next/image as they are, since the default image loader runs on a server. Leave basePath and assetPrefix out: the site opens at the root of its own address, so the /_next/... paths Next.js writes load as they are.
A dynamic route, such as app/blog/[slug]/page.tsx, gets one HTML file per value that generateStaticParams() returns.
Deploy a Next.js static export in 5 steps
1. Build the export
In the project folder, run:
npm install
npm run build
Next.js lists the routes with a ○ for each prerendered page, and out holds the site.
2. Sign up free
Sign up free, with no credit card. Convika opens the upload screen, Put your page or file online.
3. Drop the out folder
Drop out on Drop a file or folder here, or click Choose a folder. A .zip of the folder works too. Convika reads it in your browser and shows "Uploads as a site" with the number of files. Under Site URL, Convika offers a free name such as my-app.convika.page; type another to check it. Click Create my preview.
4. Check the private preview
Convika uploads the files and opens a private preview of the whole site. Click through the routes, reload one, and try a path that doesn't exist, on your computer and your phone.
5. Publish it
Click Publish page. Under Who can open this page?, choose Public and click Next. The first time, Convika shows Publish free, and under it Publish without the Convika bar, which starts Pro with its free trial: 7 days free, then $12 a month, cancel any time before it ends. To publish on Free, click Publish free. The site is live at my-app.convika.page.
Every route at its own path, with no rewrite rule
By default, Next.js writes /about to out/about.html and /blog/post-1 to out/blog/post-1.html. Convika answers /about with about.html and /blog/post-1 with blog/post-1.html, so a link, a reload, and a bookmark all open the right page. With trailingSlash: true, Next.js writes out/about/index.html instead, and Convika answers /about/ with it.
A path the site doesn't have gets out/404.html, with a 404 status.
Update the site at the same address
Run npm run build again. In Convika, open the site's page screen. Under Update from an HTML file, click Upload a new version and drop the new out folder, or its .zip. Click Upload as a new version, open the preview, then click Publish v2 at the same link and confirm with Publish. The address stays the same, and each earlier version keeps its own files, so you can go back to one.
What Free includes, and what Pro adds
| Free | Pro | |
|---|---|---|
| Price | No credit card | 7 days free, then $12 a month |
| Sites live at once | 5 | 100 |
| Page views a month | 10,000 | 100,000 |
| A site's files together | 100 MB | 5 GB |
| Each HTML page | 4 MB | 4 MB |
| Who can open it | Public | Public, Private link, or Only people with the password |
| Convika bar | On each page | None |
A password or a private link covers every route of the site. Every page counts its visitors in your dashboard: where they came from and what they clicked.
Skipbox
Cheap & fast GitHub Actions runners, unlimited for $39 a month
Your own machine keeps Docker layers and package caches between jobs. Switch by changing one runs-on line.
Start a free Skipbox trialFrequently asked questions
How do I deploy a Next.js app for free?
Add output: 'export' to next.config.js, run npm run build, then sign up free on Convika and drop the out folder on the upload screen. Click Create my preview, and publish with Publish page, Public, Next, and Publish free. The Free plan needs no credit card.
Does next/image work in a static export?
Yes, with images: { unoptimized: true } in next.config.js, or a custom loader that points at an image service. Images then load from the paths in out or from the service.
Do I need basePath or assetPrefix?
No. The site opens at the root of <name>.convika.page, so the default paths are right.
Do dynamic routes work?
Yes, for the values generateStaticParams() returns at build time. Each one is its own HTML file in out.
Does reloading a route work?
Yes. Convika answers /about with about.html, and /about/ with about/index.html when you build with trailingSlash: true.
Do I need Git or GitHub?
No. Drop the folder or a .zip straight from your computer. Nothing to push.
Next step
How to password protect an HTML page or website
A JavaScript password sits in the page source. Free: StatiCrypt or .htaccess. Paid: Netlify Pro $20, Vercel $20 a project, Tiiny Host $18, or Convika Pro.
Related articles
- How to deploy a React app for free, from Vite or Create React AppDeploy a React app free: run npm run build, drop the dist or build folder on Convika, and get a live link. No Git, no card. Routing and image settings inside.
- How to deploy a Gatsby site for free, from its public folderDeploy a Gatsby site free: run gatsby build, drop the public folder on Convika, and get a live site at its own address. No pathPrefix, no Git, no card.
- How to deploy an Astro site for free, from its dist folderDeploy an Astro site free: run npm run build, drop the dist folder on Convika, and get a live site at its own address. Every page at its path, no Git, no card.
- How to deploy a Nuxt site for free, from nuxt generateDeploy a Nuxt site free: run nuxt generate, drop the .output/public folder on Convika, and get a live site at its own address. Routes open on reload, no card.
- How to deploy a Docusaurus site for free, from its build folderDeploy a Docusaurus site free: run npm run build, drop the build folder on Convika, and get live docs at their own address with baseUrl '/'. No Git, no card.
- ZIP to website: upload a .zip file and get a link that opens as a pageDrop a .zip with index.html, CSS, JavaScript, and images here and get a link in seconds, free. A whole site or a built app goes up as a site at its own address.