Back to blog
LaravelHomelabDevOps

Laravel Go brings its conventions to compiled services

Laravel Go brings routes, models, queues, and Inertia to Go without leaving Laravel’s familiar application structure behind.

By Isma4 min read

The hard part is not serving a route

Running a self-hosted service often means choosing between assembling Go packages yourself or giving up a straightforward deployment model to keep the conveniences of a full framework. Laravel Go is trying to sit in that middle ground with an approach that feels familiar to Laravel developers while remaining idiomatic Go. It is built on net/http, so the application can work with standard Go handlers and middleware. (laravel.com)

What matters is not simply that Laravel now targets another language, but that it keeps a recognizable way of structuring an application. It includes routes, typed validation, models, migrations, queues, broadcasting, workflows, and Inertia, while handlers, structs, and errors are still Go code. This is not Laravel PHP compiled into a binary or a drop-in way to run an existing PHP project. (laravel.com)

Familiar conventions without pretending it is PHP

For developers coming from Laravel PHP, the conceptual shift looks manageable. Routes are registered, incoming data is validated through structs and rules, and models are queried through typed builders. The compiler becomes part of the feedback loop before deployment, which is useful when a change affects routes, forms, or model relationships. (laravel.com)

Inertia is available for React, Vue, and Svelte, so a modern interface does not require a separate JSON API by default. That is a practical fit for internal tools, admin panels, or services that need a UI without splitting the project into fully separate backend and frontend applications. If server-rendered HTML is the better choice, Laravel Go also documents built-in views and templates. (laravel.com)

A deployment model that fits a homelab

The part I find most relevant for a homelab is the deployment model. The documentation describes building frontend assets and compiling the application into a single binary that can then be run directly. That makes it easier to operate a VM, container, or systemd service with fewer application-runtime-specific pieces. (laravel.com)

laravel new homelab-service --go
cd homelab-service
 
laravel migrate
npm run build
go build -o app .
./app

A new project uses PostgreSQL by default, and the documentation recommends developing against the same database engine used in production. For a standalone service, PostgreSQL, a binary, and a reverse proxy already make a clean foundation. Laravel Go also provides a health endpoint at /up, which is useful for Traefik, Caddy, Uptime Kuma, or whatever monitoring setup is running in the lab. (laravel.com)

Redis, workers, and real-time features without another stack

Queues are not treated as an external afterthought: Laravel Go documents drivers for databases, Redis, SQS, and Laravel Cloud. With Redis, it is worth keeping queue storage separate from cache storage, because flushing the cache would also remove keys from that same Redis database. Workers run through laravel queue:work, and queue priorities can be set with options such as --queue=high,default. (laravel.com)

Workflows add another useful building block for processes that do not finish during a single request, such as waiting periods, approvals, or multi-day job sequences. Instead of spreading state and timers across several jobs, the framework documents durable workflow runs on the existing queue workers. For real-time updates, it includes broadcasting and a Go-based Reverb server for WebSocket events sent to the browser. (laravel.com)

The fine print before moving anything

Laravel Go is currently in beta, and its documentation explicitly warns that APIs and configuration may introduce breaking changes before version 1.0. I would not use it yet for a no-margin migration of a critical Laravel PHP application, and I would not expect the PHP ecosystem’s packages, tutorials, and answers to have immediate equivalents. The documented requirement for Go 1.27 or later also means reviewing the base image, build server, and deployment toolchain before adopting it. (laravel.com)

Compiling the backend does not remove every supporting process either. When using Inertia server-side rendering, the documentation says to build the SSR bundle and run node bootstrap/ssr/app.js alongside the application. Redis, PostgreSQL, workers, and WebSockets may be integrated, but they still need backups, observability, resource limits, and updates like any other homelab service. (laravel.com)

My takeaway is straightforward: Laravel Go makes sense when I want a compiled service with Go’s concurrency model but do not want to rebuild authentication, migrations, queues, and an Inertia interface from scratch. It is especially appealing for homelab experiments because its deployment model fits small, self-contained services. For production, the key decision is less about the promise of the framework and more about consciously accepting that it is still beta today. (laravel.com)


Source: Introducing Laravel Go Official Laravel Go documentation

Newsletter

What I learn coding with AI, every two weeks in your inbox.

Real numbers, mistakes included. No spam, unsubscribe in one click.

No spam, unsubscribe in one click. I only use your email to send you this and the newsletter. More in the privacy policy.