Needs a static export

How to publish a Nextra site as a static export

Nextra is a Next.js site, so it renders on a server until you switch it to a static export. Two config keys do that, and its own guide names both.

Choosing a host rather than a command? Next.js Hosting covers what it costs and what does not work here.

Build command
npm run build
Folder to upload
out

Free plan, free SSL, no credit card.

.droply.id
  1. Build the project

    Run npm run build in the project folder. This is the step Droply does not do for you: we publish finished pages, we never run your build.

  2. Find the output folder

    The build writes a finished site to out. That folder, not the project folder, is what gets uploaded.

  3. Drag it in

    Drop the folder (or a ZIP of it) into Droply. It is live on an HTTPS droply.id subdomain in seconds, and re-uploading publishes a new version at the same URL.

Worth knowing about Nextra

  • Add output: "export" AND images: { unoptimized: true } to next.config.mjs. the Nextra static-export guide lists both as required, and the second one is the one people miss: without it the build fails on the image optimizer rather than on anything you wrote.

  • The static site lands in out, not .next. distDir can move it.

  • If your site uses Pagefind search, its postbuild script has to write into the exported folder. the Nextra guide gives the exact command; a search box that returns nothing on a published site is usually this.

Did an AI tool build this project?

Hosting an AI-generated website covers the question that comes before the build command: whether what you are holding is a single file or a project, and which of the two every tool actually hands back.

Frequently asked questions

Does Droply build my Nextra project for me?
No, and it never will. Droply publishes finished static files. Running your build would mean running your dependencies on our servers, which is a different and much riskier product. Build locally or in your existing CI, then upload the result.
Which folder do I upload?
The out folder that npm run build creates, not the project folder. Upload it directly or ZIP it first; both work.
Can I host a server-rendered Nextra app here?
No. Droply serves static files and never runs server code, so anything that renders per request needs a host that runs Node. The static export route above is the way to publish a Nextra project here, and only if the project does not depend on server behaviour.
What happens when I update the site?
Build again and upload again. The new version replaces the old one at the same URL, so a link you have already shared keeps working. The Pro, Business and Enterprise plans keep a version history you can roll back to in one click.
Can I use my own domain?
Yes, on the Pro, Business and Enterprise plans. Point your domain at Droply, and the certificate is issued and renewed automatically.