Network and remote access
Keep it on this machine, share it on your LAN, or reach it from a phone.
By default the gateway answers only on 127.0.0.1:7477, so only the machine it runs on can reach it. Everything below is a deliberate step away from that.
Who can reach it
- 1This machine onlyThe default: loopback
- 2The local networkAll interfaces, with
allowrules - 3EverywhereAll interfaces, no origin rules
Each step outward is deliberate, and the token is always required. Past loopback, put https in front.
The first gateway start asks once, and Settings → Network or motita gateway setup changes it later:
| Answer | Result |
|---|---|
| This machine only (default) | Loopback. |
| The local network | Listens on all interfaces, with allow: ["lan", "!any"]. |
| Everywhere | Listens on all interfaces with no origin rules. |
gateway.allow is an ordered list of rules (lan: the private, link-local and tailnet ranges; an address, a network, each optionally prefixed with !). The first match wins, and loopback is always allowed so you cannot lock yourself out. The token stays the real key; the rules say where it may come from.
Reaching it safely
- SSH tunnel.
ssh -N -L 7477:127.0.0.1:7477 the-hostmakes ithttp://localhost:7477on your computer, with nothing exposed. - Tailscale. If Tailscale is running, motita can publish the gateway with
tailscale serve: https on your tailnet name, reachable only from your own devices. Funnel (the public internet) is never used. - A TLS reverse proxy such as Caddy in front of a loopback gateway, or the gateway's own second https listener (
gateway.tls).
Your other computers
Every computer running a gateway can be opened from any other: the sidebar lists them under Other computers, and picking one shows its sessions and projects, with how many runs it has in flight. They are found on their own on the local network and in your tailnet; across another VPN, Add a computer takes the address.
- Ask it. Leave the token empty: the other computer shows a six-digit code that this one shows too. Compare them and pick Allow.
- No screen there? On a server reached over SSH or a VPN,
motita gateway computerslists who is asking with the codes, andmotita gateway allow 123 456(ordeny) answers. - Or its token:
motita gateway start -token-onlyon that computer prints it.
Gateways talk to each other over TLS and pin each other's certificate, and only private networks are dialled. The other computer must answer the network (the local network in motita gateway setup) and let its port (7477) through its firewall; when nothing answers, the error says which to check.
Why https matters
Browsers allow the microphone, desktop notifications and phone push only on https or localhost. A phone on the LAN over plain HTTP gets none of those, which is the usual reason to set one of the options above.
Notifications
When a pull request's CI ends, the page shows a toast. Phone notifications use standard Web Push from the gateway itself, so they arrive with the page closed. On an iPhone or iPad the page must be added to the Home Screen first (iOS 16.4 or later). Settings → Notifications has a test button for the whole path.