Keep the Inertia SSR process running

npm run build does not refresh the SSR bundle. Production needs build:ssr and a process that stays up.

For your AI agent

Copies a prompt. Paste it into the AI agent you already have open.

Read https://laravel-vuejs.space/inertia-ssr-process-cloud.md
npm run build does not refresh the SSR bundle. Production needs build:ssr and a process that stays up.
Do not start a second SSR process on a different port and leave config/inertia.php pointing at the old one.
Do not read window in setup.
Show the diff. Do not commit.
On this page · 3 sections
  1. The fix
  2. What to avoid
  3. FAQ

People searching “Inertia SSR not updating” deploy npm run build and the HTML stays old. That command writes public/build. It does not refresh bootstrap/ssr. The SSR guide is the build. The deploy guide is the process that has to stay up. This page is the pair.

TL;DR

  • npm run build does not refresh the SSR bundle.
  • Production needs build:ssr and a process that stays up.
  • Do not start a second SSR process on a different port and leave config/inertia.php pointing at the old one.
  • Do not read window in setup.

Who it's for: Laravel + Vue developers on Inertia

Applies to: Laravel 13 · Inertia 3 · Vue 3

The fix#

shell
npm run build:ssr
php artisan inertia:start-ssr

Locally, composer run dev already server-renders. The current Vue starter kit has no dev:ssr script. You do not run inertia:start-ssr during development.

In production the Node process has to be supervised. If it dies, Inertia falls back to the client shell and the first response is empty of your page HTML. A public page that needed the HTML is the page that suffers. An app that is entirely behind login can skip SSR, which the SSR guide also says.

What to avoid#

Gotcha

Do not start a second SSR process on a different port and leave config/inertia.php pointing at the old one. Do not read window in setup. The SSR guide explains that crash.

FAQ#

How do I keep the Inertia SSR process running?

npm run build does not refresh the SSR bundle. Production needs build:ssr and a process that stays up.

What goes wrong with Inertia SSR not updating?

Many developers deploy npm run build and the HTML stays old. Do not start a second SSR process on a different port and leave config/inertia.php pointing at the old one.

Found this useful?

Ask questions, share what you built.

Join thousands of Laravel and Vue developers in our Facebook group, or get new posts in your Telegram feed. Sharing this article helps too.

Keep reading

Newsletter

Get the best of Laravel & Vue, once a month.

One short email with new guides, release notes worth reading and hand-picked community links. No spam, unsubscribe any time.