Background server and key storage
Start, stop, configure, pair, and rotate keys for the local background Executor server with executor service.
The local background Executor is a single per-data-directory server that every local executor command and the desktop app share (Local only; Self-host runs in Docker and Cloud is managed for you).
Run executor service start to start the background server without opening a browser, and executor service status to inspect its URL, version, and process ID.
Prerequisites: Executor 2.0.0-beta.79 installed via the command line or the desktop app. On macOS, Windows, or desktop Linux, unlock your OS credential store when prompted on first launch so Executor can save its keys.
You’ll know it worked when executor service start prints http://127.0.0.1:4312 (or your configured port) and executor service status prints http://127.0.0.1:4312 (version 2.0.0-beta.79, process <pid>).
Manage the background server
The first command that needs the local server starts it: executor, executor service start, or any client command run without a remote host (such as executor apps list or executor search). It keeps running until you stop it or restart your computer.
| Command | Purpose |
|---|---|
executor service start |
Start the background server, or confirm it is running, and print its URL. |
executor service stop |
Stop the background server. |
executor service restart |
Stop the background server and start this installed version. |
executor service status |
Print its URL, version, and process ID (starting, stopping, or not responding while transitioning), or stopped. |
executor service get [<key>] [<name>] |
Print all settings as JSON, one setting (port, env, or disabled), or one env variable. |
executor service set <key> <value> [<env-value>] |
Change a setting and stop the background server so the next start picks it up. |
executor service unset <key> [<name>] |
Remove a setting (or one env variable) and stop the background server. |
executor service pair |
Print a fresh connection link for the running background server. |
executor service rotate-key |
Replace the saved local API key. Run executor service restart to apply it, then update clients that used the old key. |
executor service pair waits up to 30 seconds if the server is starting, stopping, or temporarily unresponsive. It is read-only: it never starts Executor or creates a data directory or keys. If EXECUTOR_API_KEY is set in your shell, pair sends that key to the running background server (or to the server on EXECUTOR_PORT when no background server is running).
Settings stored in service.json
| Setting | Purpose |
|---|---|
port |
Listening port (default 4312). EXECUTOR_PORT takes precedence. Each data directory needs its own port. |
env |
Extra environment variables passed to the background server: executor service set env <name> <value> and executor service unset env <name>. |
disabled |
Set to true to make executor and hostless client commands run a temporary private server (like --standalone) instead of the background server. executor service start, executor service pair, and the desktop app still use the background server. |
Changing port or env, or setting disabled to true, stops the running background server; the next command that needs it starts it with the new settings. The background server inherits the environment of the command that starts it plus env from service.json, so store persistent values such as EXECUTOR_BROWSER_ORIGIN in env. EXECUTOR_API_KEY and EXECUTOR_ENCRYPTION_KEY are forwarded to the background server only when both are set; EXECUTOR_API_KEY alone is used only as the caller’s request key.
Inside the data directory (default ~/.executor/v2/cli), service.json stores port, env, and disabled (user-only), server.json records the running URL, PID, and per-start shutdown token (user-only), and .server.lock prevents a second server from opening the same directory.
Foreground, standalone, and remote modes
executor serveruns the local server in your terminal until Ctrl+C without opening a browser (stop the background server first). Other local commands use it while it runs.executor --standaloneruns a private server on a free port for one command until Ctrl+C. Stop the background server first or setEXECUTOR_DATA_DIRto another folder.executor --server <url>opens the dashboard of an already-running local server at<url>, usingEXECUTOR_API_KEYor the saved local API key.
Sharing with the desktop app
The desktop app shares the same background server and ~/.executor/v2/cli data directory. Stopping it from the CLI (executor service stop or changing a setting) shows it as stopped in the desktop app without restarting it automatically; it reconnects when a CLI command starts it or you click Start.
Older desktop releases kept a separate data folder. On first launch, a newer desktop app moves that data into ~/.executor/v2/cli once without merging: if CLI data already existed there, desktop data replaces it and the old CLI folder (with apps, accounts, and service.json) moves to ~/.executor/v2/backups/cli-data-<time>. Non-conflicting settings carry over except port (which uses the desktop port) and data-bound env variables (EXECUTOR_PORT, EXECUTOR_KEY_STORAGE, EXECUTOR_API_KEY, EXECUTOR_ENCRYPTION_KEY). The old desktop folder moves to ~/.executor/v2/backups/desktop-data-<time> (or stays in place on another drive). If the desktop app had never started successfully, CLI data is untouched.
Configure it
| Variable | Purpose |
|---|---|
EXECUTOR_PORT |
Port to listen on. Overrides port in service.json; default 4312. |
EXECUTOR_DATA_DIR |
Data directory path. Default ~/.executor/v2/cli. |
EXECUTOR_KEY_STORAGE |
file or os: choose key storage for a brand-new data directory. |
EXECUTOR_API_KEY |
Supplied local API key (at least 32 characters). Must be paired with EXECUTOR_ENCRYPTION_KEY. |
EXECUTOR_ENCRYPTION_KEY |
Supplied credential encryption key (exactly 64 hexadecimal characters). Must be paired with EXECUTOR_API_KEY. |
EXECUTOR_BROWSER_ORIGIN |
Exact HTTPS origin used when generating browser links. |
EXECUTOR_WEBHOOK_ORIGIN |
Exact HTTPS origin that receives app webhooks. |
EXECUTOR_NO_UPDATE_CHECK |
Set to 1 to skip the daily npm check for a newer release. |
DO_NOT_TRACK or EXECUTOR_DISABLE_ANALYTICS |
Set to 1 to disable anonymous usage analytics and feedback. |
Key storage
On first launch of a new data directory, Executor generates a local API key and credential encryption key and saves them in macOS Keychain, Windows Credential Manager, or Linux Secret Service under com.usefulsoftware.executor.v2 (account ID in installation.json).
- No OS credential store: On headless Linux without Secret Service or GNOME Keyring, Executor saves keys in
keys.json(mode0600) inside the data directory. Keep that directory private. - Locked or denied OS store: If an OS store exists but is locked or denied, Executor stops without writing
keys.json. Unlock it (gnome-keyring-daemon --unlockon Linux orsecurity unlock-keychainon macOS) and restart. - Explicit choice on a new directory: Set
EXECUTOR_KEY_STORAGE=fileto forcekeys.json, orEXECUTOR_KEY_STORAGE=osto require the OS store. Existing directories never switch key storage; a mismatch fails startup. - Supplied keys: Provide both
EXECUTOR_API_KEY(≥32 chars) andEXECUTOR_ENCRYPTION_KEY(64 hex chars) before first start and on every start. Executor never writes supplied keys to disk or the OS store.
Back up your data and keys
Back up the entire data directory (installation.json and *.pglite) with its key source: the com.usefulsoftware.executor.v2 OS credential matching installation.json, the private keys.json inside the directory, or your supplied keys in your secret manager. Copying only the database is not enough; missing keys stop startup and Executor never generates replacements for an existing installation.
Example
Start the background server, change its port and an environment variable, rotate its local API key, and verify status:
executor service start
executor service status
executor service set port 14312
executor service set env EXECUTOR_NO_UPDATE_CHECK 1
executor service get
executor service rotate-key
executor service restart
executor service status
Expected output from executor service status after restart:
http://127.0.0.1:14312 (version 2.0.0-beta.79, process 3488)
To restore the default port and stop the server:
executor service unset port
executor service stop
executor service status
# stopped
Limits
- The background server does not auto-start on OS boot; MCP clients connecting to
http://127.0.0.1:4312/mcpreceive connection refused after a reboot until you runexecutororexecutor service start. - If a background server is running an older version than the CLI you invoke,
executorstops it and starts its own version, whereas other subcommands use whichever version is already running. - On Windows, package managers (
npm,pnpm,bun,yarn) cannot replace binaries of a running process; runexecutor service stopbefore upgrading outsideexecutor upgrade. executor service settakes positional arguments (executor service set port 14312), not flags.