# Machines and shared connections

The desktop app pairs with your other computers, servers and containers. Each machine keeps its own threads, files and model connections. A thread runs on the machine it started on. You can share this computer’s model connections with every paired machine, so each one has the same models.

## Pair a machine

1.  On the machine you want to reach, open Settings → Machines and choose Show pairing code.
2.  Copy the pairing link.
3.  On this computer, open Settings → Machines, paste the link under Add a machine, and choose Add.

A server or a container prints its pairing link with `muniment-server pair`. Add a machine also reaches a server over SSH. Pairing uses each machine’s own encrypted link over your network, Tailscale or SSH, and needs no account. Each machine shows its shape in the list: a laptop, an all-in-one, a desktop, a server or a container.

## Where a thread runs

The machine picker beside the composer chooses where a new thread starts. The thread stays on that machine and uses its models, files and tools. When a machine cannot answer, its threads wait, and a new thread starts on this computer.

## What a pairing allows

A pairing link lets this computer read the machine’s threads, start runs there, and update it. Changing the machine’s own settings, such as its model providers, needs admin access. A link grants admin access only when the person who creates it chooses that. When a request needs access the pairing lacks, the app names what is missing.

## Share model connections

Turn on Share model connections under the machine list. Each paired machine then uses the providers, sign-ins and API keys connected on this computer, beside its own. A connection the machine holds itself always wins. Connections travel over each pairing’s encrypted link, every five minutes and whenever a machine connects.

Some providers replace a sign-in’s refresh token each time it is used, so two holders of one sign-in sign each other out. For those providers, only this computer refreshes the sign-in, and each machine receives an access token with at least 30 minutes left. A shared subscription therefore depends on this computer: when it sleeps or goes offline, a paired machine can lose the subscription within 30 minutes, until this computer is back. Shared API keys keep working.

## Keep them in MuniCloud

Sign in from the desktop app with your [MuniCloud account](/docs/account/), and turn on Keep them in MuniCloud. The account’s model vault holds the connections encrypted, and it alone renews each sign-in, so paired machines keep their models while this computer is off. Each machine receives its own machine token and reads the vault itself. An account shares with up to five machines, and a paired phone counts among them. The account’s Overview page lists your machines and the models connected, never their keys, and removes a machine. Turning MuniCloud off returns every connection to this computer and deletes the vault and its machine tokens.

## Remove a machine

Choose Remove in a machine’s menu. This computer gives up its access there, and the machine deletes every connection this computer shared. The machine’s own threads and connections stay on it.
