mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-28 14:07:55 +00:00
All three deployment methods bound 0.0.0.0:8000 with no API key, so following
the README produced a server reachable from any device on the network with no
auth. `check_bind_safety` already refuses to start a non-loopback bind without
a key (so these configs actually failed to start) — this wires the key in so
the documented path yields a *working, authenticated* server.
- docker-compose.yml: require `OPENJARVIS_API_KEY` via `${VAR:?...}` so
`docker compose up` fails fast when unset; added `deploy/docker/.env.example`
(un-ignored in .gitignore).
- systemd: add `EnvironmentFile=/etc/openjarvis/env` (no `-` prefix, so a
missing key file blocks startup rather than exposing an open server).
- launchd: bind `127.0.0.1` by default (the personal-device default — no
network exposure, no key needed) with a documented, commented opt-in to
0.0.0.0 + `OPENJARVIS_API_KEY`. Avoids shipping a usable default credential.
- Docs (docker/systemd/launchd) updated with the key-setup step.
- Tests assert each config can't reintroduce an open server, plus
`check_bind_safety` behavior across loopback/public × key/no-key.
Closes #221
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>com.openjarvis</string>
|
|
<!-- Binds loopback only: the personal-device default, reachable from this
|
|
Mac but not the network, so no API key is required. To expose it on
|
|
your LAN, change the host below to 0.0.0.0 AND uncomment the
|
|
EnvironmentVariables block to set an API key (an unauthenticated
|
|
0.0.0.0 server will refuse to start). -->
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>/usr/local/bin/jarvis</string>
|
|
<string>serve</string>
|
|
<string>--host</string>
|
|
<string>127.0.0.1</string>
|
|
<string>--port</string>
|
|
<string>8000</string>
|
|
</array>
|
|
<!--
|
|
<key>EnvironmentVariables</key>
|
|
<dict>
|
|
<key>OPENJARVIS_API_KEY</key>
|
|
<string>REPLACE_WITH_A_REAL_KEY</string>
|
|
</dict>
|
|
-->
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>KeepAlive</key>
|
|
<true/>
|
|
<key>StandardOutPath</key>
|
|
<string>/tmp/openjarvis.stdout.log</string>
|
|
<key>StandardErrorPath</key>
|
|
<string>/tmp/openjarvis.stderr.log</string>
|
|
</dict>
|
|
</plist>
|