Next.jsアプリをデプロイ
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.
- 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.
- 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.
- 03
デプロイする
プロジェクトのルートで「npx harvis deploy out」を実行してください。この最初のデプロイに設定もログインも不要 — すぐに公開URLが手に入り、いつでも無料アカウントにサイトを紐付けられる非公開のオーナー登録リンクも一緒に発行されます。
Next.jsをコマンド1つでデプロイ
プロジェクトをビルドして、出力フォルダをharvisに渡すだけ。最初のデプロイにアカウントは不要 — 公開リンクと、あとで管理するための非公開のオーナー登録リンクが手に入ります。
npm run build npx harvis deploy out
ターミナルよりファイルをドラッグする方が好みですか?プロジェクトをビルドしたら、出力フォルダをここにドロップすれば同じように公開できます。
Next.jsのデプロイに関する質問
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.
Next.jsアプリをharvisにデプロイするのは本当に無料ですか?
はい、クレジットカードは不要です。無料枠は1サイトあたり500ファイル・50 MBで、静的なNext.jsのビルドなら十分すぎるほどです。公開したサイトに有効期限はなく、削除するまで公開され続けます。
デプロイしたNext.jsサイトに独自ドメインは使えますか?
どのサイトも無料のharvis.devアドレスが割り当てられ、オーナー登録後にダッシュボードから好きなサブドメインを選べます(ランダムな名前の代わりにmy-app.harvis.devのように)。すでに持っている独自ドメイン(mystore.comなど)をサイトに向ける機能は、まだ用意されていません。
Next.jsをVercelやNetlifyにデプロイするのと何が違いますか?
VercelやNetlifyは、Gitリポジトリを接続してビルドを自分たちのサーバー上で実行し、ダッシュボードで設定する仕組みが中心です。harvisはそれをすべて省略します。ローカル(または自分のCI)でビルドし、出力フォルダに対してCLIコマンドを1つ実行するだけでリンクが手に入ります — プロジェクトの設定も、サイトを残しておきたくなるまでのアカウントも不要です。
別のものをデプロイしますか?
手順はどれでも同じです — ビルドしてから、出力フォルダをnpx harvis deployするだけ。