Automatically configure LAN networking without installer prompts

This commit is contained in:
2026-10-09 22:04:17 +01:00
parent a3e4d7817a
commit de3a3c2363
8 changed files with 219 additions and 17 deletions
+2
View File
@@ -10,6 +10,8 @@ in the Docker volume, not your host OpenCode account. Re-run to update while
preserving `.env`, tokens, histories and volumes. Use `--relogin` to connect another
provider. No fixed OpenCode Go login is required. Health/publishing checks do not
prove model inference or phone reception.
LAN IP, phone-facing ntfy URL and listen IP are detected/configured automatically;
there are no networking questions. Advanced URL/bind/timezone flags remain optional.
The steps below are for manual setup or a local Pipelines server with Docker ntfy.
+6 -4
View File
@@ -20,8 +20,9 @@ Docker provisioning, service registration, or background processes are involved.
Re-running installation updates the binaries and bundled OpenCode skill without
changing databases, login, or OpenCode configuration files.
Docker mode prompts for the phone-facing ntfy base URL, explicit bind IP, and
timezone if it cannot be detected. It preserves an existing `.env`, bootstraps
Docker mode detects the computer's LAN IPv4 address and timezone automatically,
configures `http://LAN_IP:8090`, and binds ntfy to that LAN interface without asking
for networking settings (timezone falls back to UTC). It preserves an existing `.env`, bootstraps
the publishing/phone accounts and publishing token, builds the server, installs
the skill inside the container, and opens **container OpenCode provider login**
on first setup. Choose any supported provider; signup is handled by that provider.
@@ -34,11 +35,12 @@ Phone reception/model inference are not verified by installation.
For fresh configuration you can supply `--ntfy-url https://ntfy.example.com
--bind-address 127.0.0.1 --timezone Europe/London --port 8081` directly to `./install.sh`.
Use a LAN/VPN interface IP instead of loopback for direct phone access; only use
The defaults are ready for direct phone access on your trusted LAN. Only use
plain HTTP on a trusted network. Existing `.env` settings are never silently
replaced. Docker is also the default without a terminal; setup fails rather than
silently falling back to native binaries if required setup input is unavailable.
silently falling back to native binaries if the LAN address cannot be detected.
Use an interactive terminal for first Docker/provider setup.
Ctrl+C cancels cleanly without deleting configuration, credentials or volumes.
Install native mode as well if you want host CLI/TUI binaries; Docker mode installs
the server and CLI in its image. See [Docker setup](docker.md).
+7
View File
@@ -34,6 +34,13 @@ Provider-account inspection/login completion was mocked in that installer test.
A separate real-container PTY invocation of `opencode auth login` displayed its
searchable provider choices and was canceled without credentials. Provider login,
model inference and phone delivery remain **not tested**.
LAN-default checks cover physical-interface selection on Linux/macOS, rejection of
loopback/public/link-local/Tailscale fallback addresses, prompt-free configuration,
timezone fallback, and clean Ctrl+C exit with configuration retained. Actual host
LAN detection and `.env` generation were executed without networking input.
The isolated Docker ntfy endpoint was also reached through the detected LAN IP:
health succeeded, anonymous publishing was denied, and authenticated publishing
succeeded. These host-side checks do not prove reception on another device.
Consequential-action regressions check run/retry/cancellation and CLI publication/
draft deletion confirmation, default-No behavior, JSON stdout cleanliness, and