Official wording · as of 2026-11-10

Share magpie with a team: gateway-key, LAN sharing and sync across machines (November 2026)

How do you use magpie with a team or several computers? As of 2026-11-10, per magpie's official reference: on the computer that runs the gateway, turn on Settings → Network and sharing → Share on local network and create a gateway key for each coworker or computer (magpie gateway-key add); each key can have its own limit and its own models, and a request from another machine without an enabled gateway key gets 401. If the other computer runs magpie too, add this one there as a Remote magpie. To move to a new computer or keep several in step, use magpie backup and magpie restore, or Settings → Sync and backup. Gateway keys are separate from the API keys you save on providers: with QCode, the team needs one QCode key, kept on the computer that runs the gateway.

Updated 2026-11-10

Point this tool at the QCode endpoint — one key for Claude, GPT and Chinese models.

#share magpie with a team#magpie gateway-key#LAN sharing#sync across machines

Four ways to share one magpie

Gateway keys

One per person, with a limit and a model list

Turn on Settings → Network and sharing → Share on local network, then open Gateway → Gateway keys → Add gateway key. In a terminal: magpie gateway-key add, list, limit and models. Gateway keys are separate from your providers' API keys, which stay only on the gateway computer.

Remote magpie

Another computer calls this gateway

When the other computer runs magpie too, pick Another computer's magpie in its Add sheet and enter this computer's address and a gateway key. Its own magpie still wires its agents, while the providers, routing groups and usage are the shared one's.

Docker

On a server or a NAS

The official image is ghcr.io/yetone/magpie; 3425 is the gateway agents call and 3430 the browser UI, and MAGPIE_WEB_KEY keeps the UI key across restarts. Every request from outside the container, the host's own included, must carry an enabled gateway key.

Backup and sync

Sealed with a passphrase; the server stores ciphertext

magpie backup writes a passphrase-encrypted backup and magpie restore puts it back on another computer; Settings → Sync and backup uses WebDAV, S3 or a private GitHub repository and brings every machine up to date every 3 minutes while the gateway runs.

What sharing magpie with a team means

