Skip to content

Configuration

The Hub and Runners read environment variables. Where you set them:

How kndl runsHubRunner
An install~/.kndl/hub.env~/.kndl/runner.env
A checkoutpackages/hub/.env.local, or the environmentthe environment

kndl onboard writes the env files. After changing one, restart its service with kndl hub install or kndl runner install. A value already in the environment wins over .env.local.

VariableDefaultWhat it does
HOST127.0.0.1The address the Hub listens on.
PORT7777The port the Hub listens on.
HUB_PUBLIC_URLhttp://localhost:5173Where browsers reach the Hub. GitHub sends people back here after sign-in, cookie-authenticated requests must come from this origin, and pairing links carry it.
HUB_DATABASE<home>/hub.db; packages/hub/hub.db in a checkoutThe SQLite database.
HUB_WEB_DIRpackages/web/distThe web UI’s build, which the Hub serves. Without one, the Hub warns at startup and its pages answer 503.
HUB_SECRETS_KEYunset32 random bytes in base64, from kndl secrets key. Encrypts Sensitive values, people’s Claude credentials and MCP servers’ keys. Unset, none can be saved. Once any are saved, the Hub refuses to start without the same key. If it’s lost, see secrets-reset.
GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRETunsetThe GitHub App’s client ID and secret, for GitHub sign-in. Set both or neither.
GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY_PATHunsetThe GitHub App’s ID and the path to its private key, for Repo access, clones and Sandbox tokens. Set both or neither. Unset, GitHub sign-ins have access to no Repo. The Hub checks the App’s permissions as it starts and every hour.
GITHUB_WEBHOOK_SECRETunsetThe App’s webhook secret, which onboard saves. The Hub doesn’t read it.
KNDL_DEV_LOGINoff1 turns on dev login, which signs anyone in as any name without GitHub. The Hub refuses to start with it unless HOST and HUB_PUBLIC_URL are both loopback.
KNDL_DEV_USER$USER, else devWho dev login signs you in as when you give no name.
HUB_INSECURE_COOKIESoff1 drops Secure from the Hub’s cookies when HUB_PUBLIC_URL is plain HTTP. Sign-in tokens then travel in cleartext. See Reach the Hub from other machines.
HUB_SLEEP_AFTER_MS900000 (15 minutes)How long an idle Session stays Active before the Hub puts it to sleep. See Going to sleep.
HUB_ARCHIVE_RETENTION_MS2592000000 (30 days)How long an Archived Session can be restored before the Hub purges it.
HUB_REPO_ACCESS_TTL_MS300000 (5 minutes)How long the Hub trusts GitHub’s answer about someone’s access to a Repo, and how often it checks again. See Who can do what.
HUB_MCP_SERVER_CHECK_TIMEOUT_MS5000 (5 seconds)How long a Session’s start waits on each MCP server’s check. One that doesn’t answer in time doesn’t stop the start.
KNDL_HOMEunsetThe home. See Homes.
VariableDefaultWhat it does
HUB_URLhttp://127.0.0.1:7777The Hub. The Runner connects to /ws/runner on it, over wss: for an https: URL.
RUNNER_TOKENrequiredThe Runner’s token. kndl runner join writes it. Never reaches a Sandbox.
RUNNER_NAMEthe short hostnameThe name the Runner says hello with.
RUNNER_SESSIONS_ROOT<home>/sessionsWhere each Session’s directory goes.
RUNNER_TMUX_SOCKETkndl; kndl-dev in a checkoutWith RUNNER_SESSIONS_ROOT, marks the Sandboxes this Runner makes, so Runners sharing a machine keep to their own.
RUNNER_MOD_DIRpackages/mod in the checkoutThe mod Claude Code loads. The Runner refuses to start if it isn’t built.
RUNNER_REPO_URLhttps://github.com/{repo}.gitWhere Repos are cloned from. {repo} is owner/name.
RUNNER_SANDBOX_IMAGEdocker:dindThe image of a Session whose Repo has no Environment.
RUNNER_SANDBOX_CLAUDE_VERSIONthe version this kndl is tested withThe Claude Code version Sandboxes run. Another may not work with the mod.
RUNNER_SANDBOX_CLAUDE_CACHE<home>/claude-codeWhere the Runner keeps Linux builds of Claude Code.
RUNNER_SANDBOX_MAX_CPUSthe host’s CPU countThe most CPUs a Sandbox gets, whatever its Environment asks for.
RUNNER_SANDBOX_MAX_MEMORY_MIBhalf the host’s memoryThe most memory, in MiB, a Sandbox gets.
RUNNER_SANDBOX_KEEP_BUILDS3How many Builds of each Repo’s Environment the Runner keeps.
RUNNER_RELAY_PORTRUNNER_PROXY_PORT if set, else 7778; 7779 in a checkoutThe port of the Runner’s mod relay on the host’s loopback. If it’s taken, the Runner logs an error and runs without the relay.
RUNNER_UPDATE_ANY_COMMITunset1: follow the Hub to a commit that isn’t on origin/main, such as a Hub on a branch. See Keep Runners on the Hub’s commit.
KNDL_SERVICEunsetSet to runner or hub by the service files kndl installs. A Runner updates itself only when it’s set and the Runner runs from <home>/app.
CLAUDE_CONFIG_DIRunsetRead as Claude Code reads it: the Runner looks there for what Claude Code on this machine kept of Sessions from before they ran in Sandboxes.
KNDL_HOMEunsetThe home. See Homes.

An install keeps its state in its home, ~/.kndl. A checkout uses the dev home, ~/.kndl-dev, so the two can share a machine. KNDL_HOME names another home. A variable that names a path wins over the home’s.

SettingAn installA checkout
RUNNER_SESSIONS_ROOT~/.kndl/sessions~/.kndl-dev/sessions
RUNNER_SANDBOX_CLAUDE_CACHE~/.kndl/claude-code~/.kndl-dev/claude-code
RUNNER_TMUX_SOCKETkndlkndl-dev
RUNNER_RELAY_PORT77787779
HUB_DATABASE~/.kndl/hub.dbpackages/hub/hub.db

See Files and paths for everything in a home.

The install script a Hub serves at /cli, and the binary it installs, read these. See Install the CLI from a Hub.

VariableDefaultWhat it does
KNDL_BIN_DIR~/.local/binWhere the install script puts kndl.
KNDL_URLthe Hub’s HUB_PUBLIC_URL originThe Hub to download from and record, when your machine reaches it at another URL.
XDG_CONFIG_HOME~/.configWhere the CLI keeps kndl/cli.json, with the Hub and its CLI token.
KNDL_NO_SELF_UPDATEunsetSet to anything, the binary never updates itself to the Hub’s commit.
VariableDefaultWhat it does
HUB_URLhttp://127.0.0.1:7777The Hub that Vite passes /auth, /health, /runner/ and /ws to.
VITE_FAKE_HUBunset1 runs the web UI against an in-process fake Hub with made-up Sessions. signed-out starts it signed out.
VariableDefaultWhat it does
KNDL_SANDBOX_ITunset1 adds the tests that boot real microsandbox Sandboxes to bun test.

The variables a Runner gives Claude Code in a Sandbox are in Inside kndl.

kndl is an independent project. It is not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic, PBC. About kndl