Core
First run
Start a leader on one machine, serve a model, send the first request, and add a second machine.
In short
This page starts a one-machine cluster: the leader and the engine on the same host. You send it a chat request, then add a second machine as a worker. You need opod and Ollama installed (Install). It takes a few minutes, most of it the model download.
Start the leader
By default a leader is router-only: it loads no model and serves from the workers that join it. On a single machine, tell it to serve a model itself with
OPOD_PULL_DEFAULT_MODEL=1:# Ollama must be running (macOS: open -a Ollama; Linux: systemctl start ollama) OPOD_DEFAULT_MODEL=llama-3.2-1b OPOD_PULL_DEFAULT_MODEL=1 opod upExpected output, shortened:
▶ detected darwin/arm64 · 24 GB RAM · 8 cores ▶ no node-join token yet — run `opod token create --node` (or set OPOD_JOIN_TOKEN) before `opod join` on a worker ✔ default model: llama-3.2-1b ✔ engine: ollama at http://127.0.0.1:11434 First run. Pick a starter model to install — chat works as soon as it's done. Recommended for your hardware (24 GB RAM): llama-3.2-1b — Llama 3.2 1B Instruct (1.3 GB) Install llama-3.2-1b now? [Y/n/o=pick another] ✔ model ready: llama-3.2-1b Opod is ready. API: http://localhost:8080/v1 Health: http://localhost:8080/healthz Admin API key (shown once — store it now): sk-orc-<printed once> Next steps: → Wire up Aider: opod connect aider → Wire up Cursor: opod connect cursor → See all clients: opod connect --list → Mint another admin key: opod token create ops --admin Quick test from the shell: curl http://localhost:8080/v1/chat/completions \ … Press Ctrl-C to stop.After the key,
opod upalso lists every outbound network call this process can make, so you can check its privacy posture at a glance.The first
opod upcreates an admin key, prints it once and saves it to~/.opod/admin.key(mode0600). Later CLI commands on this host read that file, so you do not type the key. The key is minted only when the store holds no key at all: a later start names the file it is saved in (Admin API key: saved in ~/.opod/admin.key), and when that file is gone it says so and points atopod token create ops --admin. The store keeps hashes only, so a lost key cannot be recovered.Up to and including 0.2.1, the key is printed on every start
In 0.2.1, every
opod upprints the admin key from~/.opod/admin.keyto stdout. When the leader's output goes to a log (a service unit, a container), that log holds the admin key: treat it as a secret, or run the leader under a manager that setsauth.admin_token, which writes no key file. From 0.3.0 only the start that creates the key prints it; later starts print the file's path.Without
OPOD_DEFAULT_MODEL, the leader picks the largest catalog model that fits the detected hardware and printsauto-selected model: …; with nothing that fits, it warnsno catalog entry fits this hardware; set router.default_model in config. The model is pulled only withOPOD_PULL_DEFAULT_MODEL=1and a reachable engine. On an interactive terminal with no model installed yet, the first run asks before it pulls:Y(or Enter) installs the recommended model,nskips,oopens a picker.--no-wizardskips the prompt; with no terminal it pulls without asking.What the first run writes
File Content ~/.opod/state.dbThe SQLite store: nodes, models, placements, keys (hashes), usage, events. ~/.opod/admin.keyThe admin key, mode 0600.~/.opod/opod.pidThe leader's PID, read by opod down; removed on exit.~/.opod/models/Weights pulled by opod (an Ollama engine keeps its own store). The leader also writes its own node row, id
local, whichopod node lsshows.llama.cpp on one machine
With
OPOD_ENGINE=llamacpp OPOD_PULL_DEFAULT_MODEL=1 opod up, opod launchesllama-server -hf <repo>for the default model when nothing listens on the llama.cpp endpoint (http://127.0.0.1:8089), and stops it on shutdown. A watchdog restarts it after three failed health checks in a row.Send a request
opod upstays in the foreground. Run the next commands in a second terminal.curl http://localhost:8080/v1/chat/completions \ -H "Authorization: Bearer sk-orc-<your-admin-key>" \ -H "Content-Type: application/json" \ -d '{"model":"auto","messages":[{"role":"user","content":"hi in 5 words"}]}'"model": "auto"resolves to the leader's default model. Any catalog id the cluster holds works too.GET /v1/modelslists them.Point an OpenAI-compatible tool at the same URL:
export OPENAI_BASE_URL=http://localhost:8080/v1 export OPENAI_API_KEY=sk-orc-<your-admin-key>opod connect <tool>prints the exact settings for 15 tools. Seeopod connect.Give a teammate a key
Do not share the admin key. Mint a
userkey per person:opod token create alice --ttl 30dThe key is printed once. A
userkey can call/v1/*only.Add a worker: mint a join token on the leader
opod token create --nodeA
nodekey is the shared secret between the leader and a worker. Mint it only on a network you trust.Join from the new machine
Install opod and an engine on the new machine, then:
opod join "http://leader.example.com:8080?token=sk-orc-<node-token>"The worker registers its hardware and engine, starts its own API on port
8081, and heartbeats every 5 seconds. The leader must be able to reach the worker on that address. On a host with several interfaces, setOPOD_ADVERTISE_ADDR=host:port.Put a model on the worker
On the leader:
opod node ls # find the worker's node id opod model add qwen-coder-7b --node n_abc123 # the worker pulls and loads itThe model is routable once the worker's next heartbeat reports it loaded.
Stop
opod down # stop the leader and unload models from the local engine opod down --no-unload # stop onlyCtrl-C on
opod upstops it without unloading, so a restart is fast. A worker stops on Ctrl-C orSIGTERM: it tells the leader it is leaving, lets running requests finish (10 seconds by default), then stops its engine.
Check it worked
opod status
opod node ls
curl -s http://localhost:8080/v1/models -H "Authorization: Bearer sk-orc-<your-admin-key>"opod node lslists the leader aslocaland the new worker asn_…, bothready.GET /v1/modelslistsllama-3.2-1bandqwen-coder-7bonce the worker's next heartbeat reports the model loaded.- The chat request in step 2 answers
200withchoices[0].message.content.
If it fails
| Output | Fix |
|---|---|
⚠ engine (ollama) at http://127.0.0.1:11434 is not reachable and a start command | Start the engine, then opod status. The leader still starts and serves from workers. |
opod: config: parse ~/.opod/config.yaml: … | Fix the YAML. |
opod: server: listen tcp :8080: bind: address already in use | Another process holds the port. opod down, or set listen. |
opod: catalog: … | A catalog override file is broken or unsigned under your signature policy. opod doctor names it. |
401 missing_api_key or invalid_api_key on the chat request | Send Authorization: Bearer with the admin key from the banner, or from ~/.opod/admin.key. |
The worker is not in opod node ls | The token is wrong or revoked, or the leader cannot reach the worker on port 8081. See Troubleshooting. |
Next
- Concepts explains placement, gangs and front doors.
- Clusters covers drain, remove and model moves.
- Configuration lists every
config.yamlfield.
Last updated · Source: content/docs/core/first-run.mdx · View as Markdown