← nibrunCONTENT HISTORY
WHAT CHANGED
Update to nibrun
Snapshot Nov 27, 2026 · 00:17 UTC · version 0.1.6
Collection source: downloaded plugin package.
First saved snapshot
No earlier snapshot is available to establish a change.
Save nibrun and check future changes in Following.
Up to 3 plugins free · no card required.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"description": "Deploy a compiled binary to nibrun and run it as an HTTPS service. Use when asked to deploy, ship, host or run a self-contained server binary (Bun, Go, Rust, Zig, C) or a folder of static assets on nibrun, when working in a repo that targets nibrun, or when deciding whether nibrun fits an app.",
"included_files": [],
"name": "deploy-to-nibrun",
"skill_md_contents": "---\nname: deploy-to-nibrun\ndescription: Deploy a compiled binary to nibrun and run it as an HTTPS service. Use when asked to deploy, ship, host or run a self-contained server binary (Bun, Go, Rust, Zig, C) or a folder of static assets on nibrun, when working in a repo that targets nibrun, or when deciding whether nibrun fits an app.\n---\n\n# Deploy to nibrun\n\nnibrun takes one compiled binary and gives it a microVM of its own, a persistent filesystem, and\nan HTTPS URL. No Dockerfile, no YAML, no cluster.\n\nBuild for Linux x86_64, deploy through nibrun's MCP server or CLI, then ask the URL for something.\n\nWhat that path does not need is below it: [copying an app](#copying-an-app), [the guest contract](#the-guest-contract),\n[naming a runtime value](#naming-a-runtime-value), [a second public port](#a-second-public-port),\n[cron jobs](#cron-jobs), and [what nibrun does not do](#tradeoffs).\n\nNever ask users to paste credentials into chat or pass them through MCP, command arguments,\nsource files, compiled binaries or archives. Users enter credentials directly in the nibrun\ndashboard or the destination app's setup page. Reuse configured credentials without reading or\nreturning their values.\n\nFor CI deployments, start at [GitHub Actions](#github-actions).\n\n## 1. Sign in\n\nIf using a connected nibrun MCP server, use its authenticated account and skip CLI sign-in.\nOtherwise, check the CLI:\n\n```sh\nnib apps list\n```\n\nBoth halves in one command: `command not found` means the CLI is not installed, `Not signed in.`\nmeans it is not signed in.\n\n```sh\ncurl -fsSL https://nibrun.com/install.sh | sh # installs `nib` to ~/.local/bin\nnib login # device flow: approve it in the browser\n```\n\n`nib login` waits on a human approving it in a browser, so an agent that finds itself signed out\nasks the user to run it rather than trying to drive it.\n\n## 2. Build the binary\n\nOne self-contained `linux-x86_64` file — static, or dynamically linked against glibc, which the\nrootfs carries. It has to be built *for* that target: a binary compiled on a Mac, or for arm64, is\nthe most common reason a first deploy never boots.\n\n**If the repo already builds one, run its build.** A project that ships a binary usually wraps more\nthan a compiler invocation — assets embedded, constants substituted at build time, a frontend\ncompiled first — and a hand-rolled command silently skips all of it, producing something that links\nand then dies on boot. [bun-full-stack-starter](https://github.com/ilbertt/bun-full-stack-starter)\nis one such: `bun run build` gives `backend/dist/app` with the frontend and the migrations inside\nit, defaulting to `PORT` 3000 and `./data`.\n\nA Bun repo with nothing to inherit compiles one itself with `bun build --compile`, targeting\n`bun-linux-x64`. Embedding an asset directory, bytecode, build-time constants — all flags on that\nsame command, and worth reading [Bun's single-file executable\ndocs](https://bun.com/docs/bundler/executables) for rather than recalling: a flag invented from\nmemory is how a binary ends up missing the files it expects to carry.\n\nThree things to read off the binary before deploying rather than after:\n\n- **The port it listens on**, and that it binds `0.0.0.0` rather than `127.0.0.1`. The guest hands\n the number back as `NIBRUN_HTTP_PORT` and `PORT`, so an app that reads either needs no\n configuration here.\n- **Where it writes.** Only `/app/data` survives a redeploy, and an app that keeps its SQLite file\n and its uploads under `./data` is already there.\n- **What it needs from the environment**, off a `.env.example` or whatever it loads config from. It\n has to be there on the **first** deploy: a process that exits over a missing variable never\n starts serving, and the deploy fails with it.\n\n**A folder of static assets has no binary to build**: `nib` is one, and `nib serve` answers for\nwhatever folder it is given, on the port the guest hands it. So the folder goes up as the app's\n`data/`, and the CLI's own Linux build as the binary that serves it:\n\n```sh\nnib run \"https://github.com/ilbertt/nibrun/releases/latest/download/nib-linux-x64 serve /app/data\" --name my-site --data-folder ./dist\n```\n\nA path naming a directory answers with its `index.html`, and a miss with the folder's own\n`404.html` where it has one; `serve /app/data --single-page` answers every miss with the root\n`index.html` instead, for a SPA whose routes exist only in the browser. No `--port`: `nib serve`\nbinds whichever port the guest assigns. The assets ride in as data, which goes up only as the app\nis created — a rebuilt site is a new app, at a new URL, and a custom domain (`nib apps domains`)\nis what keeps an address across that.\n\n## 3. Deploy\n\n### With MCP\n\nChoose the app: supply a `name` and optional initial `config` to create one, or an `appId` to\nredeploy an existing app. Initial configuration includes the arguments and HTTP port needed on\nfirst boot. Environment values are not accepted through MCP; existing apps reuse their saved\nconfiguration. Reuse the returned `app.id` as `appId` for subsequent deployments; a name creates\na new app.\n\nIf the app needs environment variables before its first boot, call `prepare_deploy` to create it\nwithout deploying. Give the user its dashboard link, `https://app.nibrun.com/apps/<appId>`,\nwhere they enter the values directly under **Environment variables**. Wait for their confirmation,\nthen deploy using that `appId`. Native file binding can still be used for the binary; direct\nuploads use the prepared artifact as described below.\n\nInclude `chatId` in `deploy_app` when your current chat ID is available; omit it rather than\nguessing. Without it, nibrun records the client's `_meta[\"openai/session\"]` when available.\nThis metadata is an anonymized conversation ID and cannot be assumed to resolve to a chat URL.\n\nChoose one binary source:\n\n- **Native file binding:** attach the compiled executable to `deploy_app`'s `binary` input using\n the client's file binding.\n- **HTTPS download:** pass `url` to `deploy_app` when the binary is already reachable over HTTPS\n from nibrun. Signed download URLs work. For `binary` or `url`, an optional `sha256` verifies the\n downloaded bytes.\n- **Direct upload:** if native file binding is unavailable, use `prepare_deploy` as described\n below. This requires an agent that can read the compiled file and upload bytes over HTTP.\n\nFor a direct upload:\n\n1. Call `prepare_deploy` with the app target, the binary's `filename` and its actual `sizeBytes`.\n It returns `app` and `upload`, creating the app if needed. It does not deploy anything.\n2. PUT the raw binary as the whole request body to `upload.url`, with `Content-Length` equal to\n `sizeBytes`. The signed URL authorizes this request; send no nibrun authorization token. Wait\n for a successful 2xx response.\n3. Call `deploy_app` with `appId: app.id` and `artifactId: upload.artifactId`. nibrun finalizes and\n validates the uploaded binary, then queues the deployment.\n\nEach `deploy_app` call creates a deployment and replaces the current release. The result contains\n`app`, `deployment` and the public `url`; a pending deployment is only queued. Use `get_app` to\ncheck the returned deployment and request the public URL before reporting success.\n\n### With the CLI\n\nThe first deploy creates the app:\n\n```sh\nnib run ./my-server --name my-app --port 8080\n```\n\n`--port` is the HTTP port the binary listens on inside the guest — read it off the app rather\nthan carrying a number over from an example. It is the number the guest hands back as\n`NIBRUN_HTTP_PORT` and `PORT`, and it defaults to `3000`.\n\nAn app can be created with its `data/` already holding something — a seeded SQLite file, a corpus,\nfixtures a first run would otherwise have to write:\n\n```sh\nnib run ./my-server --name my-app --data-folder ./seed\n```\n\n`--data-folder` accepts a local folder, a `.tar.gz` or `.zip` file, or an HTTPS URL to either\narchive format. nibrun fetches remote archives directly, so there is no need to download them\nlocally first. The URL must name the archive in its path and be reachable from nibrun; signed\nquery strings work, so quote URLs that contain them:\n\n```sh\nnib run ./my-server --name my-app --data-folder 'https://example.com/seed.tar.gz'\n```\n\nFor every source, **the root of the archive becomes the root of `data/`**: a folder is packed from\nthe inside, so `./seed/app.db` arrives as `/app/data/app.db`, and bundling the folder rather than\nits contents puts every file one directory deeper than the app looks. Up to 1 GiB uploaded or\nfetched and 2 GiB unpacked, and only as the app is created: this and the app writing its own files\nare the whole of how anything gets onto the volume. A zip made anywhere but unix carries no\npermissions, so an executable bit does not survive one.\n\n### Try seeding first-run setup before going public\n\nSome apps let the first visitor claim the admin account. Their public URL is reachable as soon\nas they boot, so check whether that setup can be seeded before deploying. This depends on what\nthe app supports and what can run on the local machine:\n\n1. Look for a build for the local OS and architecture, or a supported way to run the app from\n source. **The Linux binary uploaded to nibrun cannot run directly on macOS.** Use the same app\n version and check that its data can move between the local and Linux builds.\n2. If supported, seed a dedicated data folder using the app's documented initialization command,\n or run the local build bound to `127.0.0.1`, complete admin setup, and stop it cleanly.\n3. Deploy the seeded folder with `--data-folder`, using the Linux x86_64 binary. Supply any\n required environment values through the dashboard before the first deploy, without sharing\n credentials in chat.\n4. Check the public app requires the configured login and no longer offers an initial admin claim.\n\n```sh\nnib run ./my-server-linux-x64 --name my-app --data-folder ./configured-data\n```\n\nIf seeding succeeds, the app starts with its admin account already claimed. Keep the configured\ndata folder private: it contains the app's account state.\n\nIf a compatible local build or initialization method is unavailable, check whether the app can\nset initial admin credentials through configuration on its first boot. If neither approach is\nsupported, explain that seeding could not be done and that first-visitor setup will be reachable\nwhen the public URL goes live.\n\n### Redeploying\n\n**Every deploy after that must name the app**, or a non-interactive shell creates a second one.\n`nib apps list` finds the name again when a later session has to redeploy:\n\n```sh\nnib run ./my-server --app my-app\n```\n\nFor a local binary, the CLI skips uploading when that app already has an artifact with the same\nbytes and filename. It still creates a new deployment with the configuration you supplied.\n\nEnvironment variables are an **edit**, not a replacement — anything a deploy does not name is left\nalone. For non-sensitive configuration:\n\n```sh\nnib run ./my-server --app my-app --env LOG_LEVEL=info\n```\n\nArguments for the binary go inside the quotes, not after them:\n\n```sh\nnib run \"./my-server serve --verbose\" --app my-app\n```\n\nThe binary may be an https url instead of a path, and nibrun fetches it rather than this machine\nuploading it:\n\n```sh\nnib run https://github.com/me/my-app/releases/download/v1/my-server --app my-app\n```\n\nChanging only how the binary starts is `nib apps update`, which runs the one the app already has\nrather than asking for it again. What no flag names is left alone:\n\n```sh\nnib apps update --app my-app --env LOG_LEVEL=debug\nnib apps update --app my-app --args \"serve --verbose\"\n```\n\n`nib run` waits until the deployment is actually serving and prints the URL. Or drag the binary\nonto [app.nibrun.com](https://app.nibrun.com) — same thing, no CLI.\n\nEvery option a deploy takes is listed by `nib run anything --help` — any word will do in place of\nthe binary, because the help does not read it, and `nib run --help` on its own answers with the\nsubcommand rather than the options. What is below is what `--help` does not say.\n\n### GitHub Actions\n\nDeploy an existing app without an API key or `nib login` in CI. Use a CLI release with GitHub\nOIDC support. After signing in locally, configure which workflow may deploy:\n\n```sh\nnib apps github-workflows set --app my-app --repository OWNER/REPO --workflow deploy.yml\n```\n\nSave this as `.github/workflows/deploy.yml`. Replace `./build.sh` with the repository’s build\ncommand, `./my-server` with its Linux x86_64 output, and `APP_ID` with the app ID from\nthe setup command above:\n\n```yaml\nname: Deploy to nibrun\non:\n push:\n branches: [main]\npermissions:\n contents: read\n id-token: write\njobs:\n deploy:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: nibrunhq/setup-cli@v1\n - run: ./build.sh\n - run: nib run ./my-server --github-trusted-oidc --app-id APP_ID\n```\n\nBranch and tag runs of this workflow can deploy. The CLI exchanges GitHub identity for a\ntemporary token scoped to this app. Deployments reuse its saved startup arguments and configuration. The command returns once the deployment is\ncreated, without waiting for it to serve. If the trust rule requires a GitHub environment,\nset `jobs.deploy.environment` to match.\n\n## 4. Verify\n\nRun the compiled server locally and check its main flows with HTTP/API requests. After deployment,\nrequest the public URL too: a serving status only confirms a TCP connection, not a working app.\nUse a browser for testing only when the user asks for browser or visual testing.\n\n```sh\ncurl -fsS https://my-app.nibrun.app/\n```\n\nReport which checks passed and which remain unverified. With MCP, use `read_logs` for recent\noutput and `list_files` to inspect the app's persistent files when diagnosing failures.\n\n`nib apps logs --app my-app` prints recent output and exits. Add `--follow` for live output, or\n`--timerange 2h` to read further back. It says why an app never came up, and what one that did is\ncomplaining about. `nib --help` lists the rest — status, domains, filesystem, export, delete.\n\n## Inspecting SQLite databases\n\nRead SQLite databases in an app's `data/` through MCP, the CLI or dashboard without downloading them.\nWith MCP, use `query_database`.\n\nWhen a task calls for inspecting an app's database, use `nib apps sqlite` to discover its\nsubcommands:\n\n```sh\nnib apps sqlite --help\n```\n\nExplore the subcommands and their `--help` to list saved connections, create a connection to\nthe database file, and query it. Paths match `nib apps files ls`: `/app.db` names the guest's\n`/app/data/app.db`. Reuse a saved connection when available, or create one for the file the app\nactually uses. Pass `--app` and the saved `--connection` ID when querying; use `--json` for\nstructured results. The app needs a running deployment. Queries read the actual database in\nthe guest, including committed changes in its WAL.\n\nIn the dashboard's **Files** tab, choose **Mark as SQLite database** from the file menu, then\nclick the database file to open the explorer. Both CLI and dashboard connections are read-only:\nSQLite rejects data and schema writes, so an AI agent can explore without modifying the database.\nThe app can continue writing to its database.\n\n## Copying an app\n\nAn export is a `.tar.gz` holding `data/`, the binary that ran against it, and a `.env` of the\nvariables it was deployed with — which is everything a second app is rebuilt from, whether that is\na staging copy, a restore, or a move to another account:\n\n```sh\nnib apps export ./my-app.tar.gz --app my-app\ntar xzf my-app.tar.gz # -> data/ my-server .env\nnib run ./my-server --name my-app-copy --data-folder ./data --port 8080\n```\n\n`--data-folder ./data` and not the bundle as a whole: only `data/` was the volume, and the binary\nand the `.env` unpacked beside it were never on it. Nothing outside the volume comes across either\n— port, arguments and environment are given to the copy the way any new app is given them, with the\nexported `.env` as the record of what the original had.\n\n## The guest contract\n\nApps and persistent storage are hosted in Frankfurt, Germany (AWS `eu-central-1`). Uploaded\nbinaries, data imports, exports and platform database backups are stored in the same region.\nHTTPS requests pass through Cloudflare's global network.\n\nEverything the binary can count on, and nothing else:\n\n| | |\n| --- | --- |\n| Platform | Linux **x86_64**, glibc (Debian rootfs) |\n| Working directory | `/app` — a tmpfs the app does not own |\n| Persistent volume | `/app/data` — 8 GiB, survives every redeploy. `NIBRUN_DATA_DIR` names it. Not `noexec`: a file unpacked here can be exec'd in place |\n| Port | `NIBRUN_HTTP_PORT`, and `PORT` beside it; the app **must** listen on it, on `0.0.0.0` |\n| Own hostname | `NIBRUN_HOSTNAME` is set by the guest to the app's own `<slug>.nibrun.app` |\n| Second port | Only with `--extra-public-port`: `NIBRUN_EXTRA_PUBLIC_PORT` on `NIBRUN_PUBLIC_IPV4`, TCP and UDP, assigned rather than chosen, and reached at that number and no other |\n| Ephemeral | `TMPDIR=/tmp` is a tmpfs of **64 MiB** — a quarter of the RAM — and is lost on restart. So is everything outside `/app/data` |\n| Programs | `/bin/sh` and `crontab` are available. Ship other tools yourself; there is no `tar` or `unzip` |\n| Resources | 1 vCPU, 256 MiB RAM |\n| `HOME` | `/app`, which the app cannot write: a binary that puts a cache or a config file under `~` dies of `EACCES` before it ever serves. `/app/data` is the only path it can write |\n| URL | `https://<slug>.nibrun.app`, live as soon as it boots |\n\nThe guest sets three names of its own — `NIBRUN_HTTP_PORT`, `NIBRUN_HOSTNAME`, `NIBRUN_DATA_DIR` —\nand any of them you set yourself is ignored, as is `PORT`, which carries the same number as\n`NIBRUN_HTTP_PORT` under the name every other host uses. `HOME` and `TMPDIR` are defaults rather\nthan fixed, so one you set yourself is what the binary reads — `HOME=${NIBRUN_DATA_DIR}` is how a\nbinary that insists on writing under `~` is given a home it owns.\n\nA launcher that carries a runtime and unpacks it at boot — a `node` and a Next standalone build,\nsay — meets all three at once: it unpacks with its own code rather than `tar`, into `/app/data`\nrather than `/tmp` (a `node` alone is larger than `/tmp`), and execs from there. Copying out to\n`/tmp` first is what a `noexec` volume elsewhere would need, and this one is not.\n\nA binary that needs its own absolute URL — an OAuth redirect, a webhook it registers, a link in\nan email — builds it from `NIBRUN_HOSTNAME` rather than being told it, and falls back to whatever\nit uses when it is not on nibrun.\n\n## Naming a runtime value\n\nA binary that insists on a variable name of its own reaches the same values through it —\n`APP_BASE_URL=https://${NIBRUN_HOSTNAME}`, `DATABASE_URL=file:${NIBRUN_DATA_DIR}/app.db` — and the\nguest expands it before exec. Only complete `${NIBRUN_NAME}` references to the names above\nexpand. Bare names such as `$NIBRUN_HTTP_PORT`, unmatched braces, and other dollar signs remain\nliteral. A complete reference to an unknown `NIBRUN_` name is refused when you deploy it;\n`${PORT}` remains literal.\n\n## A second public port\n\nAn app needing a port HTTP cannot carry — WebRTC media, a game server, anything on UDP — asks for\none with `--extra-public-port`, and is told where it landed as `NIBRUN_PUBLIC_IPV4` and\n`NIBRUN_EXTRA_PUBLIC_PORT`. Neither is discoverable from inside the guest, so an app that tells a\npeer where to reach it announces that pair: it is the same number end to end, which is what makes\nannouncing it correct.\n\nAsk for the port in the same change that names it:\n\n```sh\nnib apps update --app my-app --extra-public-port --env 'ANNOUNCED_IP=${NIBRUN_PUBLIC_IPV4}'\n```\n\n## Cron jobs\n\nRegister jobs through `crontab` from the binary's normal server startup. nibrun's agent keeps\nthe schedule and wakes an idle app to run it; in-process timers only run while the app is awake.\nFor Bun apps, see [Bun's cron documentation](https://bun.com/docs/runtime/cron) and use\ncrontab-backed scheduling. A task command should do its work and exit without starting the\nserver or registering jobs again.\n\n- Maximum **10 jobs per app**, in **UTC**. Use standard five-field crontab syntax or nicknames such as\n `@daily`; no seconds field or `@reboot`.\n- `/mnt/artifact/server` is the uploaded binary. Commands run through `/bin/sh` as the app user\n in `/app`, inherit deployment environment, and send stdout/stderr to app logs.\n- Registration replaces the entire table. `crontab -l` reads it; `crontab -r` removes it.\n- Every new deployment clears schedules, including binary upgrades and settings redeploys\n through `nib apps update`. Register them again at startup. Settings edits that create no\n deployment preserve schedules.\n- Manual suspension disables execution but keeps schedules visible. Runs may overlap; missed\n runs are not replayed and failures are not retried.\n\nInspect with `nib apps crons --app my-app` (add `--json`) or the dashboard's **Crons** tab.\n\n## Tradeoffs\n\nWorth saying out loud before recommending it:\n\n- **New apps sleep after five minutes without incoming traffic.** The next request wakes them.\n In-process timers and outbound polling pause while asleep; registered [cron jobs](#cron-jobs)\n can wake the app and keep it awake until they finish. Owners cannot change activation through\n the CLI, API or dashboard. For an always-on app, email [hello@nibrun.com](mailto:hello@nibrun.com).\n- **One microVM per app, one size.** No horizontal scaling, no load balancing, no resizing.\n- **A deploy is a replace.** The old VM is stopped before the new one starts, because they share\n one volume. New HTTP requests wait for up to 60 seconds for the replacement to become healthy;\n a failed or slower deployment returns an error. In-flight requests and existing WebSockets can\n still disconnect. No blue/green or canary.\n- **A local disk, not a distributed one.** Ideal for SQLite, uploads, caches. It is not\n replicated, so an export (`nib apps export`) is your backup.\n- **The binary is the unit.** The guest boots yours and nothing else — no sidecar, no cron\n container, no managed database next to it.\n- **256 MiB and 1 vCPU**, sized by nibrun rather than configured by you, and the OOM killer\n reaches for the tenant first.\n- **Health is a TCP connect** to that port, and not something you configure. A process that accepts\n connections while broken reads as healthy.\n- **A crash loop is fatal.** The guest restarts your process on a fixed budget you do not set;\n once it runs out the app is `failed` rather than restarted forever.\n\nIt fits a single-binary app that owns its own state — an internal tool, a small SaaS, a demo, a\nside project. It does not fit anything that needs to be several machines.\n"
}SHA-256 of public snapshot: 048c733a05b196d15b0efd7eb837659a86f54dde78fe067d15354711e1870369