Convika

यह पेज अभी हिन्दी में नहीं है, इसलिए अंग्रेज़ी में दिख रहा है।

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.

Deploy my Next.js site for free

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 projectBuild commandFolder to drop
Next.js, App Router or Pages Router, with output: 'export'npm run buildout

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

FreePro
PriceNo credit card7 days free, then $12 a month
Sites live at once5100
Page views a month10,000100,000
A site's files together100 MB5 GB
Each HTML page4 MB4 MB
Who can open itPublicPublic, Private link, or Only people with the password
Convika barOn each pageNone

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 trial⁠

Frequently 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

More ways to send your page

Share this article

Your Next.js site, live at its own address

Drop the out folder. Convika serves every route at its path, counts visitors, and keeps the address when you upload a new build.

Deploy my Next.js site for free

Free plan: no credit card, 5 published pages, 10,000 page views a month.