Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cwbmuller's avatar

Inertia JS SSR running but not working [SOLVED]

Has anyone worked with Inertia JS and SSR? I'm trying to get SSR working on a (Laravel, Vue, InertiaJS, Vite) stack.

I've set up everything as in the interia JS SSR docs https://inertiajs.com/server-side-rendering.

As far as I can see everything is running and the SSR files are being built and I can run php artisan inertia:start-ssr fine and the app is accessible and working as expected.

However, SSR is not working. ie: view-source:http://domain.test is not returning a SSR version of the app.

One thing I noticed is that although php artisan inertia:start-ssr command works: php artisan inertia:stop-ssr returns the error - Unable to connect to Inertia SSR server.

I've tried running the app in SSR both locally and remotely, the app renders as expected but no SSR. Any ideas on what I'm missing?

0 likes
3 replies
DanPeterson's avatar

Hey man I was having the same issue! I had modified the setup in srr.js a bit for my use case, but turns out I goofed up and forgot to return app in the setup function.

setup({ App, props, plugin }) {
	const app = createSSRApp({render: () => h(App, props) });

	app.use(customPlugin);

	// Important
	return app;
}

It's possible you have a similar issue.

2 likes
asdasdsa's avatar

The url does not work. What was the solution?

Im running a ubuntu server, with nginx.

I have the X-inertia:true, in the response header.

Please or to participate in this conversation.