How it works: P2P hole punching and end-to-end encryption
How RemoHop connects two devices directly: what the rendezvous server does, the connection paths and the order they are tried in, the default ports, the six steps of a connection, and why only the two ends can read a session. For the details, see the How it works guide and the security model.
In short: the host and the controller first talk to the RemoHop rendezvous server (remohop signal) for ID registration, presence, NAT type detection and the exchange of candidate addresses. Then both send UDP probes to each other at the same time to punch through their NATs, and set up a direct QUIC connection on the first path that answers, end-to-end encrypted with TLS 1.3 + CPace password authentication (bound to the Ed25519 identity keys). Remote desktop, terminal, files and every other feature are multiplexed over that one session. The host also asks its router to map its port, and the ports of symmetric NATs that allocate in sequence are predicted, so most networks connect directly. If nothing gets through, the connection switches to the (optional) relay within about 1.5 seconds; the relay only forwards ciphertext, and the session moves back to a direct path, without a break, once one works.
Connection diagram
RemoHop rendezvous server remohop signal
signal.remohop.com:
- Assigns IDs and tracks presence (9-digit ID ↔ Ed25519 identity key)
- NAT type detection (21117/udp) and candidate address exchange
- Optional: relay (off by default), websocket bridge (for networks that only allow HTTPS out)
- Sees only ciphertext and cannot impersonate either end (CPace + key pinning)
- 1Register / heartbeat
- 2Look up ID, swap candidates
- 1 Register / heartbeat
- 2 Receive the peer's candidates
Controller your device A
Desktop app · web console · iOS / Android · command line · AI (MCP)
- IDEnters
- 707 612 667
- IPLocal address
- 192.168.1.20
- Public mapping
- 203.0.113.5:54321
Identity: an Ed25519 key; the peer's key is pinned after the first connection
Direct P2P · end-to-end encrypted QUICstraight between the two devices, not through the server
Host your device B
Windows · macOS · Linux · headless servers · Android · iPhone / iPad (view only)
- IDDevice ID
- 707 612 667
- IPLocal address
- 10.0.0.234
- Public mapping
- 198.51.100.8:21118
Temporary password / pairing / access scopes · can ask for approval on every connection
What the session carries (never via the server)
- Remote desktop video, H.264 / AV1, up to 4K and 144 fps
- Keyboard and mouse (key repeat, shortcuts)
- Opus audio
- Terminal and background jobs
- Files (resumable transfers)
- Two-way clipboard sync
- Port forwarding / VPN / mesh networking
- Serial ports, USB, screenshots
Special networks and options
- Connect by address: enter address:port, no server at all
- Tailscale: preferred when both sides are on the same tailnet
- NAT64: IPv6-only networks (such as Apple's app review network)
- Refuse relays:
remohop config relay off
Reliability
- Survives short network drops; a broken session reconnects by itself
- A relayed session keeps punching in the background and moves to a direct path without a break
- The phone apps restore their sessions after the system ended the app
- Host changes network or address: registered again within seconds
- Works on small-MTU networks (starts at 1200 bytes)
- A peer that vanishes is noticed within about 25 seconds
Connection paths: direct first, the relay last
All of the host's candidates (LAN, public, mapped port, predicted ports, IPv6, Tailscale) are probed at once, and the first path that answers wins, LAN first; if none has answered after 1.5 s, a relay is set up in parallel. remohop <ID> ping shows which path a session uses.
① LAN
lanSame network, direct connection; the data never leaves the LAN
set up in a few ms
② Direct and punched
directpunchedStraight to a host with a public address; behind NATs both sides send at once to punch through, which almost always works with cone NATs
set up in about 30–60 ms
③ Router port mapping
The host asks its router to forward its UDP port (PCP, NAT-PMP or UPnP), so a client behind any NAT, even two symmetric NATs, connects directly.
remohop config portmap offturns it offmapped within about 3 s
④ Port prediction
A symmetric NAT that hands out its ports in sequence (common on home routers and carrier NATs) has its next ports predicted, and a cone NAT on the other side probes them
up to 48 predicted ports
⑤ Relay
relayed(optional)Only when nothing else gets through; forwards ciphertext only. The session keeps punching in the background and moves to a direct path by QUIC connection migration, without a break or a new login
takes over within about 1.5 s
⑥ Websocket bridge (optional)
Networks that only reach the web (HTTPS on 443); there is no punching through the bridge, so it is always relayed
tens of ms once remembered
Key components
| Component | What it does |
|---|---|
| remohop signal | Rendezvous server: IDs, presence, punch coordination, optional relay |
| remohop host | Host: registers, authenticates, serves what each grant allows |
| remohop <ID> | Command-line controller: resolves, punches, connects, authenticates |
| RemoHop App | The desktop app for Windows, macOS and Linux (controller and host in one window, with Quick Support for one-off help), and the iOS / Android apps |
| remohop web | Web console: full control from a browser |
| remohop mcp | Lets AI agents operate a computer safely |
Main ports (defaults)
| Port | Protocol | Used for |
|---|---|---|
| 21116 | UDP | Rendezvous server (QUIC) |
| 21117 | UDP | NAT type detection |
| 443 | TCP | Websocket bridge (optional, behind a reverse proxy) |
| Your range | UDP | Relay (optional, --relay-ports) |
| Random / fixed | UDP | Host P2P port (fix it with --listen; mapped on the router when it agrees) |
Protocols and technology
- UDP hole punching (low-TTL priming, simultaneous probes) + QUIC
- TLS 1.3 encryption; CPace password authentication binds TLS to both identities
- Pairing tokens: no password after pairing, revocable at any time
- Access scopes (view only / control / files / allowed commands) + audit log
- Hardware encoding: NVENC / QSV / AMF / VideoToolbox / VAAPI
How a connection is set up
- Register: the host registers with the rendezvous server using its Ed25519 identity, gets its 9-digit ID and keeps sending heartbeats.
- Start: the controller enters the ID (or an address:port directly, with no server).
- Exchange: the server sends both sides each other's candidate addresses (LAN / public / router-mapped / IPv6 / Tailscale), NAT types and port predictions.
- Punch: both send probes at the same time and the first path that answers wins (LAN first); with no path after 1.5 s, the relay is tried in parallel, and a later punch moves the session back to direct.
- Authenticate: CPace runs over QUIC (TLS 1.3); the password or pairing token never crosses the network. The host can ask for approval.
- Session: desktop, terminal, files and the rest are multiplexed over one encrypted session that reconnects after a drop.
NAT hole punching
- Both sides register with the rendezvous server, which sees each one's public address and port.
- The server tells each side the other's candidate addresses, and both send UDP probes to each other at the same time.
- Each outgoing probe opens a hole in its own NAT, so the other side's packets can come in.
- Cone NATs can almost always be punched; symmetric NATs that allocate ports in sequence are reached by port prediction; with a port mapped on the router, even two symmetric NATs connect directly. Only when none of this works is the relay used.
Session security and protocol details
| Item | Details |
|---|---|
| Encryption | TLS 1.3 inside QUIC; CPace authentication bound to this connection |
| Identity | Ed25519 keys, pinned on first connection; a change raises a warning |
| Access | Temporary password / pairing / time-limited grants; unknown devices can only watch by default |
| Video | H.264, AV1; BT.709 colour; on a LAN 15 Mbit/s at 1080p, 27 at 2K, 60 at 4K |
| Audio | Low-latency Opus (20 ms frames) |
| Releases | Open source (AGPL); cosign signatures; macOS builds signed, notarized and checked byte for byte |
Key takeaways
- The rendezvous server only handles registration, presence and punch coordination (and the optional relay); it never touches plaintext.
- Once punched, data flows directly between the two devices, end-to-end encrypted.
- No account needed, and you can skip the server entirely by connecting to an address.
- One program: controller, host, server, web console and AI interface, all self-hostable.
- The experience depends mostly on NAT type and network quality; if no direct path works, the relay takes over within 1.5 s and hands the session back to a direct path once one opens.
What runs in one session
- Remote desktop2K / 4K · low latency
- Terminalbackground jobs
- Filesresumable
- Clipboardtwo-way sync
- VPN / meshport forwarding
- Quick supportno install
- AI (MCP)agent interface