1. EasyHost
  2. Guides
  3. Next.js
  4. Monorepo

Deploy Next.js from a monorepo

Run the deploy from your repository root and tell EasyHost which folder holds your Next.js app. It installs where the lockfile is and builds in your app folder.

Last updated November 9, 2026

Set the root directory

npx ezhst link --project <project-slug> --app <app-slug>
npx ezhst build set --root-dir apps/web
npx ezhst deploy

How it resolves

StepWhere it runs
UploadThe folder where you ran deploy, so use the repository root
InstallYour app folder if it has a lockfile, otherwise the repository root
Buildapps/web, using next build, through your package build script
Startapps/web, using scripts.start, or next start -H 0.0.0.0 -p $PORT when no start script exists

Build shared packages first

If Next.js imports workspace packages that need compiling, build them first with a custom command.

npx ezhst build set --build "npx turbo run build --filter=./apps/web"

Nx works the same way with npx nx build <project>.

Several apps, one project

A project holds up to 3 apps. Create one EasyHost app per deployable folder and set each root directory. They share the project's database and bucket.

See the Next.js hub for every Next.js guide, or free Next.js hosting for what is included.

Frequently asked questions

Where should I run ezhst deploy?

From the repository root, so shared packages and the lockfile are included in the upload.

Start for free

Install the skill, choose Global or Local, then tell your agent to deploy. No credit card, no config files.

npx ezhst skill install