Search

How to Deploy Go and Node.js (Express, Hono) Apps on Laravel Cloud

How to Deploy Go and Node.js (Express, Hono) Apps on Laravel Cloud

Laravel Cloud's move beyond PHP isn't only about Python. It now runs compiled Go services and plain Node.js APIs too, including Express and Hono apps on Node.js, Bun or Deno. Here's how each one deploys.

Also Read: Deploy Django, FastAPI & Flask on Laravel Cloud (Guide) - How To's

Deploying a Go app

What Cloud looks for

A go.mod file at the root of the app. There is no framework detection for Go because every Go app ends up as one compiled binary, whether you use Gin, Echo, Chi or the standard library.

Version

Supported versions are Go 1.24, 1.25 and 1.26, with 1.26 as the default. Cloud reads the go directive in go.mod:

go 1.25

There is no version picker in the dashboard. Pin an unsupported version and Cloud falls back to the default and warns you in the build log.

Build and start

Cloud pre-fills a build command that produces a small static binary:

CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o app .

The start command is simply ./app. If you rename the binary or build from a sub-package such as ./cmd/api, update both commands to match.

Note CGO_ENABLED=0: if your app relies on cgo (for example the mattn/go-sqlite3 driver), you'll need to adjust the build.

Config

Read variables with os.Getenv. Cloud sets them on the process, so there's no .env file and no need for godotenv. Attached databases and caches arrive as DATABASE_URL and REDIS_URL.

Deploying a Node.js API (Express, Hono and friends)

What Cloud looks for

A package.json at the app root. Express and Hono are detected from your dependencies. Anything else still runs as a generic Node.js app.

Node, Bun or Deno?

Cloud chooses the runtime from the files in your repo:

RuntimeDetected byVersions
Node.jspackage-lock.json20, 22, 24 (24 default, selectable)
Bunbun.lock, bun.lockb or bunfig.toml1.2 (fixed)
Denodeno.json or deno.lock2.2.6 (fixed)

Build and start

The build command defaults to npm ci --audit false. Add npm run build if you compile TypeScript.

Also Read: Laravel Cloud Updates 2026: New Languages, Pricing & Features

The start command comes from the start script or main entry in package.json (for example node server.js), falling back to npm start, bun run start or deno task start.

The one rule you can't skip

Listen on the port Cloud gives you:

app.listen(process.env.PORT || 3000);

PORT defaults to 3000. Cloud also sets NODE_ENV=production and APP_URL on every deploy.

Limits for both runtimes

Go and Node.js apps get scale to zero, preview environments, custom domains, object storage and worker clusters. Managed queues and scheduled tasks remain Laravel and Symfony only, so run your own worker (BullMQ, Asynq and so on) on a worker cluster, or trigger jobs from a Laravel service on the same platform.

A practical pattern

A common setup now looks like this, all from one monorepo:

  • api/ – Laravel, with managed queues and the scheduler
  • web/ – Next.js or Nuxt frontend
  • realtime/ or ingest/ – a Go or Hono service for the hot path

Each folder becomes its own Cloud application with its own scaling and domain, but you get one bill and one set of team permissions.

FAQ

Can I choose the Go version in the dashboard? No. Set it with the go directive in go.mod.

Does Laravel Cloud support Bun and Deno? Yes. Bun 1.2 and Deno 2.2.6 are supported, detected from their lockfiles or config files.

What port should my app listen on? Whatever PORT is set to, 3000 by default.

Related on The Web Tier

Sources: Laravel Cloud quickstart (Go and Node.js tabs) · Laravel Cloud runtimes

TWT Staff

TWT Staff

Writes about Programming, tech news, discuss programming topics for web developers (and Web designers), and talks about SEO tools and techniques

Your experience on this site will be improved by allowing cookies Cookie Policy