Skip to content

Remote access and security

omfp is not designed to be exposed on the public internet. Whoever reaches the daemon with its token can do everything you can: read and write your files, run shell commands as you through the agents, use your logins to model providers. Treat the daemon like an SSH server without a second factor, and keep it where only you can reach it.

  • It listens on 127.0.0.1:7420: only programs on the same machine can connect.
  • Every window, the desktop app and omfp call authenticate with one token, kept in <data>/token (~/.local/share/omfp/token). The UI’s URL carries it after #token=, so do not share that URL.
  • The token is the same for every device and has no expiry. To revoke it (a lost phone, a URL pasted where it should not be), stop the daemon, delete <data>/token and start it again: it makes a new one, and every window has to be opened again with the new URL.

Reaching omfp from a phone or another computer

Section titled “Reaching omfp from a phone or another computer”

Leave the daemon on 127.0.0.1 and bring the other device to it through something that authenticates it first:

  • A VPN (WireGuard, Tailscale, Headscale, ZeroTier): the phone joins your private network and opens the daemon’s address there. With Tailscale, tailscale serve 7420 publishes the loopback port to your tailnet only, with HTTPS.
  • An SSH tunnel from the other computer: ssh -N -L 7420:127.0.0.1:7420 you@your-machine, then open http://127.0.0.1:7420/#token=… there.
  • A reverse proxy with real authentication in front of the daemon (single sign-on, client certificates, an identity-aware proxy such as Cloudflare Access or oauth2-proxy), over HTTPS, forwarding to 127.0.0.1:7420. Add the proxy’s origin with --allowed-origin <origin> so the daemon accepts its windows.

Avoid --listen 0.0.0.0:… (or any public address) on a network you do not control, and never forward the daemon’s port on your router: the token alone would then stand between the internet and a shell on your machine.

Agents read web pages, issues and files written by others, and that text can try to instruct them. Threads run without asking for approval unless you choose otherwise: pick an approval mode per thread (see Approvals), and give a thread that reads untrusted text a restricted set of tools (threads.create { tools: [...] }), or none.