Share LLLanyard across your devices or with your team
One machine holds your real API keys. Every other device, or every member of your team, gets a placeholder token that only works through that machine. Nothing goes to a cloud service: the keys stay in that one machine's keychain or encrypted vault, and the other devices only ever hold tokens.
- Pro: share between your own devices, such as a laptop, a desktop and a home server.
- Team: share on your network with the other members of your team. Each member needs a Team seat.
The set-up is the same for both. Only who the tokens are for changes.
What you need
- An always-on machine to hold the keys: a desktop, a Mac mini, a small Linux server or a virtual machine. LLLanyard must be installed on it (
npm install -g @lllanyard/cli, Node 22 or later). - A Pro or Team licence, activated on that machine:
lllanyard license activate lly1.… - A name the other devices use to reach it, and a TLS certificate for that name. LLLanyard won't share over plain HTTP, because tokens would cross the network unencrypted.
The other devices don't need LLLanyard at all. Their tools just need an address and a token.
1. Get a name and a certificate
Choose one of these:
- Tailscale (easiest, and best for Pro). Install Tailscale on the key machine and your other devices. Turn on HTTPS certificates in the Tailscale admin console, then on the key machine run
tailscale cert mymac.tailnet-name.ts.net. You get a certificate that every device already trusts, and the machine can be reached from anywhere without opening any ports. - Your own domain (good for Team). Point a name such as
keys.example.comat the server's office network address, and get a certificate for it, for example from Let's Encrypt using a DNS challenge. Devices trust it automatically. - Your company's own certificate authority. If you already have an internal CA, issue a certificate from it for the server's name.
Keep the certificate's private key readable only by the account that runs LLLanyard: chmod 600 key.pem. LLLanyard refuses to start if other users can read it.
2. Start the shared proxy
On the key machine, add your keys as usual (lllanyard add anthropic, lllanyard add openai), then:
lllanyard serve --host 0.0.0.0 --port 3443 \ --tls-cert cert.pem --tls-key key.pem \ --allow-host keys.example.com
--allow-host must be the exact name the devices use, such as your .ts.net name or keys.example.com. Requests that use any other name are refused, which protects against DNS rebinding. You can give --allow-host more than once.
Only let your own network reach port 3443: allow it in the machine's firewall from your office or Tailscale addresses, and don't forward it from your router to the internet. After 10 wrong tokens in 10 minutes, an address is locked out for 15 minutes. That lockout is a second line of defence, not a reason to expose the port.
3. Make a token for each tool
Each AI tool on each device gets its own token, and each one counts as one agent. Pro allows 10 per user. Team has no limit.
lllanyard agent create laptop-claude-code --providers anthropic --expires 90d lllanyard agent create alice-cursor --providers openai --expires 90d
Each token is shown once. --providers limits which keys a token can use, and --expires makes it stop working after the time you give. For agency or client work, --client acme limits it to the keys you added with --label acme.
4. Point each tool at the shared proxy
On the other device, set the tool's base URL to the key machine and use the token as its API key. For Claude Code:
export ANTHROPIC_BASE_URL=https://keys.example.com:3443/anthropic export ANTHROPIC_API_KEY=lly_… # the token, not your real key
For the OpenAI SDK and tools built on it:
export OPENAI_BASE_URL=https://keys.example.com:3443/openai/v1 export OPENAI_API_KEY=lly_…
Other providers use https://keys.example.com:3443/<provider>. The token is useless anywhere else, so it's safe on a device you might lose.
Running it as a server (Team)
A server with no desktop login has no OS keychain, so use the encrypted file vault. Make a passphrase file that only root can read:
sudo mkdir -p /etc/lllanyard openssl rand -base64 32 | sudo tee /etc/lllanyard/pass >/dev/null sudo chmod 600 /etc/lllanyard/pass
Add keys and tokens with the vault switched on:
export LLLANYARD_BACKEND=file LLLANYARD_VAULT_PASSPHRASE_FILE=/etc/lllanyard/pass lllanyard license activate lly1.… lllanyard add anthropic --stdin < key.txt && shred -u key.txt
Then run it as a service, so it starts with the server. A systemd example, /etc/systemd/system/lllanyard.service:
[Unit] Description=LLLanyard shared proxy After=network-online.target Wants=network-online.target [Service] User=lllanyard LoadCredential=pass:/etc/lllanyard/pass Environment=LLLANYARD_BACKEND=file Environment=LLLANYARD_VAULT_PASSPHRASE_FILE=%d/pass ExecStart=/usr/bin/lllanyard serve --host 0.0.0.0 --port 3443 --tls-cert /etc/lllanyard/cert.pem --tls-key /etc/lllanyard/key.pem --allow-host keys.example.com Restart=on-failure [Install] WantedBy=multi-user.target
Run the key and token commands as the same lllanyard user, so they use the same vault (by default ~/.lllanyard/vault.enc; set LLLANYARD_VAULT_PATH to choose another place). Then run sudo systemctl enable --now lllanyard. The certificate and its key must be readable by that user. Renew the certificate before it runs out, then restart the service.
Day to day
- See who used what:
lllanyard usagebreaks requests down by token, andlllanyard dashboarddraws it as a chart. - Someone leaves, or a laptop is lost: run
lllanyard agent revoke alice-cursor. The token stops working within about 10 seconds. Your real keys don't need changing, because the token never was one. - Rotating a real key: replace it on the key machine only (
lllanyard add openai). Every device picks up the new key straight away, with nothing to change on them. - Back it up:
lllanyard backup --out lllanyard.backupwrites one encrypted file with your keys, tokens and licence.
Honest limits
Anyone who can log in to the key machine as the account running LLLanyard can reach the keys, so keep that machine locked down. LLLanyard ignores X-Forwarded-For, so a reverse proxy in front makes every device look like one address in the logs and the lockout. The security model covers this in full.
Try it: LLLanyard is free for up to 10 keys.
npm install -g @lllanyard/cli lllanyard doctor