Worker

Configuration

Worker configuration comes from three sources, merged in order (later wins):

  1. Built-in defaults compiled into the daemon.
  2. Config file at ~/.pendra/config.yaml (Unix) or %ProgramData%\Pendra\config.yaml (Windows).
  3. Environment variables.

pendra setup writes the config file interactively; pendra config set <key> <value> mutates it directly. Env vars are re-read on every CLI invocation and at daemon startup.

Example config file

~/.pendra/config.yaml
# ~/.pendra/config.yaml
app_server_ws_url: wss://api.pendra.ai
gpu_worker_private_key: <base64-ed25519-private-key>
worker_id: wrk-a1b2c3d4
worker_name: tom-mac
max_concurrent: 1
models_dir: ~/.pendra/models
ollama_endpoint: http://localhost:11434
vllm_endpoint: ""
lmstudio_endpoint: ""
speaches_endpoint: ""

The file holds the Ed25519 private key in plaintext, so the daemon enforces mode 0600 on Unix and warns at startup if it's wider.

Settings reference

Env varConfig keyDefaultPurpose
APP_SERVER_WS_URLapp_server_ws_urlwss://api.pendra.aiBase URL the daemon dials; /ws/gpu is appended automatically.
GPU_WORKER_PRIVATE_KEYgpu_worker_private_keyBase64 Ed25519 private key from the console. The daemon refuses to start without one.
WORKER_IDworker_idauto wrk-<hex>Stable ID across restarts. Persisted on first run.
WORKER_NAMEworker_namehostnameFriendly name shown in the console.
MODELSmodels(serve all)Filter to a subset of discovered models. JSON array of IDs or {id} objects.
MAX_CONCURRENTmax_concurrent1Cap on in-flight inference requests. No longer surfaced in pendra setup or the console — set it in config.yaml or via the env var only if you have a reason to depart from the one-at-a-time default. Clamped to [1, 64].
PENDRA_MODELS_DIRmodels_dir~/.pendra/models (Unix), %ProgramData%\Pendra\models (Windows)Directory the built-in Pendra backend serves GGUFs from. pendra models install downloads into this directory; pendra models dir prints the resolved path.
OLLAMA_ENDPOINTollama_endpointauto-discover :11434Optional external backend. Empty = auto-discover. off/0/false = disable.
VLLM_ENDPOINTvllm_endpointauto-discover :8000Optional external backend. Same semantics, port 8000.
LMSTUDIO_ENDPOINTlmstudio_endpointauto-discover :1234Optional external backend. Same semantics, port 1234.
SPEACHES_ENDPOINTspeaches_endpointauto-discover :8000Optional Whisper-family transcription backend. Shares vLLM's default port; the worker disambiguates via /v1/audio/voices.
SPEACHES_HF_CACHE_DIRspeaches_hf_cache_dirPath to the HuggingFace hub cache Speaches downloads into (when the worker and Speaches share a Docker volume). Enables byte-level install progress; optional.
INSECURE_TLSinsecure_tlsfalseSkip TLS cert verification for the WebSocket. Local dev only.
UPDATE_URLbaked-inOverride the appcast URL the self-updater polls.

Backend selection

For each *_endpoint setting, three semantics apply:

  • Empty / unset → auto-discover (probe localhost then host.docker.internal on the default port).
  • Explicit URL → use that URL directly. Auto-discovery is skipped; the daemon fails loudly if the URL is wrong.
  • off, 0, false, none, no (case-insensitive) → disable the backend.

CLI commands

CommandPurpose
pendra / pendra runStart the worker daemon.
pendra statusConnection, backend, and model info for the running worker.
pendra configPrint resolved config and the file path it loaded from.
pendra config set <key> <value>Mutate the config file.
pendra setupInteractive setup wizard.
pendra modelsList models served by your backends.
pendra models install <model>Install a catalogue model into a supported backend.
pendra logsTail the worker's log buffer (-f follows). The OS-supervised service is managed with systemctl / launchctl / Services.msc.
pendra doctorDiagnostics — checks backend health, config, and the live worker connection.
pendra updateSelf-update from get.pendra.ai.

Related