Security model
Who can reach your computer, and what they can do there
Activation and pairing
- You activate a computer once: the app scans its activation QR and sends the store's proof of purchase to the activation service; the computer's page then shows your phone's name and a 6-digit code, and nothing goes on until you click Confirm on the computer (Not me stops it).
- A phone joins with a pairing code: 12 characters, one use, 5 minutes, at most 3 open at once. Codes come
from the computer (the QR page, which answers only on 127.0.0.1 and, on Windows, only to programs of your own user
account; or
locus pair) or from a phone that may add or remove devices. Anyone who sees a code within those 5 minutes could pair: keep it to yourself. - After 30 wrong codes in 10 minutes, from all addresses together, pairing closes for 15 minutes; a code made on the computer opens it again.
- The app shows the computer's address and asks before it pairs, also when a link opened it.
Device keys
- Each paired device gets its own key (43 characters), shown to it once. The computer keeps only its SHA-256, in the device list; at most 20 devices.
- On iPhone the key stays in the Keychain of this iPhone (never synced to iCloud), behind Face ID or the passcode when the app lock is on (the default). On Android it is sealed with a key from the Android Keystore and left out of backups.
- Every request carries the key; it is compared in constant time. Ten wrong keys from one address within 10 minutes block that address for 15 minutes.
- Sign a device out at any time, from the computer (
locus devices revoke <id>) or from a phone that may add or remove devices. Its key is refused from then on, and a request it is running ends within about a second; the other devices keep working.locus reset-keyssigns every device out at once. - The computer also has a master key, used by the computer itself. Pairing never hands it out, and the app refuses to keep one.
The right to add or remove devices
A device that may add or remove devices can make pairing codes, rename or sign out any device, change the AI tool new chats get (Make default) or add an address (Other…), load one of Locus's models while your own llama.cpp or KoboldCpp runs, and save or remove the web search key. A device without it chats, chooses the AI tool of its own chats (Use for this chat), loads, unloads and downloads models, and can sign itself out, but cannot touch the other devices or change the default.
A phone paired from the computer has the right unless the code was made with --no-manage; a phone
paired from another phone has it only if you allowed it when you made the code. Change it with
locus devices manage <id> on|off.
What a phone can never do
- Choose a program, its options, a port or a folder for an AI tool, remove a model, read a tool's log, or reach a
tool's own web page. Only the computer does those, with
locus manageandlocus models. - Make Locus start a program by what a tool says about itself over the network: that only names a tool, or makes
Locus look. Which program Locus may start is decided on the computer: by the operating system, when Locus finds a
tool running under your own account, or by you, with
locus manage. A phone never names a program, a path, an option or a port. - Run a command of the computer: the
locuscommand talks to the admin port, on 127.0.0.1 only, with a token only your user account can read; the tunnel never reaches it.
What you choose to share is shared read-only:
- Shared folders. A phone can share a folder of the computer with a chat, by its path (40 folders at most, 8 per chat). The model can list, read and search it, never change it. The computer refuses risky places: a drive root, network paths, system folders (Windows, Program Files, ProgramData, AppData), LM Studio's and Locus's own folders, and any path with a part that looks like a secret.
- Copies from the phone (Windows only): text files only, 2 MB a file, 50 MB a copy, 1 GB in all, and 5 GB must stay free on the disk; files whose names look like secrets are left out. A finished copy is shared read-only.
- Web, when you turn it on in a chat: the model can only open public
httpspages. The computer resolves each address itself and refuses it unless every address it finds is public; it follows at most 5 redirects, checking each, sends no cookies and reads at most 3 MB. The page's text reaches the model marked as untrusted, and every address it opens is shown. With Web on and folders shared, the app warns you that a page could try to make the model send folder text to a website.
Pinned programs
- When llama.cpp or KoboldCpp is registered, by Locus itself or by you with
locus manage, Locus checks the program without running it and keeps a SHA-256 of it and of the libraries in its own folder. The program must be a real program file, not in a temporary folder or one of Locus's own folders, and neither it nor its folder may be changed by another account of the computer. - By itself, Locus takes only a program running under your own account, as the operating system reports it, and
named like the tool (
llama-server*,koboldcpp*). A copy started with "Run as administrator", or by a service, a remote shell, a scheduled task or another account, is not taken; nor is another app's own copy (Ollama, Jan and LM Studio run their own llama-server).locus manage <tool> --offtells Locus never to take that program by itself. - After you update a registered program, Locus checks it again with every rule above and pins it again by itself
at the next Load (a line in
main.log, an audit line and a notification). If a check fails, the Load is refused in plain words, andlocus manage <tool> --repinsays why. - Locus starts these tools on 127.0.0.1 only, with a new key (llama.cpp) or password (KoboldCpp) at each start, and never stops a program it did not start.
- The first install downloads Python and the tunnel program and checks each file against a fingerprint built into the plugin; any file that differs is refused. Locus checks its own release files against their list before it starts.
The voice (Windows)
locus voice get, run on the computer, is the only way the voice is installed. It downloads over HTTPS from PyPI and Hugging Face only, checks every redirect, and checks each file's size and SHA-256 against values built into Locus; a file that differs is refused, and the folder is left as it was.- The voice runner is a small separate program, open source (Apache-2.0), that imports only Python's standard library and the speech engine. It listens on 127.0.0.1 only and needs a key on every request: a new key at each start, passed in its environment, never on a command line.
- Locus starts it at the first Listen, at below-normal priority, with about half the computer's cores, and stops it after 10 idle minutes.
- It reads the computer's own stored copy of an answer, never a text a phone sends. The sound is made in short parts that live in memory only, never on disk; the logs hold counts (characters, parts, seconds), never the text.
- A phone may ask for 60 readings an hour at most. An App Review device never sees Listen and is refused on every speak route.
The certificate and the encryption
- Windows (activated): Locus serves HTTPS with the computer's own certificate. The relay passes the encrypted bytes on and cannot read them: the encryption ends on your computer. The pairing QR carries the certificate's SHA-256 fingerprint, and the app accepts that certificate and no other for your computer.
- macOS and Linux previews: by default they serve plain HTTP behind the tunnel, so the HTTPS ends on the
relay server, which could read what it passes on; end-to-end encryption there is planned. On the developer's own
installs,
locus pin on(certificate mode) makes them serve their own certificate as Windows does; it needs a matching change on the relay server, and every phone pairs again. It is refused on Windows and on an activated install. - Keys on disk: on Windows the tunnel login and the Brave Search key are sealed with Windows' DPAPI, and the secrets folder is open to your user only. On macOS and Linux the keys are files only your user can read; an administrator (root) of the machine can still read them, and on a rented server that includes the provider.