Skip to main content
Pick what you are deploying when you add a website. Laravelify groups the choices into Backend, Frontend, and Full-stack, and each one runs the way that suits it:

What you can deploy

Backend

Frontend

Full-stack

The two Laravel stacks create a normal Laravel website. Its front-end assets (Vite, Inertia, Livewire’s JavaScript) are built on every deploy.

Backend and frontend as separate sites

Create each part as its own website in the same group, each with its own domain: Point the frontend at the backend’s domain (a build-time variable such as VITE_API_URL, or NEXT_PUBLIC_API_URL), and allow the frontend’s domain in the backend’s CORS settings.

What happens on a deploy

Laravel: composer install, APP_KEY, migrations, artisan optimize, and a front-end build when there is a package.json. See Laravel sites.PHP: composer install when there is a composer.json. The web root is the folder you chose (default public, or . for the repository root).

Build settings

Open Runtime on the website. Empty fields use the defaults above.
The start command and port are written into the PM2 file. After changing them, click Regenerate files, then deploy.

Environment variables

The Environment tab writes the site’s .env file.
  • Node servers read it at start through PM2.
  • Front-end builds read it while building. Values like VITE_API_URL, NEXT_PUBLIC_*, or NUXT_PUBLIC_* are compiled into the files, so deploy again after changing them.

Requirements per framework

  • Express and Node.js: the app must listen on process.env.PORT.
  • NestJS: npm run build must produce dist/main.js (the default). For another entry file, set the start command.
  • Next.js: set output: 'standalone' in next.config.
  • Nuxt: the default Nitro node-server preset, which writes .output/.
  • SvelteKit: use @sveltejs/adapter-node, which writes build/. Laravelify sets ORIGIN from the site’s address so form posts work.
  • Angular, React, Vue, Svelte: a build script in package.json.
  • Astro: static output (the default). Server rendering needs the Node adapter, which fits Node.js with start command node dist/server/entry.mjs.