Docs · Start
homeport.yaml reference
homeport.yaml is an optional file in your app’s folder, for teams who prefer config in the repo. Everything it sets can be set in the dashboard instead: the environment’s build settings and Settings → Cron jobs. Most apps never need one.
The file
- It is read from the app’s folder (the repo root unless you chose a folder inside it), and only under the name
homeport.yaml.homeport.ymlis not read. - It must be a regular file, not a symlink.
- Keys it does not know are ignored, so check the spelling of the ones below. Inside
queueandbackend, an unknown key is an error. - What wins, first to last: a one-off deploy override, the settings saved in the dashboard or the CLI, this file, then detection. One key is the other way round: health in this file wins over the environment’s health check path.
build:
command: go build -o server ./cmd/api
artifact: server
run: serve --port $PORT
release: migrate up
processes:
worker: work --queue defaultEvery key
| Key | Type | Default | What it does |
|---|---|---|---|
build.command | string | Detected (see Detection) | The build command, run with sh after the install step. |
build.artifact | path | server (rsc-kit: from its marker) | Where the build leaves your binary, relative to the app’s folder. |
build.image | image reference | Detected | A build image of your own. Needs build.command. |
static | folder | none | Serve this folder as a static site instead of running a binary. |
runtime | node or bun | Detected | What runs a JavaScript app. |
run | string | none | Arguments your binary is started with. |
release | string or list | Detected | Arguments for a one-off run of your binary before each release goes live. A list runs up to 10, in order. |
processes | map | none | Up to 4 extra long-running processes, such as a queue worker. |
packages | list | none | Executables to ship with the app, like lightpanda. Up to 8. |
assets | list | Detected | Folders of fingerprinted files kept for the next release. Up to 8. |
stop_grace | duration | About 10 seconds | How long the web gets to finish after it is told to stop. 1s to 15m. |
health | path | / | The path a deploy must answer before it goes live, and uptime checks request. |
headers | list | none | Response headers to set or remove, by path. Up to 16 rules. |
queue | none or map | Detected | How the app’s background jobs are drained. |
backend | map | rsc-kit’s | The paths a backend beside an rsc-kit renderer answers. |
api | false | Built when found | Leave an api/ folder of handler files alone. |
build.command
Replaces the detected build command. It runs in /bin/sh after the install step (for example bun install --frozen-lockfile), in the toolchain image homeport picked, or in build.image.
build.artifact
The path of the binary your build produces. Letters, digits, ., _, - and /, and no ... Setting it turns off the fallback that looks for a static site in build, dist or out when no binary appears.
build:
command: bun build --compile ./src/index.ts --outfile app
artifact: appbuild.image
Builds in an image you name instead of the detected toolchain, for a stack homeport does not detect. It takes precedence over all detection, has no install step, and requires build.command. A plain image reference of up to 255 characters, with an optional tag and @sha256: digest.
build:
image: denoland/deno:2.5.6
command: deno compile --allow-net --allow-env --output server main.tsstatic
Makes the app a static site served from this folder (it must contain an index.html). Use it when your build writes its site somewhere homeport would not look, or to serve a folder of a plain HTML site.
static: publicrun
Arguments added to your binary when it starts: run: serve --port $PORT starts ./server serve --port 8100, say. It is not run through a shell. It may use letters, digits, spaces, . _ : / = @ , + - $ { }, and only two variables, $PORT and $HOST. Ignored for static sites.
release
Arguments for a one-off run of your binary against the new release, before it takes traffic: database migrations, typically. If it fails, the deploy stops and the previous release keeps serving. It has up to 10 minutes. A list of up to 10 runs them in order, in those 10 minutes, and the first that fails stops the deploy.
- Write the arguments only:
release: migrate up, not./bin migrate up. - For Laravel the binary is FrankenPHP, and artisan runs through its
php-cli:release: php-cli artisan migrate --force. - No shell and no variables: letters, digits, spaces and
. _ : / = @ , + -only, so no&&. - Left out, it is detected for Laravel, rsc-kit, Prisma, Django, Alembic and a package.json
migrateordb:migratescript: see release command.release: nonesays the app has none, so nothing is detected.
processes
Extra processes that run beside your app from the same binary, each with its own arguments. A process is a name and its arguments, or a map with run:
processes:
worker: queue work
scheduler:
run: schedule work| Field | Rule |
|---|---|
| name | Lowercase letters and digits, starting with a letter, up to 15 characters. Not web or release. |
run | Required. Arguments to your binary, with the same rules as run: $PORT and $HOST are the process’s own. |
stop_grace | Optional. How long this process gets to finish after it is told to stop, as the top-level stop_grace. |
runtime
node or bun: what runs a JavaScript app, in place of what detection reads from the project.
packages
Executables from homeport’s curated list, shipped in each release and on your app’s PATH. See packages for the list. Not for static sites.
packages:
- lightpandaassets
The folders of fingerprinted files your build leaves, and the URL path each is served at, so a tab opened before a deploy still gets the old ones (see old files after a deploy). Most frameworks’ are detected; name them for Express, Hono, Go and the like. This list replaces the detected one.
assets:
- from: public/dist/assets # a folder in the app's folder, after the build
at: /assets # the URL path it's served at- Each
fromis a folder inside the app’s folder (no.., not.homeport), and eachata URL path starting with/. Up to 8. - Name only files whose names change when their content does: an old copy is served only for a file the new release doesn’t have.
- Not for static sites: their files are served as they are.
stop_grace
How long the web gets to finish what it is doing after it is sent SIGTERM, at a deploy, a restart or a move, before it is stopped. Whole seconds or minutes, from 1s to 15m, like 90s or 10m. A process can have its own, which is how a queue worker finishes the job it holds:
run: serve
stop_grace: 45s # the web's
processes:
worker:
run: artisan queue:work
stop_grace: 10m # this process's own- Left out, it is homeport’s default, about 10 seconds. A static site has none.
- The build settings have the same fields. Their web grace wins over this file’s, and processes they name replace this file’s, graces and all.
- Anything else is an error:
stop_grace must be whole seconds or minutes, 1s to 15m, like 90s or 10m.
health
The health check path: a deploy goes live once the app answers it, and uptime checks request it. It starts with /, has letters, digits and . _ - / only, no query and no .., and is at most 200 characters. Not for static sites.
health: /api/healthUnlike the other keys, this one wins over the dashboard: homeport reads it from the commit being deployed, and uses the environment’s health check path only when the file has none. An invalid path fails the build, with the reason: homeport.yaml: health "/api?x": a path of letters, digits and . _ - /, no query, no spaces - like /api/health.
headers
Response headers to set or remove, by path. Each rule has a path, and a set map, a remove list, or both:
headers:
- path: /
set:
Strict-Transport-Security: max-age=63072000
- path: /assets
set:
Cache-Control: public, max-age=31536000, immutable
remove: [X-Powered-By]- A
pathis a prefix on whole segments:/assetsis/assetsand everything under it, not/assetsx./is every path. No*, no trailing/, at most 256 characters. - A request gets the one rule with the longest matching path: rules never merge. A header it sets replaces your app’s own value.
- Up to 16 rules, 32 headers set and 16 removed in each. A value is printable ASCII, up to 8 KB, without
` { }or spaces at its ends; all of them together, up to 48 KB. - Some headers are the app’s or homeport’s own and can’t be set or removed:
Set-Cookie,Content-Length,Content-Encoding,Vary,ETag,Last-Modified,Location,Date,X-Robots-Tag, connection headers and anyX-Homeport-header.ServerandViacan be removed, not set. - The Settings tab’s Response headers section does the same. Rules saved there replace this file’s as a whole, and apply without a rebuild.
queue
How the app’s background jobs are drained, in place of what homeport detects. none says the app has no queue. A map sets any of backend (postgres, the default, or redis), drain and retry (arguments to your binary, as release is) and timeout (1m to 60m, 10m by default) over what was detected. Whether it runs on demand or always on is chosen in Settings → Queue.
queue:
drain: php-cli artisan queue:work --stop-when-empty --queue=high,default
timeout: 20mbackend
For an app whose pages an rsc-kit renderer serves, with a backend in Laravel, PHP, Go, Rust or Python beside it (@rsc-kit/core in its package.json, built with Bun). Requests to the backend’s paths, and everything under them, go to the backend; everything else goes to the renderer. rsc-kit’s build names the paths; backend.paths names them instead.
backend:
paths: [/api, /sanctum]- Each path starts with
/, a segment at a time, with no trailing/; up to 20, each up to 128 characters. Not/, and not/_edge,/.well-knownor/__homeport. pathsis its only key. Backend paths saved in the build settings win over this file’s.
api
An api/ folder of handler files, one a route, each taking a web Request and returning a Response, is built into a small Node.js or Bun server, which also serves a front end beside it. api: false leaves the folder alone. The build settings’ value wins over this file’s.
api: falseExamples
An rsc-kit site exported as files
Nothing to write: rsc-kit 0.29.6 and newer says it is an export in .output/rsc-kit.json. On an older rsc-kit, say so yourself:
static: distA Go service whose main package is not at the root
build:
command: CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o server ./cmd/server