Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

erebus build

Package an app directory into a single self-extracting .erebus executable.

erebus build [OPTIONS] [APP]

APP defaults to .. The output is app.erebus unless -o is given (a trailing slash appends app.erebus to the directory).

Runtime selection

The runtime is auto-detected from the app directory (Python, Binary). Override the detected interpreter with --embed-interpreter (for example python3 for Python, or the path to a native binary).

Common options

FlagDescription
-o, --output <PATH>Output file (default app.erebus)
-k, --key <PATH>Ed25519 signing key (32 raw bytes)
--isolation <MODE>Isolation level: none (0), sandbox (1), hard (2) (default sandbox)
--seccompInstall a seccomp BPF denylist at runtime
--landlockEnable Landlock LSM filesystem sandbox
--encryptEncrypt the payload (AES-256-GCM, key derived from signing seed)
--squashfsUse SquashFS instead of zstd+tar for the payload
--no-installSkip dependency installation
--env-file <PATH>Bake in a KEY=VALUE env file
--env KEY=VALUESet an env var (repeatable)
--define KEY=VALUEBuild-time define, injected as an env var (repeatable)
--version-info <STR>Version string recorded in metadata
--author <STR>Author string recorded in metadata
--description <STR>Description recorded in metadata
--license <STR>License string recorded in metadata
--include <PATH>Extra files/dirs to embed in the rootfs (repeatable)
--dry-runPrint the build plan without building
--jsonEmit a JSON build result on stdout
-v/--quietVerbose / quiet output

.env and secrets: an app directory containing a .env file is rejected unless you pass --include <app>/.env explicitly. The file is excluded from the payload by default because its secrets would be extractable from the redistributable binary by anyone who holds it. Prefer --env-file / --env to bake configuration into the binary metadata, and reserve --include .env for cases where bundling the file is the app’s intended deployment model.

SISR options (incremental self-updates)

FlagDescription
--enable-sisrEnable delta-indexing: content-chunk the payload, embed a SISR section and write <output>.manifest
--key <PATH>With --enable-sisr: signs the SISR manifest instead of the binary
--update-url <URL>Base URL of the update channel; embedded in the binary and used by --erebus-update
# Updatable binary: SISR section + signed manifest + embedded update channel
erebus build ./my_app -o my_app.erebus \
    --enable-sisr \
    --key ~/.erebus/keys/<fingerprint>.key \
    --update-url https://updates.example.com/my_app

This produces two artifacts:

  • my_app.erebus — the self-extracting binary (payload is content-addressed; unchanged chunks can be reused in place during an update);
  • my_app.erebus.manifest — the signed XBMR remote manifest that the launcher fetches and verifies before applying an update.

Publish both, plus the chunk files, to the update channel so target machines can run ./my_app.erebus --erebus-update (see User-updates).

Signing semantics

The Ed25519 key file is the same 32 raw bytes used by erebus sign. When --enable-sisr is given, --key signs the manifest (the SISR footer carries the signature; the launcher verifies it against your trusted keys). Because the binary signature block would be inserted after the metadata and truncate the SISR section, a single erebus build signs either the binary (no --enable-sisr) or the manifest (--enable-sisr), never both. The private key bytes are never printed; under Unix a key file that is not mode 0600 produces a warning.

Behavior

  1. Detects the runtime and installs dependencies (--no-install to skip).
  2. Copies the app into a rootfs, optionally embedding an interpreter.
  3. Creates a deterministic zstd+tar payload (or SquashFS).
  4. Builds metadata (env, entrypoint, hashes, update_url).
  5. Assembles the binary — with --enable-sisr the payload is content-chunked (64 KiB targets) and the signed manifest is emitted.

Dry run

--dry-run prints the full plan — runtime, isolation, compression, SISR, package managers, file count — without building anything:

erebus build ./my_app --enable-sisr --update-url https://… --dry-run

See also