Coworkers get gateway keys, not your provider's API key. As of 2026-11-10, magpie's official reference says the gateway issues gateway keys for clients, separate from a provider's API keys. The provider key (for example your QCode cr_ key) stays only on the computer that runs the gateway; you create a named gateway key for each coworker or computer, and their tool points its base URL at your gateway's address with that gateway key as the API key: an Anthropic-compatible client uses the address itself, and an OpenAI-compatible client adds /v1 to it (the official Docker page's examples are http://192.168.1.20:3425 and http://192.168.1.20:3425/v1), with model ids written as provider/model. Requests on loopback do not need a gateway key; once LAN sharing is on, requests from other machines must carry an enabled one, and Docker's published port and a WSL distro under NAT count as remote too.

Gateway keys: where they are, and the commands

As of 2026-11-10, the reference's UI path is Settings → Network and sharing → Share on local network, and only then does Gateway → Gateway keys → Add gateway key appear; the author's reply on issue #1496 says the same: once sharing is on, the Gateway page shows Gateway keys, and Add gateway key creates as many named keys as you need. The terminal commands, as the official text gives them: magpie gateway-key add team-a creates one (the new key is printed once), magpie gateway-key list shows ids, names, enabled state and masked keys, magpie gateway-key limit team-a week --tokens 2m --cost 5 sets a weekly limit, and magpie gateway-key models team-a qcode/* allows only the models of the qcode provider (a pattern is provider/model or provider/*, and all means every model). A coworker who holds a key can open the address they reach the gateway at plus /me in a browser, type their key, and see their own limits, their usage today and over 7 and 30 days, the models they may use, and ready-made setup for Claude Code and Codex.

Timeline

2026-09-24

Issue #28 (sync all settings over WebDAV): the author replied that the first step shipped in v0.1.28, an encrypted backup and restore with magpie backup and magpie restore.

2026-09-25

Issue #28 closed: the author wrote that v0.1.76 added Sync and backup to Settings with WebDAV sync, and that other computers join with the same passphrase.

2026-10-12

Issue #1496 (several API keys on the gateway, token usage per key) closed: the author answered that this is what gateway keys do, with a limit and a model list per key and usage totaled per key.

What the docs state, and what is still open

Stated in the official docs

1. A remote request sends an enabled gateway key as Bearer, x-api-key, x-goog-api-key or ?key=; on loopback any token works. 2. A limit can be tokens, an estimated cost in US$, or both, per day, week or month, or every N days or every N hours; a key can have up to five limits, once one is spent that key's requests get 429 while other keys are unaffected, cost is an estimate at the Usage page's prices, and requests from this computer that send no gateway key are not limited. 3. Each key can be renamed, disabled, rotated or removed on its own, and removing it revokes remote access; rotation keeps the name, enabled state, limits and usage history. 4. A backup is encrypted on your machine (AES-256-GCM, the key derived from the passphrase with PBKDF2-SHA256) and nothing in it can be read without the passphrase; a file made with magpie backup --no-keys carries no API keys, and restoring it keeps the gateway keys already on the destination. 5. Sync runs every 3 minutes while the gateway runs, the server only ever stores ciphertext, and GitHub sync requires a private repository. 6. When you set a synced agent model back on one computer, that computer keeps its own: Settings → Sync lists it under Kept on this computer, and Follow the others takes the synced value again.

Still open on GitHub

As of 2026-11-10, issue #2269 is still open. Its title says a settings.json that can't be read is carried into a backup and a sync as the defaults, taking the settings of every other machine it is put back on. On 2026-10-15 the author replied that it is fixed: with the fix, an unreadable settings.json stops a backup, a GUI export and a sync with an error, nothing is sealed or pushed, and the sync status shows the error; the fix ships in the next release, and the issue stays open until then. The author also wrote that a settings.json held open by another Windows program, or a live WebDAV, S3 or GitHub server, had not been tried.

Coworkers call the gateway, or the other computer runs magpie too

Their tool calls this gateway directly

Use this when a coworker only needs Claude Code, Codex or another tool that takes a base URL. Give them a gateway key: an Anthropic-compatible client uses the gateway address itself, an OpenAI-compatible client adds /v1, model ids are provider/model, and GET /v1/models lists them. Each key has its own limit and model list, and usage is counted per key.

The other computer runs magpie too

Add the shared one as a Remote magpie; the reference's example is magpie provider add remote-magpie sk-magpie-… url=http://192.168.1.20:3425 id=office, with sk-magpie-… replaced by a gateway key you created and the address by yours. That computer's magpie still writes its own agents' config, while the providers, routing groups (office/group/…) and usage are the shared one's; the limits the shared magpie sets on that key also show on the other computer's Usage page.

For a team or several computers: five steps

1. On the computer that will run the gateway, install magpie and add QCode (the three addresses and the import link are on /magpie-claude-code-guide). 2. Turn on Settings → Network and sharing → Share on local network and, under Gateway → Gateway keys, create one key per coworker; in a terminal: magpie gateway-key add team-a, magpie gateway-key limit team-a week --tokens 2m --cost 5 and magpie gateway-key models team-a qcode/* (qcode is the provider id magpie gives QCode when you add it). 3. Coworkers enter your computer's LAN address in their tool (the official example is http://192.168.1.20:3425, plus /v1 for an OpenAI-compatible client) with the gateway key as the API key; a coworker who runs magpie too uses the Remote magpie form above instead. 4. To move or keep a copy: magpie backup (asks for a passphrase twice), then magpie restore magpie.magpie-backup on the new computer; for a copy without API keys, magpie backup --no-keys ~/b.magpie-backup. To keep several computers in step, use Settings → Sync and backup. 5. For a server, see the Docker question below; Windows and WSL are on /magpie-wsl-windows-setup, errors on /magpie-errors-and-fixes, and moving from CC Switch on /magpie-migrate-from-cc-switch.

The team needs one QCode key, on the gateway computer

As of 2026-11-10, QCode's magpie article gives three addresses: anthropic is https://api.qcode.cc/api, chat is https://api.qcode.cc/openai/v1, and responses is https://api.qcode.cc/openai; one click on Import to magpie in the console sets up both Claude and GPT. One QCode API key serves both the Anthropic- and OpenAI-compatible interfaces, billed per token, with per-model rates on /models. For a team: the QCode key stays inside magpie, and coworkers get gateway keys, not the QCode key; the whole team then shares that key's quota and concurrency through the gateway (a personal-plan key allows 5 concurrent requests, 10 on Ultimate), and usage shows under Usage Statistics in the QCode console. To control quota and usage per person, use the Team Edition with one sub-key per member, each with its own quota; see /claude-code-team-shared-keys. Not ready for a monthly plan? Pay-as-you-go Packs start at $4 for a one-time quota you use within 7 days; if you already have a Personal Plan, add a booster pack when you need more quota.

Frequently asked questions

How do I let a coworker use magpie?

On your computer, turn on Settings → Network and sharing → Share on local network, create a gateway key for the coworker (magpie gateway-key add with a name), and have their tool point its base URL at your gateway's LAN address with that gateway key as the API key. Your provider key stays inside magpie and is not handed out. If the coworker runs magpie too, they add yours as a Remote magpie. Install and adding QCode are on /magpie-claude-code-guide.

Can magpie limit each person's usage?

Yes. Each gateway key can have its own limit: tokens, an estimated cost or both, per day, week or month or every N days or N hours, up to five limits, and it can allow only some models; once spent, that key gets 429 and nobody else is affected. On issue #1496 the author explains that usage is counted per key: Usage → Overview → Gateway keys totals tokens and cost by key, Usage → Requests can filter by key, and the exported CSV has caller_key_id and caller_key_name columns. Coworkers can open the gateway address plus /me and type their key to see their own limits and usage.

How do I sync magpie settings across computers?

Two ways. Once: magpie backup writes a passphrase-encrypted backup, and magpie restore magpie.magpie-backup puts it back on the other computer. Ongoing: Settings → Sync and backup with WebDAV, S3 or a private GitHub repository updates every machine every 3 minutes while the gateway runs, and the server only stores ciphertext; on issue #28 the author wrote that WebDAV sync arrived in v0.1.76 and that other computers join with the same passphrase. The sync issue #2269 is still open as of 2026-11-10, and the author has replied that the fix ships in the next release; see above.

magpie on the LAN or remotely returns 401: what now?

Send an enabled gateway key with the request. Once LAN sharing is on (or the gateway is on the network), requests from other machines must carry an enabled gateway key or they get 401; loopback does not need one. Create one for that coworker or computer with magpie gateway-key add and put it in their tool as the API key; when magpie runs in Docker, put docker exec magpie in front. The exact 401 text and other errors are on /magpie-errors-and-fixes.

If the team shares magpie, does everyone get the API key?

Everyone gets a gateway key. Your provider API key (for example the QCode cr_ key) is stored only on the computer that runs the gateway; a gateway key can be disabled, rotated or removed at any time, removing it revokes that key's remote access, and rotation keeps its name, limits and usage history. When you also want a QCode key and quota per person, see /claude-code-team-shared-keys: the Team Edition gives one sub-key per member, each with its own quota.

Can I install magpie on a server?

Yes. The official Docker image is ghcr.io/yetone/magpie (linux/amd64 and linux/arm64): 3425 is the gateway, 3430 the browser UI, and the MAGPIE_WEB_KEY environment variable keeps the UI key across restarts; create a key per client under Gateway → Gateway keys in the browser UI or with docker exec magpie magpie gateway-key add "Docker client". LAN sharing is not needed in the container, and every request from outside it must carry an enabled gateway key. Without a container, magpie daemon install sets up magpie serve as a background service (a systemd user service on Linux, launchd on macOS); on Windows, magpie autostart on opens magpie at login, and it serves the gateway.

Sources

Read on 2026-11-10: docs/reference.md in yetone/magpie on GitHub (the gateway keys, Remote magpie, backup and sync and background service sections); the Docker page on usemagpie.ai; the author yetone's replies on issues #28 (closed 2026-09-25), #1496 (closed 2026-10-12) and #2269 (still open). QCode: the magpie setup article, the endpoints page, the Import to magpie button in the console, the team shared keys guide, and the magpie terminal test on 2026-11-10. Model ids follow /models.

One QCode key, a gateway key for each coworker

Keep the QCode key in the magpie that runs the gateway and give coworkers their own gateway keys; one key serves both the Anthropic- and OpenAI-compatible interfaces, billed per token, with per-model rates on /models.

Not sure where to start?

Try it for a week

Small Pack: $4 for $30 of quota, valid 7 days

Use it every day

Starter: $9.00/month with $5 of quota every day — just $0.060 per $1 of quota, vs about $0.113 for the Medium Pack