Repository navigation
NETWORK
Status: Partial
Last Updated: 2026-11-13
Audience: Developers and coding agents
Last verified: 2026-11-13 against 5f40af2d9 (pinned pairing, 20-second sync interval, and friend marker; discovery, revocation, and route restrictions not rechecked)
Code: src/Martlet.Core/Network/, src/Martlet.Gateway/GatewayNetwork.cs, src/Martlet.HostClient/NetworkSync.cs, src/Martlet.HostClient/HostNetwork.cs, src/Martlet.Desktop/MainWindow.Network.cs
Pair a host once and every computer you own can use it. The owner's desktops and hosts form one Martlet network: hosts trust every member desktop, and member desktops pair with every host of the network by themselves. A Linux machine you set up over SSH from one PC is ready on all your PCs a moment later, without anyone logging in to it or typing a code on the other PCs.
The network is what makes Martlet one app on all your computers: each host you add brings what it runs (thinking, listening, speaking, lip-sync, Home Assistant) to the whole app, and its gateway keeps a private copy of Martlet's shared settings, memories, people, voices and characters for your other computers.
| You do | What happens |
|---|---|
| Pair your first host (Add a computer: this PC with Docker Desktop, a Linux computer over SSH, or a typed code) | This PC starts your network and adds the host to it |
| Pair another host on any member PC | It joins the network; every other member pairs with it by itself within a minute. A member that can't hear of it from a host it reaches finds it on your home network (below) |
| Install Martlet on another PC and choose it under Add a computer › Martlet on your network on that PC (or pair it with any one host of the network by code or SSH). On a new PC, Home offers this first: Connect to your other computers | Both screens show a six-digit check number. Allow it on the computer with the hosts (Martlet on your network, or Share › Your Martlet network for a PC that paired another way; Turn down refuses). Allowing it from Martlet on your network also lets it into the network, with no second Allow. Then the new PC pairs with every host by itself, including hosts added later. Nothing needs to be set up on the new PC first: it pairs, then follows who does what and your shared settings, so its jobs go to your hosts |
| Pair your main PC with a member PC's own host service (Pair your main PC on a host PC, or this PC's host service on a companion) | It joins the network by itself: the pairing code (or Allow) showed only on that member PC, so the owner already approved it there and no second Allow is asked. It then pairs with every host by itself |
| Remove from network on another PC | Every host revokes it; it forgets the network's hosts. To come back it asks again (with a new key) |
| Remove from network on a host | It stops trusting the network's PCs and they forget it. Pair it again with Add a computer to bring it back: the jobs and Thinking pool members that used it work again with the new pairing |
| Forget a host on one PC | Only that PC stops using it (and won't pair with it again by itself); the rest of the network keeps it |
Sync runs every 20 seconds while Martlet is open (and right after a pairing or a change on the card), next to the who does what sync. A host that runs an older Martlet still works for the PCs paired with it, but can't join the network until it is updated (Update host).
Every host announces the Martlet release it runs in its network answer, so an update reaches every computer that syncs with it on its next sync (within 20 seconds), whoever made it: this PC, another of your computers, or Martlet on that host PC updating itself and then its host service. Each PC then shows the new release on the host's card (Details › Martlet), drops the runs an older Martlet item on Home and the Update available mark on the map, turns the card's note on an update it had asked for into Updated to Martlet 0.22.0 (seen at ...), and says so in the status line (gpu-pc was updated to Martlet 0.22.0.). It stops retrying an update the host no longer needs. A PC on an older release than the host sees 0.23.0, newer than this PC (0.22.0). Update this PC to 0.23.0. instead. Hosts from before this announcement report their release only when a PC checks them (Check connection), as before.
Every computer shows which computers use each of its hosts, whether or not they are in the network yet. Each host reports the computers paired with it and when each last used it (active now within two minutes, otherwise the time; a host that restarted knows only from the next request). The Devices page shows them on each host (Computers using it, or Used by on this PC's own host service), and Your Martlet network (on the Share page) lists members with where they were last active and computers that use a host but are not members. A host PC's Home lists the computers paired with its host service under Pair your main PC.
The Devices map draws the same computers on every one of them: this PC in the middle, every other member of the network (and every computer asking to join or using your hosts outside it) as its own device with where it was last active, your hosts, and the cloud services your jobs use. Each computer is one device, the same way on Windows, Linux (also a NAS) and macOS, and whether it runs the Martlet app, a host service or both. Its title is the name the computer gives itself: its host name in the case its owner set (Imouto, Nahida), not the capitalized Windows NetBIOS name (IMOUTO) or the host ID. Under the title is its host ID (imouto-host) when it runs a host service, else its device ID; both are short enough for a narrow card, and the details list the rest (Computer: Imouto (desktop-imouto), Host, Address). A device is named by, in this order:
- The Martlet app on that computer: each PC shares its name in its
pc.<device ID>entry (below), so a name that changed since it joined the network shows on every computer. - The host's machine report:
martlet-host(Linux natively or in Docker, a NAS) and the Mac host report the computer's own name ascomputer_name(natively the host name; in Docker the Docker host's name, or the name Martlet passed at setup on Docker Desktop, which names its engine docker-desktop). - Before a host reports it (an older host), the name its host ID was made from: Nahida-host shows as Nahida. A host ID chosen by hand (gpu-box) shows as it is.
A PC that runs its own host service shows the two together, named by what it is (Martlet companion or Martlet host PC). A model server on one of your computers (LM Studio on Nahida, say) shows on that computer, not as a device of its own. Home's notices and the recommended setup name computers the same way (Nahida isn't answering, Check Nahida now).
Every new host ID follows one rule, on every system (HostIds.ForComputer, and
host_id_for in martlet-host): the computer's name in lowercase, spaces as
-, only letters, digits, ., _ and -, then -host (Nahida:
nahida-host, Ada's MacBook Pro: adas-macbook-pro-host). A host ID never
changes once it exists, because pairings, certificates, the shared plan and
host-hardware.json use it: a host set up before keeps its ID (Nahida-host).
Each PC tells the others what it is
through the shared settings, under
its own pc.<device ID> entry (its role, the host service Martlet runs on it
and its name), so a companion PC that also runs a host service still shows the jobs it
does itself (Parakeet listening, say) and a host PC shows none. A computer on
an older Martlet hasn't said, so it shows as Martlet app and its host service
is matched by name (DIVA runs diva-host, or the host whose report names
the same computer). The Linux and macOS companion app doesn't join the Martlet
network yet (platforms), so such a computer shows only by its
host service. A host PC uses no jobs, so its map shows who does what from the
shared plan (a job a host does on that host, a cloud job on its
cloud service, a job that runs on each companion PC on those PCs) rather than
the Setup choice it kept from before it became a host. Before this, a host PC's
map showed only itself and its own old choices, and no computer showed the
other desktops. On any computer, another member's row on the map has Make it
a host PC (or Make it a companion PC) to switch that
computer
from here; Settings › What this PC is for lists the same computers with the
same button. A host PC with no host service yet says so on its row, because it
does no work for your other computers until someone at it sets one up.
A PC set up as a host (Use as a Martlet host) takes part in the network too:
- If it is already in a network (for example it started the network while it was a companion PC), it keeps syncing like any member, so it can still let your other computers in. Their requests to join show on its Home, right under Pair your main PC, with Allow and Turn down, as well as on the Devices card.
- If it is in no network, it only watches: it never starts or asks to join one by itself (and makes no network key), so the network of the main PC that pairs with its host service takes that host. It still lists who uses its hosts.
Before this, a host PC skipped the network sync entirely. A network started on a PC that later became a host could then let nobody in: the other PCs' requests waited for an Allow that no screen showed.
Linux hosts are managed from Windows (SSH setup, roles, updates, Prepare this computer, see the host guide); they have no web UI of their own. Every PC in the network can use a host; the PC that reaches it over SSH also manages it.
Your router can give a computer another address on your home network when it restarts (a new DHCP lease). Martlet finds your hosts again by itself, so you don't have to reserve addresses in your router. Nothing is paired again.
A host keeps the address it was paired at as its name: its certificate, its pairings, its service approval, the roster and every request use that name. Only the address that a connection dials changes.
-
The host follows its computer.
- A native Linux or Mac gateway listens on its computer's current home
address when the computer doesn't have the paired address
(
GatewayHomeListeners: private IPv4 addresses of adapters that have a default gateway, on the paired port, with the same TLS key). It checks every 10 seconds and when the addresses change, and stops when the paired address comes back. A gateway that starts before the network is up does the same instead of stopping. - On a Linux Docker engine the keeper (
martlet-host-keeper) runs in the Docker host's network. When the computer no longer has the address the network holder publishes the gateway on, it publishes it on the address the computer has now. The gateway's configuration and certificate don't change. - On a Windows PC with Docker Desktop, Martlet on that PC sees that its host
service is published on an address the PC no longer has (the host
dashboard said Address changed). It runs
martlet-host homeby itself, hidden, in Background tasks (Move this host to its new address), once for each new address. Set up again stays as the fallback. - A new holder doesn't take the gateway and roles with it: Docker keeps
them in the old holder's network. So
home(also the one the keeper starts after it moves the holder) recreates them in the new holder's network.warmandexposurealso recreate any that were left behind, so a warm-up never waits for a role that runs in the old network.
- A native Linux or Mac gateway listens on its computer's current home
address when the computer doesn't have the paired address
(
-
The host answers when your computers look for it. A native gateway, the
Docker keeper and Martlet on a host PC answer a find host question on
UDP 9444 (
HostFind):{"martlet":"find-host","v":1,"q":<random>}. The answer is{"martlet":"host-here","v":1,"q":...,"hosts":["<host ID>"]}: no addresses (the answer's source is the address), keys or other data. They answer private IPv4 and loopback senders only, at most 40 answers in 10 seconds. Martlet on a host PC answers in its Nearby responder, so it answers only while Let my other computers find this PC is on. Older Martlet versions ignore the question. -
Your computers find the host. When a paired host doesn't connect at its
saved address within 1.5 seconds (
HostRoutes), Martlet sends the question to each private subnet's broadcast address, the limited broadcast and loopback (never a subnet scan). It stops at the first answer, after 2 seconds at most, and looks again at most every 20 seconds for each host. It uses an address that answered only when the host there shows the TLS key pinned at pairing, for the paired name (HostRoutes.ProbeAsync). A computer with another key that answers for the host's ID is never used. -
Your computers keep the new address. The connection goes to the new
address at once, and the desktop keeps it with the pairing (
movedToinhosts.json), so it dials there first after a restart too. An SSH target that names the old address (me@192.168.1.20) moves with it, with a remembered sudo password. SSH runs then check the SSH host key saved with the paired host, so two computers that swap addresses don't cause SSH identity changed. When the host answers at its paired address again, Martlet forgets the other address.
A normal connection gets no extra wait: the saved address is dialed first, and a look starts only when it doesn't connect. Each computer looks for itself, so the shared roster doesn't change.
What you need: the host's computer and your PC on the same home network (the broadcast doesn't cross routers or VPNs), and a host firewall that lets UDP 9444 in from the home network. Native setup asks to open it next to the gateway's TCP port when ufw or firewalld is active. A Docker host's firewall (ufw) must allow it by hand, because Docker only opens published ports. Phones that paired with a host's address don't look for it yet.
A host's computer can get a new system: for example, the owner moves it to a new drive and installs Linux again. The new system has a new TLS key and a new SSH key, so your computers refuse it ("another key"). This keeps a stranger from taking a host's place. Martlet now recognizes the same computer and sets it up again by itself, with no Remove, Reset SSH trust or pairing code.
What each PC saves while the host works (HostRecognition, kept with the
pairing in hosts.json; the roster's format doesn't change, so older Martlet
versions are not affected):
-
TPM keys. A TPM is a security chip on the main board (most PCs from
2016 on; Windows 11 needs one). Martlet asks the chip for an ECDSA P-256
key made from a fixed template (
Tpm2, raw TPM 2.0 commands through/dev/tpmrm0on any Linux, or TPM Base Services on Windows). The chip makes the same key again after a reinstall, and the private key never leaves the chip. Martlet uses two: one in the endorsement hierarchy (it survives even a TPM clear) and one in the owner hierarchy. The desktop reads them about once a day atGET /martlet/v1/hardware?nonce=...and saves them only when they sign the TLS key it has pinned for the host. -
Hardware facts, for a computer without a usable TPM (an older PC, a NAS,
a TPM turned off in the firmware): the board's ID and serial number, the
physical network cards' addresses and the NVIDIA GPUs' IDs, read over SSH
about once a week (
MachineFacts). Martlet keeps only salted hashes, and placeholders such as To be filled by O.E.M. and random network addresses are left out. - Roles: the roles the host ran, to put them back.
What makes a computer the same one (ReinstallCheck):
- A TPM proof. The host signs its host ID, its new TLS key and the desktop's nonce with the saved TPM key. This proves the same chip, so it counts on any route: the home network, an outside address or Tailscale.
- Another computer. A proof that doesn't verify, a different board ID, or (on the home network) another network card that answers at the host's address in this PC's ARP table: Martlet stops.
- Without a TPM proof (no TPM, or the TPM was reset), the hardware facts must match: the same board ID, or at least two other facts. Martlet trusts this only on a route the owner's own network vouches for: the home subnet of one of this PC's adapters, or a Tailscale address (100.64.0.0/10) while this PC is on Tailscale too. Only devices in your tailnet have one.
- Anything else: Martlet stops and tells you.
Setting it up again (a Linux host Martlet reaches over SSH; desktop
MainWindow.HostReinstall.cs):
- Each paired host is checked every 2 minutes. A host that answers with another TLS key, or doesn't answer for 5 minutes, is checked over SSH.
- The same SSH key means the host is only down: Martlet does nothing. A new SSH key means a reinstall. Martlet looks only when the address it dials for the SSH target is on this PC's home subnet or on Tailscale. On another network numbered like home (a café, a friend's house), another network card answers at that address, so Martlet stops quietly. When it has no card to compare, it asks you at most once a day.
- Before it sends a password, Martlet checks the route again from the address it dials itself (never one the computer reports). On Tailscale it goes on. At home, the network card that answers at that address (this PC's ARP table) must be one it saved for the host; another card stops it. When it has no saved card to compare, the run window asks you to trust the new SSH key and shows its fingerprint. Then, in Background tasks (Set up aihost1-host again after a reinstall), it signs in with the remembered password and trusts that one new SSH key for this run only.
- It reads the hardware facts. If they show another computer, it stops before setup.
- It runs
martlet-host setupwith the old host ID (MARTLET_HOST_ID), in Docker or natively as before. A new system without Docker runs natively. - It asks the new gateway for its TPM proof and decides with the rules above. If the computer isn't shown to be the same one, it stops: the host is set up but not paired, and it gets no jobs, keys or settings.
- It pairs (the pairing's TLS key must be the one the proof signed), pins the new SSH key, saves the new keys and puts back each role that needs no key or token. Your other computers pair with the host by themselves.
- It tries again at most once an hour. A tray notice and
network_status(recognition.lastReinstall) say what happened.
What it needs:
-
The account password. Martlet signs in to the new system with a
password because its own SSH key is gone. When you set up a host over SSH,
keep Remember it, so Martlet can set this computer up again by itself after
you reinstall it ticked (it is on by default); the password is kept in Windows Credential Manager
(
Martlet/v3/ssh-login/<user>@<computer>:<port>). A remembered sudo password for the same account works too. Without either (a host set up before this version), the run asks you for the password once, with the same Remember box; if you cancel, it asks again an hour later. - The new system has an SSH server, the same user name and the same password, and it is at the same address or name (or on the same home network, where Martlet finds it by its address as usual).
-
TPM access on Linux. Setup and Update host give the account the
TPM on any distribution: a udev rule gives
/dev/tpmrm0thetssgroup, the account joins it, and an ACL (setfacl) lets the running service use it at once. A Docker host's gateway container gets--device /dev/tpmrm0and that group when the group may read and write it. Update your hosts before you reinstall them, so your PCs save their TPM keys first.
Risks and limits:
- Martlet sends the remembered password before the computer proves itself with its TPM. It sends it only to the network card it saw before at the host's address on your home network, over Tailscale, or after you trusted the new key. A device that copies that card's address could still catch it. It still gets no jobs, keys, memories or shared settings: those go only to a computer that passed the check. Don't use that password anywhere else.
- Hardware facts aren't secret like a TPM key. Someone who read them from the computer could copy them, so they count only at home or over Tailscale, and a TPM proof is preferred.
- A host that Martlet doesn't reach over SSH (set up at its own console, or a Mac or Windows host PC) is recognized but not set up again: a notice says it proved it is the same computer, and you set it up and pair it again there.
- A TPM reset by a firmware update (some AMD fTPM boards) or a TPM clear changes the owner key; the endorsement key and the hardware facts still recognize the computer.
MCP: host_reinstall_selftest rehearses all of this with real gateways
and a simulated TPM, and network_status shows what each PC saved
(pairedHosts[].recognition). See network tools.
Each computer learns the network from the hosts it reaches: it reads their copy of the roster and gives them its own. So a change normally reaches every member through a host they share. That failed when the computer that made the change couldn't reach any host the others use.
For example, MIKO added a NAS (Nahida-host) while it couldn't reach diva-host, imouto-host or miku-host. Only MIKO and the NAS knew the NAS. LUMINE had joined through those hosts after MIKO last reached them, so MIKO and the NAS didn't know LUMINE. Each computer showed another network, and nothing told the owner why. Now the network comes together as soon as any path exists:
-
Members find new hosts on the home network. About every 2 minutes (at
once when Martlet starts, and on Check now), a member PC asks the home
network which Martlet hosts are there: the same find host question as
above, for every host (UDP 9444,
never a subnet scan). It pairs by itself with each host that answers and
that its roster doesn't list, at the gateway's default port 9443 and the
ports of your network's hosts (
NetworkHostFinder). -
It trusts only what your computers signed. That pairing learns the
host's TLS key from the connection, because the roster doesn't have it yet.
The signed request names that key, so it is useless anywhere else. The PC
then reads the host's roster and takes only entries that desktops it
already trusts signed (
NetworkRoster.Accept). It keeps the host only when that roster lists the host with the key it showed. Otherwise it drops it. -
It brings its roster to a host that doesn't count it yet. A host
refuses a member it hasn't heard of (
network.denied). The member then pairs again with its own roster (rosterin the pairing request). The host takes the entries signed by desktops it already trusts, the same rule as every roster merge, and lets the member pair once its proof holds. A host on an older Martlet refuses the roster; update it (Update host). - The others follow. The member then gives the merged roster to every host it reaches, as on every sync, and the other members get it from there. In the example, LUMINE finds the NAS, pairs with it, and gives it LUMINE's roster. MIKO then learns LUMINE through the NAS, and DIVA learns the NAS through diva-host.
-
Hosts that aren't yours stay alone. A host of another Martlet network
refuses the pairing (
network.other); one in no network says so (network.unbound). The PC leaves it alone for 30 minutes and says how to bring it in (martlet-host network-reseton it, then Add a computer, or Add a computer for a host in no network).
Where your computers don't see the same network yet, each one says so and why:
-
Share › Your Martlet network shows a card above the list
(
NetworkGap): which of your computers aren't paired with a host, which hosts this PC couldn't reach to tell them, and the hosts on your home network that are outside your network. For example: Your computers don't all see the same network yet: DIVA and LUMINE aren't paired with Nahida-host yet, and this PC couldn't reach diva-host to tell them. Martlet 0.89.0 or newer finds new hosts on your home network by itself; otherwise check that diva-host is on and that this PC reaches it. A host row says the same about that host (Not paired yet: it didn't answer in time at 192.168.50.200:9443.). A member that no host here has seen for 12 hours says that a host added on it shows here only when it reaches one of your hosts again, or when this PC finds that host. - Devices adds the same sentence to its summary. The map draws every host of the network, also one this PC isn't paired with yet (Not paired with this PC yet, with why), named like every other computer. A host some of your computers aren't paired with shows Not on all your computers yet.
- The desktop log writes the sentence whenever it changes, and each host this PC found (Found Nahida-host on your home network: MIKO added it ...).
What you need: Martlet with this change on the computers that find the host, the host's UDP 9444 open on the home network (see above), and, for a member the host doesn't know yet, a host with this change too. Across routers or VPNs, the find doesn't reach; there a change travels only through a host both computers reach.
-
Network key. Each desktop has its own ECDSA P-256 network key in
network\device_ecdsain Martlet's data folder (readable by your Windows user only). Hosts only ever see public keys. -
Roster. The network is a roster of desktops (device ID, name, public key)
and hosts (host ID, address, TLS key fingerprint). Every entry is signed by
the member desktop that wrote it. The network ID is derived from the founding
desktop's key. Each desktop keeps its copy in
network.jsonbeside its other preferences; each host keeps its copy innetwork.jsonbesidehost.json. It holds no secrets. -
Device ID. Each Windows user's Martlet has its own device ID, kept in
device.jsonin Martlet's data folder so it never changes:desktop-<pc name>-<6 of [a-z0-9]>, so two Windows users on one PC are two desktops. A data folder that was already paired or in a network keeps the ID its pairings use (an older Martlet'sdesktop-<pc name>). - Accepting changes. A host or desktop accepts an incoming entry only when its signer is an active member desktop in the roster it already accepted (removals first). Per computer the newest entry wins (hybrid millisecond revisions, then writer, then content). A removed desktop key never becomes active again, so a removed PC cannot sign itself back in; rejoining needs a new key, which Martlet makes by itself after a removal.
-
Binding a host. A host in no network is bound by the first paired desktop
that brings a roster in which it is a member and the host is listed with its
own key. That pairing was approved by the owner on the host (a typed code,
this PC's host dashboard or the owner's SSH session), so its network is the
owner's. A host belongs to one network; a host of another network says so,
and
martlet-host network-resetlets it join another one. -
Pairing by itself. A member desktop signs the host's ID and fingerprint,
the network, its device ID and name, a timestamp (within two minutes) and a
fresh nonce with its network key, over TLS pinned to the fingerprint in the
roster. The host checks the key against its roster and issues one
voicecredential (replacing older ones of that PC). The credential is kept in Windows Credential Manager like any other pairing. A host the roster doesn't list yet, found on the home network, is paired with the key it showed and kept only when its own roster lists it with that key, signed by a member; a member the host doesn't know yet brings its roster, and the host takes only entries its trusted members signed (details). - Joining. Only a PC already paired with a host of the network (with the owner's approval on that host, or through Martlet on your network) can ask to join, and the request names the device ID of that pairing. The check number (six digits from the network, device ID and key) appears on both screens; allow only when they match. A PC the owner just allowed from Martlet on your network (same device ID, within 15 minutes) is let in by the allowing PC without asking again. A PC that asks through a member PC's own host service (the host service Martlet runs on that PC's Docker Desktop) is let in by that member PC by itself: every pairing with it was approved on that PC (its pairing code or Allow shows only there), and the host service runs on that same computer, so it vouches for the joining key as that PC itself would. Before this, a main PC paired through Pair your main PC on a host PC still waited for an Allow on that same host PC. Requests through any other host still need the check number and an Allow.
-
Joining by signing in. A computer away from home pairs with a host by
signing in (below) instead of a code shown on the host. The host issues the
same
voicecredential pairing does and remembers which identity enrolled that device; its answer to members (GET /martlet/v1/network) marks that device's join request with the identity (sign_in: provider, subject, label, when, andaccount_id, the household account the sign-in proves). A member desktop lets such a request in by itself (NetworkSyncEngine.ApproveSignedIn) when the attesting host is an active host of its roster: the owner set the sign-in up at home (the owner account with its authenticator, or an identity the owner allowed on that host), so that sign-in is the owner's approval, as an Allow would be. Only member desktops still sign roster entries; the host only attests. Requests without an attestation, or through a host outside the roster, still need the check number. The attestation lasts while the device is paired with that host and its identity is still allowed there. An identity allowed as a friend gets no attestation and can't ask to join: a friend's computer never joins the network (sharing a host with friends). -
Removing a sign-in removes its computers. When the owner removes an
allowed identity, a provider or the owner account on a host (in the
window, Remove and remove its computers from the network, or
martlet-host owner-signin-disallow), that host revokes the computers the sign-in enrolled and records each one, with the network key it asked to join with (signin.jsonremoved). Member desktops read the records in the host's network answer (sign_in_removals, members only) and remove those desktops from the roster on their next sync, signed by them as any removal, so every host revokes them and they leave the network (a new key and a new sign-in are needed to come back). A desktop is removed only when its roster entry still has that key (or the host never saw one), never the syncing PC itself, and only on the word of an active member host; the host drops a record once the roster shows the removal. So a host can at most ask to remove computers that signed in through it, and only those whose sign-in the owner removed. A friend's computer never joined, so removing a friend only revokes it on that host. -
Outside access needs sign-in. A host is reachable from outside home only
while someone can sign in to it: an owner account (always with an
authenticator) or a provider with at least one allowed identity
(
GatewaySignInSettings.BlockedReason:signin.not_set_up,signin.no_allowed_identity;blocked_reasonandusablein the sign-in settings andmartlet-host owner-signin-status). The guard pauses outside access while it isn't (its outside addresses are kept). Sign-in from outside asks before a change that would leave nobody able to sign in on a host with outside addresses, and says when outside access is paused (SignInOutsideWarning). - Revocation. Hosts revoke every credential of a removed desktop. A removed host revokes every network desktop and keeps the roster, so the PCs learn of the removal and forget it.
Limits, by design for a home network:
- Changes a stolen PC made before you removed it stay; remove anything you don't recognize too (everything is listed on the card).
- A PC learns about changes through its hosts, and finds hosts of the network it hasn't heard of on the home network. A PC away from home whose hosts are all unreachable learns about changes when it reaches one.
- At most 64 entries per roster, removed ones included.
- Not yet: a join code, Leave network on the PC itself (see user stories B1-B7). Cloud keys and setups travel as shared settings through the network's hosts.
A laptop at work or on the road can be a companion (microphone, speakers, character) while Thinking, voices and listening keep running on the hosts at home. Martlet's trust model does not change: every connection is pinned TLS to the host key in the roster, every request is signed with a per-device credential, and pairing still needs the owner. What changes is how the laptop reaches the hosts and who else can knock.
Threat model. At home only computers on your network can reach a host. Once a host is reachable from outside, anyone on the internet can open a TLS connection to it. They cannot read or forge traffic (pinned TLS, signed requests, one-use pairing windows), so what they can do is guess: short pairing codes, credentials, sign-in passwords and one-time codes; and flood the routes anyone may call. Martlet answers with the gateway's guard (below) and by keeping pairing codes on the home network. A stolen laptop is handled as before: remove it from the network and every host revokes it.
Routes, in order of preference.
-
Overlay network (recommended): Tailscale, ZeroTier or your own
WireGuard. The laptop and hosts share a private network wherever they are,
nothing is open to the internet, and pinned TLS works unchanged (the overlay
address is just another way to the same host key). Add each host's overlay
address (for example
100.101.102.103:9443orgpu-box.tailnet.ts.net:9443) as an outside address. A host's gateway normally listens on its home address only, so a host with outside addresses also listens where the overlay reaches it (GatewayOverlayListeners.cs, see Where a host listens below). -
Port forward on your router: forward one public TCP port to a host's
gateway port and add
your-name.example.net:<port>(or your public IP) as that host's outside address. Turn on the host's reachable from outside protection (it is on whenever a host has outside addresses). Use a dynamic DNS name if your public IP changes. Forward only the gateway port, never a role service. For this PC's host service, Martlet can open the port for you (opening a port on your router). -
Not supported: HTTP tunnels and reverse proxies that end TLS themselves
(Cloudflare Tunnel's HTTP mode, ngrok HTTP, nginx
proxy_pass https://). They present their own certificate, so the host key pin fails by design. Only plain TCP passthrough (Cloudflare Spectrum or a TCP tunnel, nginxstream) keeps the pin; if you use one, the host can't see the real source address, so set treat every connection as outside home on it. The OpenAI-compatible endpoint is the exception: it needs only API keys, never the pinned key, so a reverse proxy with a real certificate is how you share your language models with other apps. Point it at the host's front door, a second port that serves only Martlet's web page and/v1, never at port 9443.
Several hosts. Each host the laptop should use from outside needs its own outside address (its own forwarded port, or its overlay address). The simplest workable setup is an overlay on every host; with port forwarding, forward one port per host (for example 9443 and 9444). A host with no outside address is simply not used while away.
Setting outside addresses. On any member PC: Devices › Your Martlet
network › the host's Outside addresses (up to four, for example
gpu-box.tailnet.ts.net:9443, 100.101.102.103:9443 or
home.example.net:9443). On a Linux host: `martlet-host owner-exposure --config
Where a host listens. A gateway listens on its home address only, but an
overlay network reaches the computer on another of its own addresses (for
example Tailscale's 100.x.y.z). So while a host has outside addresses:
-
A native Linux or Mac host (
martlet-hostnative method,"mode":"privateIp") also listens on each of the computer's Tailscale addresses (100.64.0.0/10 and fd7a:115c:a1e0::/48), on the home port, and on each of its addresses that an outside address names as an IP (for example a ZeroTier10.147.17.5:9443), on that port. It doesn't need to resolve a MagicDNS name. It reads the computer's addresses every 10 seconds and when they change, so Tailscale may start after the host, stop or get another address. Its own outside addresses come fromexposure.jsonand from its roster entry, so the network card's Outside addresses is enough. The host log saysListening on 100.101.102.103:9443 too (overlay network) ...andStopped listening on ..., and the security audit lists the addresses inoutside_listeners(the Devices map's Outside home detail shows them). It never adds the home address, loopback or any other address that nothing names. -
A Docker host (Docker Desktop on Windows, or the Docker method on Linux)
can't see its own addresses from inside the container, and Docker Desktop
can't publish on an address that may come and go (the holder would not start
while Tailscale is off). So when you set outside addresses in Outside
access (
martlet-host exposure --outside ...), the network holder (martlet-host-net) publishes the gateway port on every address of the Docker host (-p 9443:9443), and with--clear-outsideon its home address only again. Itsmartlet.homelabel keeps the home address, and Set up and Update host keep the choice. Replacing the holder restarts the gateway and roles. On a Docker host, set the addresses in Outside access; the network card's Outside addresses alone only signs the roster.host_service_statusreportspublishedEverywhere. Docker Desktop's own firewall rule allows its port on private and public networks, so publish everywhere only on a PC that stays at home.
Connections that arrive through an overlay come from outside home for the
guard (Tailscale's 100.64.0.0/10 is not a private address), so each host
needs sign-in set up before it serves them (see Sign-in comes first below).
Tailscale adds its own firewall rule for its interface on Windows
(Tailscale-In) and Linux (ts-input), so Martlet's home-network-only rules
don't block it. If a Linux host with ufw still doesn't answer through
Tailscale, run sudo ufw allow in on tailscale0 on it.
A laptop that goes in and out of home with Tailscale. The laptop uses the home address while it is at home and the Tailscale address while it is away, with the same pairing:
- Install Tailscale on the laptop and on every host, and sign in to the same
tailnet. Find each host's Tailscale address with
tailscale ip -4. - Update every computer to this Martlet (Update host for each host).
- At home, pair the laptop with each host as usual.
- On each host, set up sign-in: Devices › Add a computer with the host selected › Sign-in from outside (an owner account with an authenticator).
- Give each host its Tailscale address as an outside address, for example
100.101.102.103:9443orgpu-box.tailnet.ts.net:9443. For a Docker host (a Windows PC), use Devices › the host › Outside access. For a native Linux or Mac host, Outside access or the network card's Outside addresses works. - Wait for one network sync while the laptop is at home, so it learns the addresses.
- Leave home. The first connection waits 1.5 seconds for the home address, then uses the Tailscale address, and later connections go there at once. Back at home, the home address wins again within about 2 minutes.
- Check it away from home: MCP
outside_reachability_checkwithcontactHosts: true, or the Devices card (reached from outside).
Which address a desktop uses (Martlet.HostClient/HostRoutes.cs). Requests keep the
host's home origin, so TLS still checks the pinned key and signatures are
unchanged; only the TCP connection dials elsewhere. The home address goes
first; outside addresses are tried (all at once) only when it doesn't connect
within 1.5 seconds, and only for hosts that have them. The address that worked
is remembered, so later connections go straight to it, while the home address
gets a 0.1-second head start and wins as soon as this PC is back home. A home
address that answers with another key (another network's computer with the same
address, at work) is skipped for five minutes. When nothing answers, the error
names every address tried and what to check. A host's row on the Devices card
says how many outside addresses it has and whether it was last reached at home,
from outside or not at all, and the card's status line counts the hosts reached
from outside right now. The desktop log records each change of route (Martlet network: reaching gpu-box from outside home ..., ... at home again, or the
addresses tried when nothing answered). Every five minutes the desktop reads the
security audit of each paired host that has outside addresses; the host's row
shows its guard's totals and the log names new failures, lockouts and refused
pairings with their sources. MCP outside_reachability_check (with
contactHosts: true) probes every host's home and outside addresses with the
pinned key and GET /health/live, without a credential.
Kept connections. Every paired connection to the same host (same home
origin and pinned key) shares one pool of kept TCP and TLS connections
(HostTransport.CreateHttpClient), so the desktop's regular checks and
syncs (every 5 to 30 seconds, per host) do not open a new connection each time.
A kept connection closes after 20 seconds idle (shorter than the gateway's
30-second keep-alive) and is replaced after 2 minutes, so a host reached from
outside is reached at home again within about 2 minutes once home answers. At
most 32 connections to one host are open at the same time (the gateway takes 64
from all computers together). A response left unread (a reply stopped) closes
its connection at once, so the host stops that job at once. HostRoutes counts
the connections opened to each host (HostRouteStatus.Connections); MCP
host_connections_selftest checks the reuse on loopback. When this PC itself
runs out of network resources (Windows NoBufferSpaceAvailable: no free
connection ports or socket buffers), the log and the error say so (This PC ran
out of network resources ... The host may be fine.) instead of saying the host
didn't answer.
The gateway's guard (GatewayGuard.cs), always on:
- Requests are classed by route:
health(liveness),pair(one-use cards),pair-code(typed codes),join(a member desktop's signed key),signin(sign-in points) andcredential(everything signed or with an API key). The source is the connection's address, never a forwarded header:loopback,home(private and link-local addresses) oroutside(anything else, including overlay addresses such as Tailscale's 100.64.0.0/10). -
Typed codes stay at home. A short typed pairing code used from outside
home is refused (
pair.outside_home, 403) unless the owner turns on Allow typed pairing codes from outside home; a short code could be guessed over the internet. A one-use card opened for one named device (a 32-byte token, as Martlet uses to pair with its own host service), joining and pairing by itself (the desktop's network key) can't be guessed, so they work from anywhere. Enrolling a new laptop from outside is what sign-in is for. -
Lockout. Failed authentication (
auth.*,pairing.*,network.denied,key.*, sign-in failures) counts per route class and source address, and for sign-in also per account: five free failures in 15 minutes, then the address or account is locked out for 1 s, doubling with each further failure up to 15 minutes (auth.throttled, 429, withRetry-After). A success clears it. - Budget. Each outside address may make 120 requests a minute to the routes anyone may call (liveness, pairing, joining, sign-in).
-
Limits. Pairing and sign-in bodies are at most 8 KB and must arrive within
10 seconds (
request.timeout); request headers within 5 seconds; 64 connections at once. - Requests from this computer and the home network to signed routes pass the guard without a lookup, so the conversation path never slows down. Once a host is reachable from outside, the limits apply to every source.
-
Audit. Every decision (success, failure, throttled, refused: route class,
source address and kind, code, device or account, never a secret) is kept in
the last 256 entries, served to paired desktops at
GET /martlet/v1/security/audit, and written to the host log (Refused a pairing attempt from ...,Locked out ... from ...,Throttled ...), which the Diagnostics page and MCPlogs_tailshow. Failed requests in the host log name their source address. - Sign-in points register their routes through the same guard
(
IGatewayRequestGuard.TryAdmitandRecord). -
Store health. The host's shared stores (API keys, accounts, sign-in,
memories, conversations, creations, settings, voices, character models,
commands, Home Assistant, cluster plan, network, log) load and save through
one helper (
GatewayStoreHealth). A failure keeps the store working from memory, is written to the host log once a minute for each store and action, and is shown in the audit:stores_healthyandstores(each store that failed: what failed last, how often, when and why). API keys, accounts, sign-in and the network roster try a save twice; an API key or account copy that still is not saved is saved again at the next sync. -
Authority saves. Each signed request saves its nonce (a one-use request
number that stops replays) before it is admitted, with one append and one
flush to the store's nonce journal (
nonces.log), not a full save of the authority. Requests that arrive during a save share the next one, and the save runs outside the authority's main lock. The audit'snonce_savesgives the number of nonce saves and their average and longest time;authority_commitsdoes the same for full saves (pairing changes, a clean close, and the first request after a damaged journal). A save of 50 ms or more is written to the host log. A cancelled request never closes the authority; only a storage failure does. - Member pairing limits. Only failed member-pairing proofs count toward the limit of 30 a minute, for each source address, so false proofs from one home device cannot block real members. A re-pair issues the new credential and revokes the older ones in one save, so a failed re-pair keeps the old credential. A card pairing window is checked for its deadline before the credential is issued.
Exposure choices (GatewayExposure): internet reachable (limits apply to
every source), allow typed pairing codes from outside home (off by default)
and treat every connection as outside home (for a host behind a port proxy or
TCP relay that hides the real source, such as a gateway Docker publishes).
Sign-in comes first. Sign-in stays optional: a host with no outside addresses
(and typed codes kept at home) works exactly as before and needs no sign-in. A
host becomes a public endpoint only once sign-in is set up on it, meaning at
least one usable method: an owner account with an authenticator (TOTP), a
configured provider with at least one allowed identity (a friend counts), or a
share link. Sign-in owns that rule
(GatewaySignInSettings.BlockedReason: signin.not_set_up or
signin.no_allowed_identity); outside access only reads it
(GatewayOutsideAccess).
- The host enforces it.
martlet-host owner-exposure(andmartlet-host exposure, the Outside access dialog and thehost.exposurecommand, which all run it) refuses with exit 5 andoutside.needs_signinto add an outside address it doesn't already have, or to allow typed codes from outside, while sign-in isn't usable. It readssignin.jsonas it is, without starting sign-in's service. Removing addresses, keeping them and treat every connection as outside home never need sign-in. That last one only says how requests are classified (for Docker-published gateways), not that the host is public. - If sign-in later loses its last usable method (the owner account removed, the
last allowed identity or provider removed,
signin.jsongone) while the host has outside addresses or allows typed codes from outside, the addresses are kept and outside access is paused. The guard refuses every request from outside home withoutside.paused(403), audits it asrefusedand logs Refused a ... request from ... (outside home): outside access is paused because sign-in isn't set up on this host. The outside addresses are kept. Home and this computer are unaffected. The one exception is the sign-in settings route (/martlet/v1/signin/settings, a paired desktop's signed request), so the owner can set sign-in up again from anywhere. The guard reads sign-in at most every five seconds.serve,martlet-host pairandowner-exposureprint Outside access paused: ... while it lasts. - The security audit (
GET /martlet/v1/security/audit) carriesoutside_access_blocked_reason(absent when sign-in is usable) andoutside_access_paused. The Outside access dialog shows why it is limited (OutsideAccessBlockedReason, starting Outside access paused: sign-in is off. when it is) and a Set up sign-in first button (OutsideAccessSetUpSignIn) that opens the host's sign-in settings. Until then it only lets addresses be removed, typed codes be turned off and the connection treatment change. The Devices map's Outside home detail and the host's row in Your Martlet network say Outside access paused: sign-in is off too. Sign-in's own window warns before a change that would leave a host with outside addresses without sign-in (SignInOutsideWarning).
This PC's host service and other hosts Martlet manages. On the Devices map,
select this PC, a host Martlet reaches over SSH, or a host whose own Martlet runs
its commands (the host.exposure command between computers; an older Martlet
there is asked to update first) and choose Outside access
(NodeAction-OutsideAccess): outside addresses, Allow typed pairing codes from
outside home and Treat every connection as coming from outside home. Martlet
runs martlet-host exposure there (martlet-host pair serves the same choices) (--outside, --clear-outside,
--allow-pairing-outside-home, --treat-all-as-outside), which saves
exposure.json through the gateway and restarts it; the network's next sync
signs the addresses into the roster. Docker publishes the gateway's port, so a
Docker host sees every connection, from home or outside, as coming from Docker's
own address: the dialog keeps Treat every connection as coming from outside
home on for Docker hosts. Then typed pairing codes need Allow typed pairing
codes from outside home even at home; Martlet pairing with its own host
service (a one-use card) doesn't. The Devices map's Outside home detail
(SelectedDeviceOutside) shows the count of outside addresses and, once read
from the host, its two choices.
Pairing codes stay at home, so a laptop that is already away joins by signing
in. Signing in gates only that first pairing: what it gets is exactly what
pairing gets (a voice credential bound to that host's pinned TLS key, used to
sign every request, never expiring, revoked like any pairing), and the laptop
then joins the network on that host's attestation, with no check number.
| You do | Where |
|---|---|
| Set up the owner account on a host: a name, a password (12+ characters) and an authenticator app (any TOTP app: Google Authenticator, Aegis, 1Password, Bitwarden, Microsoft Authenticator). The app must show a correct code before the account is saved; you get ten one-use recovery codes, shown once | At home, on a member PC: Devices › Add a computer with the host selected › Sign-in from outside; on a Linux host: martlet-host owner-signin-owner --config ... --user owner (password on the first stdin line, then the code) |
| Make an invite: the host's ID, its TLS key fingerprint, its home address, the outside addresses it answers on and the network ID. It holds no secret, so it can be reused and kept in a password manager or note |
Sign-in from outside › Make invite (it starts with the host's outside addresses from Your Martlet network › Outside addresses; set them there so the laptop keeps reaching the host once it has joined); martlet-host owner-invite --config ... (the addresses from owner-exposure, or --address name:port) |
| On the laptop: paste the invite and sign in (account name, password and the code your app shows, or a recovery code) | Devices › Add a computer › Join with an invite |
| Take access away | Remove the laptop from the network (as always), or Remove owner account / Remove and remove its computers from the network for an allowed identity on the host (martlet-host owner-signin-disallow): the host revokes every computer that signed in with it and your member computers remove those computers from the network on their next sync, so they lose every host |
How it is protected:
- Pin first. The laptop connects only to the key in the invite: the TLS certificate must have that SPKI fingerprint before anything is sent (it names the host's home address, so a name mismatch from outside is expected; the pin is the authority, as for every pairing). The outside addresses are tried first, then the home address.
- Two factors. The password is kept on the host only as a PBKDF2-SHA256 verifier (600,000 iterations, 16-byte salt). Every sign-in also needs a current authenticator code (RFC 6238: 30-second steps, one step of drift, each code accepted once) or an unused recovery code (kept as SHA-256 verifiers, each works once). Wrong sign-ins count toward the guard's lockout per address and per account (five free, then 1 s doubling up to 15 minutes), from home too, and every outcome is in the host's security audit.
-
One-use attempts. Each sign-in starts with
POST /martlet/v1/signin/begin(an attempt with its own state and nonce, ten minutes, one use) and ends withPOST /martlet/v1/signin/complete. The proof travels only over the pinned connection. -
Secrets stay on the host.
signin.jsonbesidehost.json(0600, service owner) holds the verifiers, the authenticator secret, provider client secrets and the allow list. The desktop never reads a secret back (GET /martlet/v1/signin/settingsreturns names, counts, providers withhas_client_secret, allowed identities and the computers that signed in). Only an active member desktop of the host's network (any paired desktop while the host is in no network) may read or change it (signin.deniedotherwise);martlet-host owner-signin-*edits it on the host and the running gateway picks the change up on its next sign-in check. -
Allow list. The owner account is always allowed. Any other identity (a
provider set up on the host and the account's stable subject, with a label
for people) must be on the host's allow list; one that signs in but isn't
gets
signin.not_allowed. Each allowed identity is one of your own (member, the default: its computers join your network) or a friend's (friend: it shares only this host's engines); changing that revokes the computers it signed in with the old access. Removing an identity, a provider or the owner account revokes the computers it enrolled on that host and removes them from the network (see Removing a sign-in removes its computers in the trust model), so a laptop that joined loses every host, not just that one. -
No taking over another computer's ID. A sign-in names the computer's
device ID, so the host refuses (
signin.device_taken) an ID that belongs to a member desktop of its network (those pair by their network key and never sign in) or that is paired another way (a code, a card) or by another identity. A computer can sign in again only to replace its own earlier sign-in by the same identity. Before this, a signed-in computer that named another computer's ID revoked that computer's pairing on the host and was then taken for it. -
Addresses travel with the pairing. The invite's outside addresses are
kept with the pairing in
hosts.json(outsideAddresses) and are dialed from the next start on, so a laptop that has never been on the home network reconnects whatever its network state. Once it is a member, every sync keeps them in step with the host's roster entry, which wins. The home address still goes first and outside addresses only after 1.5 seconds, so nothing is slower at home.
Instead of (or as well as) the owner account, a host can let you sign in in
the browser with any OpenID Connect issuer: a self-hosted Authentik, Authelia,
Keycloak or Pocket ID, or Google. Martlet itself runs the flow: the laptop opens
the system browser with an authorization-code request with PKCE (S256) and a
loopback redirect http://127.0.0.1:<free port>/ (RFC 8252), the host builds
that URL from the issuer's discovery document and the attempt's state and
nonce, and once the browser comes back the laptop forwards what it brought
and its PKCE verifier. The host exchanges the code at the issuer's token
endpoint itself, with the client secret only it keeps (client_secret_post,
or client_secret_basic when that is all the issuer offers; none for a public
client), and accepts the ID token only when its signature checks against the
issuer's published keys (RS256/384/512, PS256/384/512, ES256/384; an unknown
key ID refreshes the key set once) and its issuer, audience (or authorized
party), expiry and nonce match. The identity is the issuer's stable sub; a
verified email, the user name or the name is its label.
- At the provider, register a client for Martlet: a public or confidential
OAuth2/OpenID client whose redirect URI is
http://127.0.0.1(loopback, any port; Authentik: Redirect URIsregex:http://127\.0\.0\.1:\d+/; Keycloak:http://127.0.0.1:*; Authelia:http://127.0.0.1/withredirect_urisloopback ports allowed; Pocket ID:http://127.0.0.1:*). For Google: Google Cloud console › APIs & Services › Credentials › Create credentials › OAuth client ID › Desktop app (configure the consent screen first, and add your Google account as a test user while the app is in testing). Google's desktop clients take any loopback port and come with a client secret. For Microsoft (personal Microsoft accounts: Outlook.com, Xbox, Windows): Microsoft Entra admin center › App registrations › New registration (Personal Microsoft accounts only), then Authentication › Add a platform › Mobile and desktop applications with the redirecthttp://127.0.0.1(any port). It is a public client: no secret. A work or school account uses its own tenant's issuer (https://login.microsoftonline.com/<tenant ID>/v2.0) under OpenID Connect. - At home: Sign-in from outside › Sign-in providers for your household:
choose OpenID Connect (an ID such as
authentik, a name, the issuer URL such ashttps://auth.example.net/application/o/martlet/), Google (filled in:https://accounts.google.com) or Microsoft (personal accounts) (filled in:https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0), the client ID and secret, Save provider. Martlet saves it on every host of your network at once (household providers). - Sign in with it once from the computer you want to let in (from home or
away): the host refuses (
signin.not_allowed) and lists the identity under Signed in but not allowed yet; Allow the newest (or type the provider ID and subject under Other allowed sign-ins). From then on that identity pairs, and the computer joins your network as above.
-
Discord (OAuth2, no ID token): in the Discord Developer Portal create an
application, and under OAuth2 add the redirect
http://127.0.0.1:53682/(Discord only takes redirects registered exactly, so the laptop listens on that port; pick another in Loopback port and register that instead) and copy the client ID and secret. At home choose Discord under Sign-in providers, paste them and Save provider. The laptop signs in in the browser (scopeidentify, PKCE); the host exchanges the code with the secret it keeps and asks Discord who the token belongs to (/users/@me). The identity is the Discord user ID; the user name is its label. -
Steam (OpenID 2.0): nothing to register. Choose Steam and Save
provider. The laptop signs in at steamcommunity.com in the browser, which
sends it back to the laptop's loopback address with a signed assertion; the
host checks that it answers this attempt (its
return_tocarries the attempt's state, the realm is the loopback address, it was signed over the endpoint, claimed ID, return address and nonce) and asks Steam to confirm it (check_authentication). The identity is the SteamID64.
Allow either the same way: sign in once, then Allow the newest at home (or type the Discord user ID or SteamID64 under Other allowed sign-ins).
Limits, for now: allowed identities are per host (allow one on the host the laptop reaches from outside); the laptop reaches the network's other hosts only where they have outside addresses (above). Providers are the household's: set up once, they are on every host.
You set a sign-in provider up once for the whole household, and every host of your network has it, so a person or a computer can sign in with it through any host.
-
Save provider and Remove provider in any host's Sign-in from
outside change every host of your network at once (every paired host of
yours while this PC is in no network). Once your household has accounts, only
a PC signed in as an owner or admin may change them (
signin.deniedotherwise). The status line names the hosts that saved it and why the others didn't (Not changed on linux-box (didn't answer in time)). Removing asks first: computers and friends that sign in with it lose access to those hosts. -
Where it is. The window shows each provider and its hosts
(
SignInHouseholdProviders, for example Google (google): on gpu-box and this PC's host; missing on linux-box.), including hosts with other settings under the same ID and hosts without the client secret it needs. -
The secret. Hosts keep the client secret, as before; the desktop never
reads it back. The PC where you saved the provider also keeps a copy in
Windows Credential Manager (
Martlet/v3/signin-provider/<id>), only to add the provider to a host that misses it. -
New hosts. When Share › Friends reads your hosts' sign-in settings (the
Share page shows, Check now, at most every two minutes) and after a
network sync pairs this PC with a new host, your PC adds the household's
providers to the hosts that miss them: the configuration most hosts have,
with the kept secret when the provider needs one (Discord, or a confidential
OpenID Connect client) and this PC kept it for that client ID. Other PCs add
only providers that need no secret (Steam, public clients). A provider
removed from every host is never added back. Add to the other hosts
(
SignInProvidersPush) does it now and says which provider still needs its secret typed. This never runs on a reply's path. - Friends stay friends. Allowed identities (yours and friends') stay per host; the household push never adds, changes or removes one.
-
What this PC knows.
household-signin.jsonin the data folder keeps the providers this PC set up (no secret) and what it last read of every host; MCPnetwork_statusshows it ashouseholdSignIn.
A computer can join as one of a person's computers by signing in to their household account (accounts) instead of as one of the owner's.
-
Join with an invite lists Your household account (Martlet password)
when the host keeps household logins (
martlet_sign_in), the owner account and the household's providers. A provider identity that is a login of an account (account_idon the host's allow list) signs in as that account. - The host pairs the computer as before and answers the account and its
attestation. The computer keeps them in
joined-account.json(no secret). Once it is a member of the network, it signs that account in with the attestation (AccountSession.SignIn), reads the household's account directory and switches to the account between replies (Hi, Sam). The attestation lasts ten minutes; when it can no longer be used, the person signs in from the account button instead. - The host's network answer to member desktops names the account
(
sign_in.account_idwith the join request). A member desktop lets the computer in by itself, as for any attested sign-in, and says whose it is: LAB-NEW-PC (signed in as sam@example.net, Sam's computer) joined your Martlet network by itself. - A new Windows user on a PC that is already in the network joins the same way: an admin makes an invite (Make invite) and the new user pastes it. Joining at home without an invite is not offered: a host found on the network has no pinned key yet, so a password or code could go to the wrong computer.
-
Link and unlink on the Account page. Sign-ins from your household's
providers (on the Account page) lists the account's provider logins, with
Link for each household provider and Unlink for each login. Martlet
asks you to prove it's you first (your password or a sign-in already linked;
an account that so far only has Windows logins is checked by this PC), then
you sign in with the provider in the browser through one of your hosts. That
host checks the identity with the provider and, when nobody has it yet,
allows it as your account's login and vouches for it (a Prove sign-in with
link_account_id); every other host takes that host's attestation (link-login). A login that is already another account's, or a friend's, is refused (signin.login_taken). A computer signed in only as a member may link and unlink its own account's logins; owners and admins may change everyone's. Unlinking removes the login from every host like any removed sign-in, and Martlet keeps at least one login on the account. - Signing in with a linked provider. Sign in as someone else (and every other Prove sign-in) offers each household provider beside the Martlet password; the host's attestation signs the account in on this PC.
A host also keeps sign-ins for the other people of the household (accounts and households). Each one belongs to an account ID.
-
The owner's account. The owner login and every allowed identity that is
one of yours (
member) sign in as the household owner's account. A desktop can name it (owner_account_id, changeowner-account, oraccount_idwithowner). Until then the host uses the account derived from its network ID (OwnerAccount.IdFor: UUID version 5 ofmartlet-household-owner\n<network ID>), so existing owner logins keep working with no change. -
Martlet password logins for other accounts (
accountsinsignin.json): a user name that is unique on the host whatever its case, a password kept as the same PBKDF2 verifier and, optionally, an authenticator with ten recovery codes. They sign in with providermartlet(/signin/begin), which also takes the owner login. Without an authenticator a login proves its account on a computer that is already paired, but it never adds a computer (signin.needs_authenticator). -
Provider identities can name the account they sign in as (
account_idwithallow, or changelink). A friend never has an account. - Outside access rules don't change: a host is usable from outside only with an owner login (always with an authenticator) or a provider with an allowed identity. Household password logins alone don't open it.
The sign-in settings changes (from a member desktop, POST /martlet/v1/signin/settings):
| Action | Fields | Does |
|---|---|---|
owner-account |
account_id |
Names the owner's account |
account |
account_id, user, password, optional totp_secret and code
|
Adds another account's login, or changes it (the password may be left out of a change). An authenticator needs a current code; the answer carries new recovery codes once |
remove-account-authenticator |
account_id |
Removes that login's authenticator and recovery codes |
remove-account |
account_id |
Removes the login; the host revokes the computers it added and your member computers remove them from the network |
recovery-codes |
optional account_id
|
New recovery codes for the owner, or for that account's login |
allow |
optional account_id
|
Allows an identity as that account's (members only); allowing again without one keeps the link |
link |
provider, subject, optional account_id
|
Links an allowed identity to an account, or (no account_id) back to the owner's |
On a Linux host: martlet-host owner-signin-account --config ... --user sam --account <account ID> [--authenticator yes|no] (password on the first stdin
line, then the code), owner-signin-remove-account --account <account ID>,
and --account on owner-signin-owner and owner-signin-allow.
owner-signin-status lists the logins.
A Prove sign-in (accounts) on a computer that is
already paired with the host: POST /martlet/v1/signin/begin (provider
martlet, owner or a provider ID), then POST /martlet/v1/signin/prove,
signed by that computer's credential, with attempt_id, proof (the same
proof as /complete) and optional lifetime_seconds (60 to 2,592,000; 600
when absent). A friend's computer gets access.friend. The host answers
account_id, signed_in and an attestation, and issues no new credential.
/signin/complete also answers account_id and an attestation for the
computer that just signed in, when the identity has an account.
The attestation (AccountAttestation in Martlet.Core) says that the account
proved itself on that device: network ID, host ID, account ID, device ID, the
login (kind, provider, subject), the issue and expiry times, and a
signature. The host signs it with its TLS key, the key whose SPKI
fingerprint the network roster pins for that host, so no new key is handed
out: ECDSA P-256 (ES256, every Martlet host) or RSA-PSS (PS256). It also
carries the public key; a checker hashes it and compares the hash with the
pin. Any member desktop or host checks it with AccountAttestation.Check
against the roster it already accepted. The check refuses another network, a
host that isn't an active member, a key that isn't the pin, a changed field, a
statement more than five minutes in the checker's future and an expired one.
The signed bytes start with martlet-account-attestation-v1, so they can't be
taken for a TLS signature. ToText() gives one line of base64url (at most
4,096 characters) for the account directory. A host in no network attests
nothing (signin.no_network); an identity with no account gets
signin.no_account.
-
A binding needs a proof. A desktop acts for an account only through a
device binding in the household's account directory, and every host and
desktop refuses an entry with a binding that has no proof
(
account.binding): the device made the account, it carries a host attestation for that device and account, it is the owner's account's migration binding of a member desktop, or it came with a merged account (the binding rule). So Sign in as someone else, Continue as and linking a Windows login to an existing account need a Prove sign-in on that PC. -
Who changes sign-in. Once the household has accounts, a host lets only a
desktop bound to an owner or admin account change its sign-in settings; a
desktop of members only changes their own password logins
(
signin.deniedotherwise; roles on a host). A household from before accounts keeps the earlier rule until its desktops migrate. - Account passwords on every host. The Account page keeps an account's Martlet password on every host of the network that the PC is paired with, so any of them can check a Prove sign-in. Each host makes its own recovery codes.
The simplest way to share your hosts with a friend is a share link. You make one link for each friend. Your friend clicks it (or pastes it into their Martlet), and their Martlet can then use the engines of the hosts you chose. Nobody needs an account at Google, Discord or another identity provider, and nobody hosts a website.
| You do | Where |
|---|---|
| Make a link: type your friend's name and choose All my hosts, also the ones I add later, or clear it and choose hosts | Share › Friends › Make a share link |
Send the link (martlet://share/...) to your friend in a private message |
Copy link in the window that shows it, or Copy link on the friend's row later |
| Your friend clicks the link, or pastes it | Their Martlet: the link opens Martlet, or Share › Hosts shared with this PC › Accept a share link (or Add a computer › Join with an invite) |
| See who uses what | Share › Friends: the friend shows as Ana (share link) with the hosts that keep the link and their computers |
| Share one more host, or one less (a link that names its hosts) | Share host or Stop sharing host on the friend's row |
| Stop the link | Stop link on the friend's row: every host removes it and revokes their computers at once |
How it works:
-
One secret per link. The link carries a random ID and a 256-bit secret.
Each host keeps only the secret's verifier (SHA-256 of
martlet-share-link-v1\n<id>\n<secret>;ShareLink.Verifier), never the secret. Your PC keeps the secret in Windows Credential Manager, so you can copy the link again and add it to hosts you add later. Anyone who has the link can use what it shares, so send it privately and stop it when you want. -
A friend's access only. Signing in with a link (provider
link, the link's ID as subject) always gives a friend's credential, exactly as sharing a host with friends describes: the engines only, your own work first, never your network, settings, memories, voices, logs or other computers. At most three computers per link on each host, and 32 friends' computers on a host in total. - Your API keys stay yours. A link shares the engines that run on your hosts (thinking with the host's local model, listening, speaking, lip-sync and reading). The cloud API keys you set in Martlet stay on your own computers and never go to a host for a friend; your friend's Martlet uses its own keys for anything online.
-
All hosts, also later ones. A link for all hosts covers every host of your
Martlet network. Each time Share › Friends reads your hosts (when the
Share page shows, at most every two minutes, or on Check now), your PC
adds the link to hosts that miss it, so a host you add later gets it too. Your
friend's Martlet asks a host it already uses which hosts the link covers now
(
GET /martlet/v1/signin/shared, from the network roster: host ID, name, home address, TLS pin and outside addresses) every time it checks its shared hosts, and signs in to the new ones. A host your friend forgot there stays forgotten. - Reaching your hosts. The link names each host's TLS pin, home address and outside addresses as they are when you copy it. A friend outside your home can reach only hosts with an outside address: open a port on your router (below) or use an overlay network such as Tailscale. The link window says which hosts have none. If your internet address changes later, the hosts' new outside addresses reach your friend through any host their Martlet can still reach; if it reaches none, copy the link again and send it.
-
Clicking a link. Martlet registers the
martlet:link type for your Windows user each time it starts normally (HKCU\Software\Classes\martlet, no administrator rights), so a clickedmartlet://share/...link starts Martlet with it. When Martlet already runs, the new start leaves the link in the data folder (its ownpending-share-link-*.linkfile, written whole and then renamed) and asks the running Martlet to show itself; that one takes all waiting links, oldest first. Martlet always asks before it signs in with a link. Many chat apps make onlyhttplinks clickable; then copy the link and paste it into Martlet. Uninstalling Martlet leaves the registry key; it points to a Martlet that is gone and does nothing. - Older hosts. A host that runs a Martlet older than share links can't take one: the friend's row says to update it.
The settings changes (from a member desktop, POST /martlet/v1/signin/settings):
share-link with id (16 bytes, base64url), label, verifier (32 bytes,
base64url) and optional hosts (absent: all of your hosts), and
remove-share-link with id. The same link keeps its verifier: a change with
another one is refused. A host remembers the IDs of stopped links
(removed_links, the newest 128) and refuses to add one again
(signin.link_removed), so a link stopped on one of your computers stays
stopped, even when another of your computers still had it; that computer marks
it stopped too on its next read. Your PC also keeps the stopped IDs
(share-links.json, stopped) and tells each host that still keeps one to
remove it, also a host that didn't answer when you stopped it. GET /martlet/v1/signin says share_links: true when
the host takes links, and the settings list links (ID, label, when added and
hosts; never the verifier). A wrong secret counts toward the lockout for that
link from every address.
For a friend (or your own laptop) outside your home, your host needs an address on the internet. Most people don't run a website, so Martlet uses your home router: it asks the router to forward one port to this PC's host service.
- On the Devices map, select this PC and choose Outside access for this PC's host service.
- Set Let Martlet open a port on my router for it (UPnP) and choose Save and restart gateway.
- Agree to Windows' prompt. It lets connections from outside your home through
Windows Firewall to the gateway port only (rule
Martlet-Host-Gateway-Outside).
What Martlet does:
- It finds the router on your home network with UPnP (Universal Plug and Play, Internet Gateway Device: an SSDP search, then the router's description). UPnP must be on in the router's settings; many routers have it on. Martlet takes only an answer from a private home address, and sends requests only to a private home address (never this PC itself or the internet).
- It asks the router for its internet address. If the address is shared by your
internet provider with other homes (carrier-grade NAT,
100.64.0.0/10) or is a private address (another router is in front of yours), a forwarded port can't be reached from the internet. Martlet stops and tells you to use Tailscale. - It forwards the gateway's own port (9443) when it is free on the router,
otherwise the next free one up to ten above, to this PC, for seven days (or
permanently on routers that take only that). It adds
<internet address>:<port>to the host's outside addresses and turns on treat every connection as coming from outside home (Docker hides where a connection comes from, so the gateway's limits must apply to every connection). The port stays open only when the host took these settings; otherwise Martlet closes it again. - While Martlet runs, it renews the port a minute after start and every six hours, to this PC's home address of that moment (an old forward to an address this PC no longer has is removed). When the router's internet address changed, it updates the host's outside addresses (the gateway restarts) and your network learns them on its next sync.
- Clearing the box closes the port on the router, removes the address and removes the firewall rule.
- From inside your home Martlet tries to connect to the address once. Many routers don't loop back to themselves, so a failure here doesn't mean a friend can't reach it.
Every request through the port still needs a pairing, a sign-in or a share link,
and the gateway's guard (lockouts, budgets, the audit) applies to every source.
Martlet opens a port only when you set the box. A port on another host (a Linux
host, or another Windows PC) is forwarded by hand: the Outside access dialog
names the host's home address to forward to. Martlet keeps what it opened in
router-port.json (no address is shown by MCP).
A friend with their own Martlet can use one of your hosts for its thinking, listening, speaking, lip-sync and reading. The friend signs in with their own account (Google or another OpenID Connect provider, Discord or Steam). They never join your Martlet network. They never see your settings, memories, voices, logs, API keys or other computers. Sharing is per host: a friend uses only the hosts that allow them.
| You do | Where |
|---|---|
| Set up a sign-in provider on each host you share (one your friend has an account with) | At home: Devices › Add a computer with the host selected › Sign-in from outside › Sign-in providers (above) |
| Give your friend that host's invite and a way to reach it | Sign-in from outside › Make invite, and an outside address. An overlay network is simplest: Tailscale, for example, can share one machine with another person's tailnet |
| Your friend signs in once. The host refuses them until you share it with them, and lists them | On your friend's Martlet: Devices › Add a computer › Join with an invite: paste the invite, Connect, choose the provider and Sign in |
| Share the host with them |
Share › Friends lists them as asking: Share host. Or Sign-in from outside › Allow the newest as a friend, or type their provider ID and subject under Allowed sign-ins and choose A friend. On a Linux host: martlet-host owner-signin-allow --config ... --provider <id> --subject <subject> --label <name> --access friend
|
| Your friend signs in again | Their Martlet keeps the host under Share › Hosts shared with this PC (below) |
| See who uses what | Share › Friends: each person, the hosts shared with them and their computers there. Your Martlet network and the Devices map show their computers as a friend's computer |
| Stop sharing |
Share › Friends › Stop sharing host, or Remove in Sign-in from outside (martlet-host owner-signin-disallow): the host revokes their computer at once |
| Make an identity one of your own computers instead, or the other way round | Sign-in from outside › Make one of my computers or Make a friend. The host revokes the computers it signed in with the old access, and they sign in again to get the new one. Your own computers among them also leave your network on your computers' next sync, so they lose every host |
What a friend's computer gets on a shared host:
-
The engines only. Its sign-in gives it a friend's credential
(
GatewayAccess.Friend, kept with the credential, so it stays a friend's even ifsignin.jsonis lost). The host lets it read the version, the capabilities and the status, use the engines that serve only the request that asks (thinking, listening, speaking, lip-sync and reading), and cancel its own requests. Picture making and singing keep the whole host's queues, results and models, so they stay yours: the host leaves them out of a friend's capabilities and refuses them. Every other route refuses a friend too (access.friend) before anything is read: pairing, the network, the hardware report, who does what, voices, speaking voices, characters, creations, Home Assistant, settings, memories, API keys, commands, logs, GPU priority, the security audit and the sign-in settings. These refusals never lock a friend out. -
A few computers each. A friend keeps at most three computers on a host.
Signing in on a fourth replaces (revokes) their oldest. All friends together
keep at most 32 computers on a host; then a new one is refused
(
signin.friends_full). So friends can never fill the room the host keeps for your own computers' pairings. -
Never in your network. The host never attests a friend's computer, and a
friend can't ask to join. A friend can't sign in under another computer's ID
(
signin.device_taken). -
Your requests first. A friend's request ranks below all of your work.
Any of your requests that needs the same graphics card stops it
(
job.preempted), and while your work uses the card the host turns the friend away (job.busy, detailowner). When your request needs the same engine, the friend's request stops and yours takes its place within moments. So sharing a host never makes your own replies wait for a friend. - Voices stay apart. A friend's speaking requests carry the friend's own recordings. They never reach your speaking voices, and the host keeps nothing a friend sends.
-
You can see them. The host's answer to your computers marks a friend's
computer (
accessfriend), the sign-in settings list the friend's computers, and the host log names their requests (request from friend <device>). In the app, Your Martlet network and the Devices map show them as a friend's computer (never as one of yours, and never as a computer to let in), and Share › Friends lists each person. -
Taking access away. Removing the friend's identity revokes their computer
on that host at once (from a member desktop) or within 5 seconds
(
martlet-hosteditingsignin.jsonwhile the host runs). A running request of theirs stops too. Nothing is recorded for your network: they never joined it.
Share › Friends reads the sign-in settings of each of your hosts (only while the Share page shows, at most every two minutes, or on Check now; never on a reply's path, so it adds no conversation latency). It lists each person who is a friend on one of your hosts or who signed in to one and waits: the hosts shared with them, their computers there, and Share or Stop sharing for each of your hosts where their provider is set up. It works the same for every host you manage from the app: this PC's own host service, a Linux host and a Windows host. An identity that is one of your own computers' sign-ins somewhere is not listed; change it in that host's Sign-in from outside. A host that runs a Martlet older than friend sharing can't share: the app says to update it first. Allowing one of your own computers there works as before.
When the host's sign-in answer says friend, your friend's Martlet keeps the
pairing as a host shared with that PC (access friend with the pairing in
hosts.json). It never adopts it into its own Martlet network and never asks
to join through it.
- Share › Hosts shared with this PC lists each one: who they signed in as, the engines it offers that PC (its capabilities, read on start, when the page shows and on Check now), and what that PC uses it for. Use for thinking, listening, speaking, lip-sync or reading hand that job to it; the job choices on the Devices page and the Companion pages list it too, as shared by a friend. Forget gives the jobs back to what they used before and removes the pairing.
- This PC only. A job on a shared host is that computer's own choice: it is never recorded in your friend's shared plan (who does what), never followed by their other computers, and never moved by the plan. Leaving it, the computer follows the plan again. A job that still names a shared host after it was forgotten never goes into the plan either.
- Never mixed with their own hosts. A shared host and one of your friend's own hosts never replace each other under the same name. Join with an invite refuses a friend's host named like one of theirs. Their network doesn't pair one of their own hosts named like a shared host (the log says so) until they forget the shared one. Even with the same home address (two homes can use the same private address), each is reached on its own route.
-
Engines only. Nothing between your friend's own computers talks to a
shared host: not the network sync, the plan, shared settings, memories,
voices, speaking voices, characters, creations, Home Assistant, API keys,
logs, commands, the security audit, live GPU holds, or hardware and update
reads. So normal use never meets
access.friend. Picture making and singing never use a shared host. -
Your work first. When the host turns your friend's request away for your
work (
job.busywith detailowner, orjob.preempted), their Martlet tries another of their own computers that runs the engine at once, or tries the host again on the next request; background work goes on later. It never waits in line for your host. The first time, it says so in plain words. - Voices stay theirs. Speaking on a shared host sends the voice's recording with each sentence from the first one (the host keeps nothing).
-
Access taken away. When you stop sharing, the host answers
auth.revoked, and the card says that its owner stopped sharing it.
People who don't run Martlet can use the language models your hosts run from any app that works with the OpenAI API, with a key you give them on Share › Share your language models (OpenAI-compatible endpoint). Like a friend, they get the models only and come after your own work. Unlike a friend, they need no Martlet and no sign-in, and one address reaches the models of every host of your network.
| Piece | Location |
|---|---|
| Roster format and rules |
Martlet.Core.Network (NetworkRoster, NetworkKey, NetworkPairing) |
| Host side |
Martlet.Gateway GatewayNetwork.cs: GET/POST /martlet/v1/network (roster, join requests, the computers paired with the host, the Martlet release it runs), /network/join, /network/deny, /pair/member (gateway contract); network.json on Linux hosts (Linux gateway) |
| Desktop sync |
Martlet.HostClient/NetworkSync.cs (NetworkSyncEngine, NetworkLocalState; ReadOnlyAsync for a host PC that only watches), Martlet.HostClient/NetworkFind.cs (NetworkHostFinder: hosts found on the home network; NetworkReach: what isn't the same everywhere yet, and why), Martlet.HostClient/HostNetwork.cs (client calls, pairing by itself, PairFoundAsync, bringing the roster) and Martlet.HostClient/HostRelease.cs (what an announced release means to this PC) |
| Desktop UI |
MainWindow.Network.cs, the Your Martlet network card on the Share page; NetworkMap.cs draws the network's computers on the Devices map; MainWindow.HostReleases.cs takes the releases hosts announce; the host PC's Home steps in MainWindow.HostDashboard.cs; NetworkIdentity.cs for the key and network.json
|
| Diagnostics | The desktop log records the network as this PC sees it whenever it changes (membership, requests to join, who each host is paired with) and each host's note (Martlet network: ... lines on the Diagnostics page or MCP logs_tail) |
| MCP |
network_status (this PC's network from a data directory), network_selftest (end-to-end rehearsal on loopback, Martlet.NodeLinkCheck network, with a host added where the other computers can't reach), role_lab add_host (a host the desktop can't reach, for the NetworkGap card and the map), exposure_selftest (the gateway's guard for a host reachable from outside home, Martlet.NodeLinkCheck exposure), host_move_selftest (a host whose computer got a new address, Martlet.NodeLinkCheck move) and hosts_find (one find on the home network); card IDs in MCP
|
| Sign-in |
Martlet.Gateway GatewaySignIn.cs (GatewaySignInService, settings rules, signin.json, household account logins), GatewayAccounts.cs (password verifier, recovery codes), GatewaySignInHttp.cs (/martlet/v1/signin, /begin, /complete, /prove, /settings); Martlet.Core Access/Totp.cs, Accounts/AccountAttestation.cs and Network/NetworkInvite.cs; desktop Martlet.HostClient/HostSignIn.cs (ProveAsync, ProveWithPasswordAsync, ProveInBrowserAsync), SignInJoinWindow, SignInSettingsWindow; Linux HostSignIn.cs (owner-signin-*, owner-invite); MCP signin_selftest, signin_lab mode account
|
| Friends |
GatewayAccess (GatewayContracts.cs), kept with each credential (GatewayCredentialStore.cs, StoredGatewayCredential.Access); deny by default in GatewayAuthentication.cs (GatewayRequestAuthenticator) with GatewayApiAccess.Friends per route (GatewayRouteHandler.Authorize); GatewaySignInService.FriendAllowed; owner first in GatewayInferencePriority.cs and GatewayInferenceRegistry.cs (BeginAsync). Desktop: HostSignInAccess (AllowChange) and access on sign-in answers, settings and network devices (Martlet.HostClient/HostSignIn.cs, Martlet.HostClient/HostNetwork.cs); HostRoutes.KeepApart (a shared host's routes apart from your own host at the same home address); SignInSettingsWindow (access per identity, switch, remove); MainWindow.Friends.cs and Friends.cs (FriendsOverview: Share › Friends and Hosts shared with this PC); PairedHost.Access (HostControl.cs); ClusterSync.Local (LocalJob.Shared) and ClusterSync.Recordable; WorkSharingRoster.Classify and WorkRefusal.Owner (owner first); MCP network_status (pairedHosts[].access, friends) and signin_lab (mode owner or friend) |
| Share links |
Martlet.Core Network/ShareLink.cs (format, Verifier); gateway GatewaySignIn.cs (provider link, GatewayShareLink, share-link and remove-share-link) and GatewaySignInHttp.cs (/martlet/v1/signin/shared); desktop Martlet.HostClient/HostSignIn.cs (SignInWithShareLinkAsync, ReadSharedHostsAsync, HostSignInSettings.Links), ShareLinks.cs (share-links.json, Plan), MainWindow.ShareLinks.cs, ShareLinkWindow.cs, ShareLinkProtocol.cs (martlet: links) and WindowsCredentialStore (*ShareLinkSecret); MCP network_status (shareLinks) and signin_selftest
|
| Router port |
Martlet.Core Network/RouterPorts.cs (UPnP IGD); desktop RouterPort.cs (router-port.json), MainWindow.RouterPort.cs (renewal), the Outside access dialog in MainWindow.Outside.cs and WindowsFirewall (Martlet-Host-Gateway-Outside); MCP network_status (routerPort) |
| Outside home |
Martlet.Gateway GatewayGuard.cs (guard, exposure choices, audit), GatewaySecurityAudit.cs (GET /martlet/v1/security/audit) and GatewayOverlayListeners.cs (listening on overlay addresses); desktop Martlet.HostClient/HostSecurity.cs (ReadSecurityAuditAsync), Martlet.HostClient/HostRoutes.cs (which address a connection dials) and the Outside addresses button (MainWindow.Network.cs); NetworkMember.Addresses in Martlet.Core; Linux HostExposure.cs (martlet-host owner-exposure, exposure.json); Docker holder publishing in deploy/host/lib/docker.sh (ensure_holder) and LocalHostService.ParseHolder
|
| A new home address |
Martlet.Core Network/HostFind.cs (the find question, HostFindResponder, HomeAddresses); gateway GatewayHomeListeners.cs and GatewayServer.StartAsync (follow the computer, answer finds); Linux answer-finds (HostApplication.cs); deploy/host/lib/docker.sh (ensure_keeper, follow_home, cmd_keep, home); desktop Martlet.HostClient/HostRoutes.cs (look, Moved, Remember), HostRegistry.Moved and HostPairings.KeepMoved (HostControl.cs, movedTo in hosts.json), MainWindow.Outside.cs (KeepMovedHost), MainWindow.HostMove.cs (this PC's host service), the Nearby responder (Nearby.cs) and HostShell (the paired host's SSH key decides); MCP hosts_find and host_move_selftest (Martlet.NodeLinkCheck move) |
Apps and scripts outside the network (Home Assistant, your own scripts) don't join it: they use API keys, which belong to the network too. A key made or revoked on any member PC reaches every host the same way as the who does what plan, and grants nothing in the network itself.
Finding a host after its computer got a new address is checked through Martlet
MCP's host_move_selftest (a real gateway on 127.0.0.3 whose certificate names
the address it was paired at, its real find answer and a desktop's real paired
connection: found at the new address with the same key, dialed there at once
next time, another key that answers for the host's ID never used, and back at
the paired address), hosts_find on the real home network, unit tests on
Windows and Linux (HostFindTests, HomeListenerTests with a real gateway
whose home address is gone, HostMoveTests, HostMovedTests) and the Docker
keeper and martlet-host home on a real Linux Docker engine in Docker (an
address removed while the holder runs, and an engine restart that loses it).
A real router giving a real computer a new lease was not part of these checks.
Joining from outside home by signing in is checked through Martlet MCP's
signin_selftest (a real gateway on 127.0.0.1: owner account with a real
authenticator secret, invite pinned by an outside name, refusals, sign-in,
joining on the host's attestation without a check number, an OpenID Connect
provider with an issuer in the process and a simulated browser through the
desktop's real loopback redirect, a Steam assertion confirmed by the host,
removing an identity removing its tablet from the network so a second host
revokes it too, revocation, audit, and a host shared with a friend: the
friend's computer signs in with a friend's credential, lists the engines, is
refused on every other route (access.friend) and never joins, a sign-in under
the home PC's ID is refused (signin.device_taken) and stopping sharing revokes
the friend at once), the gateway, Core, desktop and Linux
gateway unit tests (RFC 6238 vectors, lockout, allow list, removal records,
readiness, outside addresses kept with pairings, martlet-host owner-signin-*
and owner-invite on a fixture file system, friend access on every route
(pictures and singing refused and left out of a friend's capabilities), at most
three computers per friend and 32 for all friends,
device ID takeover, access changes, a friend's access kept across a restart of
the protected store, and the owner first on a fixture Ollama: the owner's reply
stops a friend's request on the same worker and takes its slot, a friend is
turned away while the owner uses the card, and the owner's pool work stops a
friend's reply), the real martlet-host process
in Docker on this PC (owner account set up over stdin, status, invite,
signin.json 0600, sign-in over pinned TLS against the approved service), and
the desktop itself through MCP signin_lab on a disposable data folder: the
desktop pairs with a live lab host (secret in the lab credential folder),
founds the network, lets the signed-in laptop in on the host's attestation,
signs the host's outside address into the roster and keeps it with its pairing,
shows the live host in Sign-in from outside, and Remove and remove its
computers from the network makes it remove the laptop, which loses the host.
Sharing a host with friends on the desktop side is checked by signin_selftest
(the desktop's client reads access back from the sign-in answer, the sign-in
settings and the host's network answer, and a friend change that the host
can't read is reported as update it first, signin.friends_unsupported), the
desktop, Core and Audio2Face unit tests (SharedHostsTests: a shared pairing
kept with its access, never one of your hosts on the map or in the plan (not
even after it is forgotten), a friend's computer shown as one, a shared host
and your own host with the same home address reached apart, a shared host and
your own pairing never replacing each other under one name, the owner-first
refusal moving a request on, Share › Friends' per-person overview;
WorkSharingTests: a live request passes a shared host whose owner needs it at
once, and background work goes on later; HostSignInSettingsTests: a member
allow sends no access, so older hosts take it), and the
running desktop against a live lab host through MCP signin_lab, headless:
with mode friend and signInDesktop, a desktop holding a shared pairing
read only the host's engines (it offers this PC: Thinking) and, over 80
seconds of its background loops, the host refused it nothing
(accessFriendRefusals 0), it never asked to join and it made no network
key; the same build with the pairing's access removed (as before this
change) was refused 32 times in 50 seconds (access.friend). With mode
owner and shareWithFriend, the owner's desktop founded its network, let
its laptop in, named the friend's computer a friend's computer in its network
log, and never let it in.
NOT RUN: a laptop signing in over the real internet, Windows Credential
Manager itself in that flow (the lab folder stands in), a native (non-Docker)
Linux host or the packaged martlet-host wrapper, signing in at a real
Authentik, Authelia, Keycloak, Pocket ID, Google, Discord or Steam (no
disposable accounts on the development PC), martlet-host owner-signin-allow --access friend in a real martlet-host process (the fixture file system
stands in), and driving the new windows and cards through UI Automation
(Share › Friends, Sign-in from outside's access buttons, Join with
an invite as a friend, Hosts shared with this PC and a reply through a
shared host from the talk window): the development PC's Windows session was
locked, so ui_connect couldn't see the desktop window.
Checked on the Windows development PC through Martlet MCP: network_selftest
(three real gateways on 127.0.0.1 with simulated desktops and a simulated
host PC: founding, binding, joining with a check number, a host telling a paired
computer outside the network who uses it and when each was last active, a
member letting in a desktop paired with its own host service without a second
Allow while one asking through another host still waits, a host
PC outside the network watching without starting or joining one, pairing by
itself, refusing forged keys and rosters, removing a host and pairing it back,
removing a desktop, every host announcing the Martlet release it runs and a
desktop taking an announced update) and the desktop's Devices card on a
disposable data folder
(members listed, a pairing attempt to an unreachable host reported, Remove
from network signed and saved; as a host PC that started the network, the sync
running and logged; as a host PC in no network, watching only, with no key or
network.json made). The Devices map was checked the same way on disposable
host-PC and companion data folders with a signed roster, a shared plan and the
other computers' pc.<device ID> entries: the other member computers shown as
devices, each computer that runs a host service shown as one device with both
IDs (a companion with its own Parakeet listening, a host PC with none), a host
PC's jobs placed from the plan (its own host service speaking and doing
lip-sync, the cloud model) and one host service row. The gateway and Linux gateway unit tests pass. NOT RUN:
a native or Docker Linux host keeping network.json, martlet-host network-reset, the SSH flow adding a real Linux host to a network, the desktop
window listing computers reported by a live host, letting a computer in through
its own live host service or following a live host's
update (all need a pairing secret in Windows Credential Manager) and two
physical PCs on a real LAN.
Reaching the network from outside home is checked on real sockets with MCP
outside_path_check: this checkout's Linux gateway (owner-init,
owner-exposure, owner-pair, serve) in disposable containers on a Docker
network numbered from TEST-NET-3, its port published on 127.0.0.1, so it sees
every connection coming from 203.0.113.1 (outside). The desktop's real pairing
client, connection, network sync and route fallback reach it with its home
address dead: a typed code is refused from outside and a device card pairs, the
roster signs the address the host advertises, home fails and the outside
address answers (the next connection goes straight there), a stranger is locked
out on the sixth request and the audit and host log name 203.0.113.1;
owner-exposure refuses an outside address before sign-in (exit 5) and accepts
it once owner-signin-owner set an owner account with an authenticator; and with
signin.json removed from the running host, the paired desktop and a stranger
get outside.paused while sign-in's settings still answer the owner. Also
exposure_selftest (loopback, every guard rule), host_engine_check's
exposure steps (the engine) and node_link_check's exposure-command (the
host.exposure command through a real gateway and the desktop's agent loop).
NOT RUN: a real router port forward, an internet path, another computer on
an overlay network, and saving Outside access against a live host service (it
restarts that service). exposure_selftest's last step reaches a gateway on
this PC's home address through this PC's own Tailscale address (refused as
outside home until sign-in is set up, then answering), when the PC has one.
Martlet: download · repository · changelog · issues
These pages come from docs/wiki in the repository. To suggest a change, open an issue or a pull request there.
- Home
- Accounts and households
- Accounts and Household
- Android phones and tablets: what it takes, and the plan
- Martlet's API for other apps and scripts
- App Guides
- App Settings and Updates
- App guides: game and app knowledge from the web
- Architecture
- Bounded PCM playback
- Audio dependency inventory and notices
- Avatar guide: Live2D, VRM and speech animation
- V01a explicit microphone capture
- Chatterbox voice engines
- Cleaning up disk space
- One Martlet on all your computers
- Companion controls and behavior requirements
- Components, jobs and placement (design)
- Live conversation
- Creations
- Decision map: which file owns each decision
- Deep research: web search and long research jobs
- The desktop app: updates, notification area, exiting and appearance
- Linux and macOS desktop companion: research, decision and plan
- Developer Guide
- Dia voice engine
- Diagnostics
- Discord
- Architecture and provider contracts
- Discord
- Memory (P03a/P03b/P03c)
- Singing
- Desktop troubleshooting and local support
- Recognizing people by voice, and Parakeet
- Echo cancellation
- ElevenLabs voice: your cloned voice with tones
- F5 worker and reference-voice foundation
- FAQ
- First Steps
- Game state plan: implementation history
- Glossary: one name for each concept
- GPT-SoVITS voice
- Hosted Thinking: cloud models when Thinking can't run on this PC
- Installation and support
- Installing Martlet
- iOS and iPadOS: what it takes, and the plan
- Repository instructions for coding agents
- Repository knowledge base
- Knowledge base maintenance
- GitHub Wiki mirror
- Linux and Mac
- Listening and Voice ID
- Local model apps
- Lorebooks
- macOS: what it takes, and the plan
- Martlet MCP Server
- MCP in Martlet
- MCP: The app's window
- MCP: Apps, home and memory
- MCP: Characters
- MCP: Diagnostics and logs
- MCP: Computers, network and accounts
- MCP: Other
- MCP: Tool permissions
- MCP pages
- MCP: Server and protocol internals
- MCP: Settings
- MCP: Start here
- MCP: Thinking and models
- MCP: Voice and listening
- Memory
- Messaging apps
- Model catalog: sources, conflicts and design
- Motion host role
- Multiple Computers
- Your Martlet network
- OCR host role
- Share your language models: the OpenAI-compatible endpoint
- Packaging
- Perception worker contracts
- Personality and Characters
- Picture making
- Pictures and Creations
- Picture making host role
- Platforms: what each device can do
- Prerequisites: what Martlet bundles, installs for you, or needs from you
- Privacy and Safety
- Reading the text on your screen
- Wiki source
- Recommendation design: ask three questions, plan for three situations
- Recommended setups: one machine to unlimited budget
- Releasing
- Repository Layout
- Research and provenance ledger
- Resource footprints
- Roadmap
- Watch my screen: screen-aware commentary
- Search engine
- Image and audio models: who sees, who hears, who answers
- Setting Up a Host
- Setup, Windows credentials and local audio
- Sharing with Friends
- Singing
- Smart Home
- Smart home and cameras
- Source Projects
- Talking to Martlet
- Telegram and WhatsApp
- The Character
- Thinking
- Tools and MCP
- Troubleshooting
- Martlet desktop UI design
- User stories and target flows
- Voice activity detection
- Validating changes
- Validation and Testing
- Vision
- Voice latency: from you stopping talking to Martlet's voice
- Voice recognition host role
- Multi-engine voice setup and comparison
- Voices
- The welcome wizard
- XTTS-v2 voice engine