LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

preloop-server

Standalone Preloop control plane for local GitHub Actions

TLDR

Serve the control plane on loopback port 8080
$ preloop-server serve
copy
Listen on another address and keep state in a chosen directory
$ preloop-server serve --listen [127.0.0.1:9090] --state-dir [~/.preloop]
copy
Store runs in Postgres
$ preloop-server serve --store [postgres://localhost/preloop]
copy
Write a self-signed certificate pair for TLS
$ preloop-server cert --output [./certs]
copy
Serve HTTPS with that pair
$ preloop-server serve --tls-cert [certs/cert.pem] --tls-key [certs/key.pem]
copy
Turn on the cron scheduler for schedule workflows
$ preloop-server serve --enable-scheduler
copy

SYNOPSIS

preloop-server serve [options]preloop-server cert [--output dir]

DESCRIPTION

preloop-server is the standalone control-plane binary for Preloop, a local GitHub Actions engine. It accepts workflow runs over the actions/runner protocol and stores them. The official GitHub runner and the companion preloop-runner binary can register against it.It is not preloop serve. That CLI command embeds this same server library and also starts the microVM pool. This binary calls serve with no runner pool and no GitHub funnel, so it does not boot job microVMs by itself. Install scripts from the Preloop repo place preloop, preloop-server, and preloop-runner together in ~/.local/bin.serve is the long-running process. cert writes cert.pem and key.pem (no OpenSSL required) and prints the serve flags that use them. Logs follow RUST_LOG, which defaults to info. PRELOOP_LOG_FORMAT selects pretty, json, or auto.The control-plane crate is FSL-1.1-MIT (source-available, converts to MIT two years after each release). The rest of the Preloop tree is MIT.

PARAMETERS

--listen addr

TCP address for serve. Default 127.0.0.1:8080
--state-dir dir
State directory. Default .preloop
--store url
Durable store. Also PRELOOP_STORE_URL
--record-flows file
NDJSON file of recorded flows
--tls-cert file / --tls-key file
PEM certificate and private key. Each requires the other
--tls-self-signed
Ephemeral self-signed certificate. Local development. Conflicts with --tls-cert
--enable-test-api
Privileged local simulation endpoints. Loopback only
--test-api-token token
Bearer for those endpoints. Requires --enable-test-api
--oidc-issuer url
OIDC issuer URL for minted tokens
--enable-scheduler
Cron scheduler for schedule-triggered workflows
--unix-socket path
Extra Unix domain socket. Also PRELOOP_UNIX_SOCKET
--output dir
Directory for cert. Default .

COMMANDS

serve

Bind the control plane and keep running. Default listen address is 127.0.0.1:8080. Default state directory is .preloop in the current working directory. --store is a sqlite URL, a bare filesystem path, or a postgres URL. When omitted, the store URL is read from PRELOOP_STORE_URL, then SQLite under the state directory. --record-flows file appends NDJSON of recorded HTTP flows. --tls-cert and --tls-key are PEM paths and must be set together. --tls-self-signed makes an ephemeral certificate for local development and cannot be combined with --tls-cert. --enable-test-api turns on privileged simulation endpoints and is loopback only; --test-api-token is the bearer for those endpoints and requires the test API. --oidc-issuer is the issuer URL for tokens this server mints. --enable-scheduler runs the cron scheduler for schedule-triggered workflows. --unix-socket path also listens on a Unix socket (or PRELOOP_UNIX_SOCKET)
cert
Write a persistent self-signed cert.pem and key.pem. --output is the directory (default .). The command creates the directory if needed

ENVIRONMENT

RUST_LOG

Log filter. Defaults to info when unset
PRELOOP_LOG_FORMAT
pretty, json, or auto
PRELOOP_STORE_URL
Default for --store
PRELOOP_UNIX_SOCKET
Default for --unix-socket
PRELOOP_REQUIRE_JOB_ASSIGNMENTS
When 1, true, or yes, the server requires job assignments. Default is off

CAVEATS

This process does not start the microVM pool. A workflow that needs an isolated job VM still needs preloop serve, or a runner registered against this server. The default port is 8080; the preloop CLI expects an engine on 127.0.0.1:9090 unless PRELOOP_URL says otherwise. The default state directory is relative to the working directory, not ~/.preloop. --enable-test-api must stay on loopback. The control-plane licence forbids offering this binary as a hosted CI service that competes with Preloop.

HISTORY

preloop-server is the Cargo bin of crate preloop-runner-server in preloopdev/preloop. The preloop CLI links that crate in-process for preloop serve rather than executing this binary.

SEE ALSO

preloop(1), preloop-runner(1), runner-watch(1), act(1), gh(1), git(1)

RESOURCES

Copied to clipboard
Kai