openvibers/openvibe.bot .env.example
.env.example
| 1 | # ═══════════════════════════════════════════════════════════════ |
| 2 | # openvibe.bot — Environment Configuration |
| 3 | # Copy to .env for development. In production this lives at /etc/openvibe/bot.env (0600). |
| 4 | # Names only here; never commit a value. |
| 5 | # ═══════════════════════════════════════════════════════════════ |
| 6 | |
| 7 | # Server |
| 8 | PORT=4630 |
| 9 | HOST=127.0.0.1 |
| 10 | NODE_ENV=development |
| 11 | BASE_URL=http://localhost:4630 |
| 12 | TRUST_PROXY=1 |
| 13 | |
| 14 | # ── Data: PostgreSQL + Valkey (ADR-035) ────────────────────── |
| 15 | # In production OpenVibe.Host writes all four (roles/data/add-service.sh bot). Unset in development: |
| 16 | # an embedded PGlite database in data/pglite (one process). Tests need neither. |
| 17 | DATABASE_URL= |
| 18 | DATABASE_DIRECT_URL= |
| 19 | VALKEY_URL= |
| 20 | VALKEY_PREFIX=ov:bot: |
| 21 | |
| 22 | # ── Identity: OpenVibe.Network ────────────────────────────── |
| 23 | OV_NETWORK_URL=https://openvibe.network |
| 24 | OV_NETWORK_INTERNAL_URL=http://127.0.0.1:4000 |
| 25 | #OV_NETWORK_ISSUER=https://openvibe.network |
| 26 | # Optional: pin the Network's RS256 public key (PEM, \n escaped) instead of fetching the JWKS. |
| 27 | #OV_NETWORK_PUBLIC_KEY= |
| 28 | # Audience Bot accepts on incoming service tokens. |
| 29 | BOT_AUDIENCE=openvibe.bot |
| 30 | OV_OAUTH_CLIENT_ID=bot |
| 31 | OV_OAUTH_CLIENT_SECRET= |
| 32 | #OV_OAUTH_REDIRECT_URI=https://openvibe.bot/auth/callback |
| 33 | #COOKIE_SECURE=true |
| 34 | |
| 35 | # ── OpenVibe.Events ───────────────────────────────────────── |
| 36 | # Relay of Bot's outbox (bot.*); off when unset (rows wait in bot_event_outbox). |
| 37 | #EVENTS_URL=http://127.0.0.1:4300 |
| 38 | # OpenVibe.Events → Bot (ADR-033 account export and deletion): signs a delivery to POST /internal/events |
| 39 | # (comma-separated for rotation, 32+ characters each). Unset: the route answers 503 and no subscription is created. |
| 40 | #BOT_EVENTS_SECRET= |
| 41 | #EVENTS_RELAY_INTERVAL_MS=2000 |
| 42 | |
| 43 | # ── Pairing and device link (ADR-043) ─────────────────────── |
| 44 | # Who mints pairing codes: bot (the default) or network. Any other value refuses to boot. |
| 45 | #BOT_PAIRING_AUTHORITY=bot |
| 46 | #BOT_PAIRING_TTL_MS=600000 |
| 47 | #BOT_PAIRING_MAX_TRIES=5 |
| 48 | #BOT_HEARTBEAT_MS=1000 |
| 49 | # A person's input on a machine's screen holds it for them this long; an agent's input there is refused meanwhile (ms). |
| 50 | #BOT_PERSON_TURN_MS=15000 |
| 51 | # Vibe by voice (server/voice.js): OpenVibe.Chat's loopback origin (empty turns voice off) and questions a machine an hour. |
| 52 | #BOT_CHAT_INTERNAL_URL=http://127.0.0.1:4400 |
| 53 | #BOT_VOICE_PER_HOUR=30 |
| 54 | #BOT_OFFLINE_MISSES=2 |
| 55 | #BOT_OFFLINE_GRACE_MS=3000 |
| 56 | #BOT_ROTATE_GRACE_MS=60000 |
| 57 | #BOT_NODE_REAUTH_MS=330000 |
| 58 | |
| 59 | # ── Control ───────────────────────────────────────────────── |
| 60 | #BOT_MAX_COMMAND_MS=300 |
| 61 | #BOT_HOLD_RESEND_MS=150 |
| 62 | #BOT_TELEMETRY_HZ=2 |
| 63 | #BOT_QUEUE_TURN_MS=60000 |
| 64 | #BOT_QUEUE_TURN_BUDGET=50 |
| 65 | #BOT_CONTROL_COOLDOWN_MS=0 |
| 66 | |
| 67 | # ── Limits / jobs / installer ─────────────────────────────── |
| 68 | #BOT_LIMITS_MINUTE=120 |
| 69 | #BOT_LIMITS_HOUR=3000 |
| 70 | #BOT_JOBS=on |
| 71 | #BOT_JOBS_INTERVAL_MS=5000 |
| 72 | #BOT_INSTALLER_URL=https://openvibe.link/install |
| 73 | # Where GET /install redirects (302): OpenVibe Link's installer script. Defaults to the checksummed asset on |
| 74 | # OpenVibe Link's latest release (install.sh, pinned there by its CI cmp guard so it never drifts with main). |
| 75 | # https on raw.githubusercontent.com, github.com, objects.githubusercontent.com or openvibe.bot only; anything |
| 76 | # else refuses to boot. |
| 77 | #BOT_INSTALLER_SOURCE_URL=https://github.com/OpenVibers/OpenVibe.Link/releases/latest/download/install.sh |
| 78 | # The WHIP ingest base each device publishes to; whip_url = <base>/<publish key>. Unset or empty: pair without video. |
| 79 | # In production this is OpenRestream's WHIP ingest, https://ingest.openre.stream/whip (O30); the key must be one |
| 80 | # OpenRestream issued (BOT_OPENRE_* below), or the ingest refuses the device. |
| 81 | #BOT_WHIP_BASE=https://example.invalid/whip |
| 82 | # OpenRestream, which issues each robot's publish key (its stream's ingest key). Bot mints its own Network |
| 83 | # service token (audience openvibe.openre) from OV_OAUTH_CLIENT_ID/SECRET and OV_NETWORK_INTERNAL_URL, holding |
| 84 | # openre.stream.read, openre.stream.write, openre.key.rotate and openre.session.read/openre.output.read/ |
| 85 | # openre.output.write (session and outputs, for panel video and restreaming). BOT_OPENRE_TOKEN overrides it |
| 86 | # with an operator-minted service token of the same grant. BOT_OPENRE_URL unset: devices pair without video. |
| 87 | #BOT_OPENRE_URL= |
| 88 | #BOT_OPENRE_TOKEN= |
| 89 | #BOT_OPENRE_TIMEOUT_MS=8000 |
| 90 | |
| 91 | # ── Server-side ONVIF cameras (camera.onvif) ──────────────── |
| 92 | # A JSON object keyed by robot id (or "*" for any ONVIF-profile robot) → its camera's ONVIF PTZ service. |
| 93 | # Bot connects server-side, writes a kind server device row and translates ptz commands to ONVIF; the profile |
| 94 | # carries no host or credential. username_ref/password_ref name the environment variables (or secret-store |
| 95 | # keys) holding the ONVIF user and password; the values are read per request and never stored or logged. The |
| 96 | # URL must be http(s), on one host, with no embedded credentials, or Bot refuses to boot. |
| 97 | #BOT_ONVIF_CAMERAS={"rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X":{"url":"http://192.168.1.50/onvif/ptz_service","username_ref":"CAM_USER","password_ref":"CAM_PASSWORD"}} |
| 98 | #BOT_ONVIF_TIMEOUT_MS=5000 |
| 99 | |
| 100 | # ── OpenVibe.Billing: job usage (plan T14 L1) ─────────────── |
| 101 | # Where the per-second readings of jobs run on paired Links go: billing.usage.record, POST <url>/api/v1/usage. |
| 102 | # Bot mints its own Network service token (audience openvibe.billing, capability billing.usage.record) from |
| 103 | # OV_OAUTH_CLIENT_ID/SECRET and OV_NETWORK_INTERNAL_URL; BOT_BILLING_TOKEN, an operator-minted service token of |
| 104 | # the same grant, overrides it. BOT_BILLING_URL unset: readings wait in run_usage_outbox (never dropped) and a |
| 105 | # later relay delivers each once. |
| 106 | #BOT_BILLING_URL=http://127.0.0.1:4600 |
| 107 | #BOT_BILLING_TOKEN= |
| 108 | #BOT_BILLING_INTERVAL_MS=2000 |
| 109 | #BOT_BILLING_TIMEOUT_MS=5000 |
| 110 | |
| 111 | # ── OpenVibe.AI: the models on people's machines (ai-metrics.md) ─ |
| 112 | # Every `ai` command's answer is one ai.call-report@1 to AI's POST <url>/api/v1/usage/calls, so the local models on |
| 113 | # a person's machine are in the same meter as every other AI call. Bot mints its own Network service token (audience |
| 114 | # openvibe.ai, capability ai.usage.report) from OV_OAUTH_CLIENT_ID/SECRET and OV_NETWORK_INTERNAL_URL. Unset (or no |
| 115 | # client secret): metering is off and an ai command's answer is unchanged. |
| 116 | #OV_AI_INTERNAL_URL=http://127.0.0.1:4700 |
| 117 | |
| 118 | # ── Embeddable panel (plan T15 R9) ────────────────────────── |
| 119 | # Pages that may frame a robot's read-only panel (CSP frame-ancestors), comma or space separated. Each entry is a |
| 120 | # bare https origin (no path, query or wildcard); http://localhost:<port> is accepted outside production only. |
| 121 | # An invalid entry stops the service at boot. Default: OpenVibe.Live. A robot is embeddable only after its owner |
| 122 | # turns on "embed_public" on its panel. The embedding page must also allow Bot's origin (BASE_URL, https://openvibe.bot) |
| 123 | # in its own CSP frame-src, or the browser refuses the frame. |
| 124 | #BOT_EMBED_ORIGINS=https://openvibe.live,https://www.openvibe.live |
| 125 | # The anonymous read-only /watch socket behind the embed: open sockets per client address and watchers per robot. |
| 126 | #BOT_WATCH_MAX_PER_IP=20 |
| 127 | #BOT_WATCH_MAX_PER_ROBOT=500 |
| 128 | |
| 129 | # OpenVibe Link for Android: the published download (the signed release APK), https on GitHub releases or openvibe.link. |
| 130 | # Unset until the owner's release key exists: /link/phone then says the app is in testing and mints no code. |
| 131 | # LINK_ANDROID_APK_URL=https://github.com/OpenVibers/OpenVibe.Link/releases/download/vX.Y.Z/openvibe-link.apk |
| 132 |