Next.js

Deploy your Next.js app

harvis serves static files, so this works for the part of Next.js that produces static files: static export. Add one line to your config, build, and the CLI takes it from there. Server-rendered routes, API routes, and middleware don't run here — there's no server behind this host.

steps
  1. 01

    Enable static export

    Add "output: 'export'" to next.config.js. Routes using API routes, middleware, or server-side rendering won't build — everything else does.

  2. 02

    Build the app

    Run "npm run build". With static export on, Next.js writes fully rendered HTML, CSS, and JS to an "out" folder instead of starting a server.

  3. 03

    Deploy it

    Run "npx harvis deploy out" from your project root. No config and no login for this first deploy — you get a live URL immediately, plus a private claim link to attach the site to a free account whenever you're ready.

Deploy Next.js with one command

Build your project, then hand the output folder to harvis. No account needed for the first deploy — you'll get a live link and a private claim link to manage it later.

terminal
npm run build
npx harvis deploy out

Prefer dragging files instead of a terminal? Build the project, then drop the output folder here and publish it the same way.

Next.js deploy questions

I use next/image or API routes. Can I still deploy here?

API routes and the default next/image loader need a server, so they don't work under static export. next/image still works if you set images.unoptimized: true (or point loader at an external image service) — everything else in the App or Pages router that doesn't touch the server builds fine.

Do dynamic routes like /blog/[slug] work with static export?

Yes, as long as they implement generateStaticParams (App Router) or getStaticPaths (Pages Router) so Next knows which pages to pre-render at build time. Routes with no way to enumerate their params ahead of time can't be static.

Is deploying a Next.js app to harvis actually free?

Yes, no card required. Free limits are 500 files and 50 MB per site, which covers a static Next.js build with plenty of room. Published sites don't expire — they stay live until you delete them.

Can I use my own domain with the deployed Next.js site?

Every site gets a free harvis.dev address, and you can pick your own subdomain from the dashboard after claiming it — my-app.harvis.dev instead of a random one. Pointing a domain you already own (like mystore.com) at the site isn't supported yet.

How is this different from deploying Next.js to Vercel or Netlify?

Vercel and Netlify are built around connecting a Git repo and running your build on their servers, with a dashboard to configure it. harvis skips all of that: you build locally (or in your own CI), run one CLI command against the output folder, and get a link — no project setup, and no account needed until you want to keep the site.

other frameworks

Deploying something else?

The recipe is the same everywhere — build it, then npx harvis deploy the output.