Connect the repository.
Import it from GitHub or GitLab and choose the production branch. In a monorepo, set the root directory to the Next.js app.
Next.js hosting
Push your Next.js app to GitHub or GitLab. Lahyer detects it, builds it with your package manager and runs it as a Node.js server, with HTTPS, preview deployments and live logs.
Deploy your projectWhat Lahyer does with it
Lahyer fills these in from your repository. Change anything that does not fit in the project's build settings.
| Detected from | next in your package.json dependencies |
|---|---|
| Install | npm, pnpm, Yarn or Bun, chosen from your packageManager field or lockfile |
| Build | Your build script, or next build when there is none |
| Runs as | A Node.js server with standalone output. With output: "export" in next.config, static files from out/ |
| Node.js | 20 or 22, read from .nvmrc, .node-version or engines.node (22 by default) |
Your first deploy
Import it from GitHub or GitLab and choose the production branch. In a monorepo, set the root directory to the Next.js app.
They are encrypted, kept separate for production and preview, and available during the build, so NEXT_PUBLIC_ values reach the browser bundle.
Every push to the production branch deploys. Pull requests get their own preview URL, and you can roll back without rebuilding.
A few useful answers
No. Lahyer asks Next.js for standalone output during the build, so most apps deploy as they are. If your config sets output itself, or the app sits in a monorepo, wrap it with withLahyer from the @lahyer/next package.
Yes. Lahyer runs the output of next build on Next.js's own Node.js server, so the App Router, the Pages Router and route handlers work as they do with next start.
Server apps on Free sleep when idle and start again on the next request, which can take a moment. Pro keeps one production app always on.
Yes. Add Postgres from the project's Database tab and Lahyer puts the connection string in DATABASE_URL for production and preview. Free includes one 1 GB database.