Remote access
This guide lets you use nocturn away from home, from the app and a browser, and pair another device. It assumes nocturn serve runs at home and one phone is paired (Getting started). nocturn has no cloud service and no TLS of its own: you bring a VPN or an HTTPS reverse proxy.
| Way | You need | Typing secrets from outside | Push not needed |
|---|---|---|---|
| VPN into the home network | WireGuard or similar, ending at home | yes, if the VPN hands out a private address | yes |
| HTTPS reverse proxy on the daemon's machine | a name, a certificate the phone trusts | yes | yes |
| HTTPS reverse proxy on another machine or container | the same | no: set secrets from home or on the machine | yes |
Through a VPN
- Set up a VPN that ends in your home network, for example WireGuard on your router.
- On the phone, connect the VPN, open the app, tap Enter address and type the daemon's home IP address and port
8080.
Everything works as at home. Typing a secret value works only if the VPN hands out a private address (10.x, 172.16–31.x, 192.168.x); 100.64.0.0/10 does not count, and the app then shows the command to run on the machine instead.
Through an HTTPS reverse proxy
1. Run the proxy
Run it on the same machine as nocturn. It serves TLS for a name such as nocturn.home.example, forwards to http://127.0.0.1:8080 with WebSocket upgrades, and sends X-Forwarded-Proto: https. Caddy does all of that, with a certificate from Let's Encrypt:
nocturn.home.example {
reverse_proxy 127.0.0.1:8080
}Use a certificate the phone trusts: the app refuses a self-signed one.
2. Allow the name
The daemon answers only names it knows: IP addresses, localhost and .local names. Add yours and restart nocturn:
NOCTURN_HOSTNAMES=nocturn.home.exampleWithout it, requests through the proxy get 403 unknown host — set NOCTURN_HOSTNAMES to allow this name.
3. Connect
In the app, tap Enter address and type https://nocturn.home.example. The port becomes 443, and the sheet says it connects with TLS to wss://nocturn.home.example/ws. In a browser, open https://nocturn.home.example/.
Only MCP from outside
To let an MCP client in from outside and nothing else, publish /mcp and no other path.
Pair another phone or a browser
- On the new device, connect to the daemon. A browser opened at the daemon's address goes straight to pairing.
- Under Other way, tap Ask beside Ask a device that is already paired.
- On a paired phone, open the Inbox: it shows "… wants to pair" with a six-digit code. Type that code on the new device.
Or run nocturn pair on the daemon's machine and type the code it prints:
nocturn pair
nocturn pair --addr https://nocturn.home.example # the link carries that addressPaste such a link whole into the app's Enter address: it connects with TLS and pairs. A browser cannot be woken for approvals, so keep a phone paired.
Take a device's access back
Every paired device is listed under Settings › Devices. Tap a lost phone and choose Forget; it loses access at once and has to pair again.

