Devices: the desktop's GPU from the laptop, with no relay
How twinny pairs two of your own computers over an encrypted peer-to-peer link so a laptop can use a desktop's models, and what happens when hole-punching fails.
A laptop is a fine place to write code and a poor place to run a 14B model. Most people who own a GPU own it in a desktop under a desk. Devices lets twinny on the laptop use the model server on that desktop over a direct encrypted connection, with nothing exposed to the internet and no account in the middle.
How it works
Each side has a key pair. The desktop’s public key is its address. A distributed hash table maps that key to wherever the desktop currently is, so the link survives an IP change. Pairing exchanges public keys once, through a short-lived code shown on the desktop, and after that the desktop only answers keys on its trusted list.
laptop desktop
twinny provider ─▶ loopback gateway ═══════▶ twinny node ─▶ model server
(P2P client) encrypted UDP
On the laptop, a small gateway on the loopback interface turns ordinary HTTP requests from twinny’s providers into messages over the peer connection. Providers created from a device point at that gateway, so nothing else in twinny needs to know it is talking across the room, or across the country.
On the same network the connection is direct. Across networks it is hole-punched through NATs with help from the DHT. There is no relay server: if hole-punching fails, the connection fails. That is a deliberate choice. A relay would be a third party your prompts pass through, and this feature exists so that there is none.
On the desktop
The model server must be running with the models you want. Then share it in one of two ways. From VS Code, Providers → Devices → Share: twinny starts a node inside the extension, shows a pairing code, and keeps sharing after a restart until you stop it. For a headless box, twinny-node is a command line built from the repository that does the same without VS Code:
twinny-node --name "Home RTX 3090"
Only one VS Code window per profile runs the node; others take over if that window closes.
On the laptop
Enter the pairing code. The desktop appears as a Twinny device (P2P) provider and can be used for chat, autocomplete and embeddings like any other. Mix it with local providers as you like: a tiny completion model on the laptop for latency, the desktop for chat.
When a team needs this
Devices is for one person’s computers. When several people want to share one machine, the team gateway is the right tool: keys, usage, a queue for a busy GPU, and an admin page. The two compose: a gateway can pool teammates’ computers as backends.
The reference, including the CLI options and the ports involved, is at Devices.