Skip to content
Paulus1337 edited this page Jul 28, 2026 · 3 revisions

Web UI & APIs

The first-flight wizard offers all of this, or set it by hand:

[http]
enabled = true
port = 8787
bind = "127.0.0.1"          # who can reach it, see below
token = "long-random-string"
web = true
username = "you"
password = "strong-passphrase"

Who can reach it

bind Reachable from
127.0.0.1 (default) this machine only, safest
0.0.0.0 every IPv4 interface, your whole network
:: every interface, IPv4 and IPv6

Anything other than loopback is a real exposure. Phoenix refuses to start if you bind to the network with the web UI on but no username and password, so you cannot accidentally publish an open chat box.

  • Chat in the browser at http://localhost:8787. Basic auth is required: no credentials, no UI, on purpose.
  • HTTP API: POST /run with {"prompt":"..."} returns {"reply":"...","media":[]}. Send the bearer token.
  • Health check: GET /health returns {"ok":true}, handy for a monitor or a container probe. It needs the token too.
  • Webhooks: POST /hook/NAME. Point your server monitor, CI or doorbell at it; the body becomes an event phoenix reacts to.
  • WebSocket: connect to /ws, send {"prompt":"..."} frames, get {"reply":"..."} back. Build your own client in an afternoon.
  • Canvas: phoenix can render pages and dashboards at /canvas.

Quick check with curl:

curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8787/health
curl -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" \
     -d '{"prompt":"say hello"}' http://localhost:8787/run

Expose it to the internet only behind HTTPS (reverse proxy), with the token and password set. Security has the checklist.

Clone this wiki locally