Deploy Bun
Falak runs Bun apps the same way as Node apps: built once on the builder, started as a supervised process on each server, and proxied by Caddy. Bun itself is installed on a server the first time a Bun site targets it.
Prerequisites
Section titled “Prerequisites”- A server of type app, web or worker.
- A
package.jsonwith astartscript, and a Bun lockfile (bun.lockorbun.lockb) or"packageManager": "bun@…". - Your app listens on
process.env.PORT.
import { Hono } from 'hono';
const app = new Hono();app.get('/', (c) => c.text('Hello from Bun on Falak'));
export default { port: Number(process.env.PORT ?? 3000), hostname: process.env.HOST ?? '127.0.0.1', fetch: app.fetch,};{ "scripts": { "start": "bun run src/index.ts" }, "dependencies": { "hono": "^4" }}Deploy
Section titled “Deploy”- + Create → Git repository, pick the repository.
- Choose the Generic Node preset and set the runtime to Bun. Falak also picks Bun when it detects
bun.lock. - Pick servers and a domain, then Deploy.
If a server is not ready for Bun yet, the deployment shows Waiting for servers while the agent installs Bun, then continues on its own.
How it runs
Section titled “How it runs”| Aspect | Value |
|---|---|
| Bun version | 1.4.2 (FALAK_BUN_VERSION), from Bun’s official release binaries (SHA-256 verified) |
| Build | bun install --frozen-lockfile, bun run build if defined, then bun install --production |
| Web process | bun run start in the current release |
| Environment | Site variables + PORT, HOST=127.0.0.1, NODE_ENV=production (unless set) |
Entry point without a start script |
The builder’s detection looks for index.ts, src/index.ts, server.ts, then JavaScript entry files, but the web process still runs bun run start, so define start. |
TypeScript runs directly; no build step is required.
Bun.serve is not auto-instrumented. Wrap your handler with withFalakRequest from @falak/apm-node. See APM for Node, Bun and Deno.
Air-gapped servers
Section titled “Air-gapped servers”Set FALAK_BUN_MIRROR on the control plane to download Bun from your own mirror. See Configuration.