Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

docs(readme): connect the provider after signing in, not before

richard-epsilla6dff2a08b9e3
diff --git a/README.md b/README.md
index 9d649a75..dc1fb163 100644
--- a/README.md
+++ b/README.md
@@ -40,9 +40,8 @@ Six steps, and at the end of them you have a running instance, a signed-in conso
that has answered you.
You need Docker, about 4 GB of disk, and an API key from a model provider. There is no account to
-create and
-nothing to sign up for. The provider key is the only credential in the story, and it never leaves
-the box except to call the provider it belongs to.
+create and nothing to sign up for. The provider key is the only credential in the story, and it
+never leaves the box except to call the provider it belongs to.
### 1. Pull the image
@@ -56,78 +55,20 @@ About 700 MB to download.
when you need two machines to run the same bytes, by naming a version in a compose file you share
with a team. Releases are listed on [Docker Hub](https://hub.docker.com/r/harnessrouter/harnessrouter/tags).
-### 2. Connect a model provider
-
-**Nothing runs until you do this.** There is no bundled model, no trial key, and no free tier
-hiding in the image. A fresh instance with no connection will start, sign you in, and then have
-nothing to run a turn against.
-
-Sign in, open **Integrations**, and press **Add Integration**. It asks three things: a name, the
-provider, and your API key.
-
-![Adding a provider on the Integrations page](docs/images/05-add-integration.png)
-
-Which models that provider serves is not your problem to configure: the product keeps that list
-and adds to it as providers ship models. Pick the provider, paste the key, and the models it
-covers appear on the row.
-
-If you run more than one provider, the mappings underneath decide which one serves a given model.
-With a single integration there is nothing to set.
-
-<details>
-<summary>Setting it from the environment instead, for a scripted deploy</summary>
-
-A connection names a provider and its credential; a policy says which connection a backend uses.
-Useful when the box is built by a script and nobody is going to open a browser:
-
-```bash
--e HR_SECRET_GLOBAL_HARNESS_CONN_ANTHROPIC='{"name":"anthropic","provider":"anthropic","api_key":"sk-ant-…"}'
--e HR_SECRET_GLOBAL_HARNESS_POLICY_CLAUDE='{"chain":["anthropic"]}'
-```
-
-There is one policy variable per backend: `…POLICY_CLAUDE`, `…POLICY_CODEX`, `…POLICY_HERMES`. An
-OpenAI-compatible endpoint of your own takes the same pair with a `base_url` added, and
-`"provider":"openai"` rather than the `"openai-api"` that `.env.example` still shows:
-
-```bash
--e HR_SECRET_GLOBAL_HARNESS_CONN_LOCAL='{"name":"local","provider":"openai","api_key":"…","base_url":"https://api.example.com/v1"}'
--e HR_SECRET_GLOBAL_HARNESS_POLICY_CODEX='{"chain":["local"]}'
-```
-
-Not every provider fits every backend, and a pairing that does not fit fails quietly: the turn
-comes back empty after a long wait rather than erroring. The Integrations page does not have this
-problem, because it only offers you providers that work.
-
-| Connection `provider` | Backends that can use it |
-|---|---|
-| `anthropic` | Claude Code, Hermes |
-| `openai` | Codex, Hermes |
-| `openrouter` | Codex, Hermes |
-| `azure-foundry` | Codex, Hermes |
-| `bedrock` | Claude Code, Hermes |
-| `tokenrouter` | Claude Code, Codex, Hermes |
-
-</details>
-
-A backend with nothing connected is forthcoming about it, which is what you get if you skip this
-step entirely:
-
-```json
-{"error":{"type":"invalid_request_error","code":"invalid_input","message":"no provider configured for backend 'codex'. Add an integration for a provider that serves 'gpt-5.4-mini', or configure a connection policy"}}
-```
-
-### 3. Run it
+### 2. Run it
```bash
docker run -d --name harnessrouter \
-p 127.0.0.1:3000:3000 \
-v harnessrouter:/data \
-e HR_AUTH_PASSWORD='something only you know' \
- -e HR_SECRET_GLOBAL_HARNESS_CONN_ANTHROPIC='{"name":"anthropic","provider":"anthropic","api_key":"sk-ant-…"}' \
- -e HR_SECRET_GLOBAL_HARNESS_POLICY_CLAUDE='{"chain":["anthropic"]}' \
harnessrouter/harnessrouter
```
+No provider key here. The instance comes up without one and you connect a provider from the console
+in step 5, which is the shorter road: a key pasted into a form cannot be misspelled into a shell
+history, and changing it later does not mean recreating the container.
+
Three parts of that line are load-bearing. `-p 127.0.0.1:` keeps the console on loopback, which is
what you want until you have changed the password. If port 3000 is already busy, change only the
left-hand number (`-p 127.0.0.1:3100:3000`), because the container always listens on 3000 inside.
@@ -136,12 +77,12 @@ the next step, so keeping that volume is what makes the second start fast. And `
is the difference between an instance only you can drive and one whose password is printed in this
file.
-Compose works too (`cp .env.example .env`, put your key in it, `docker compose up -d`), but read
-`docker-compose.yml` before you do. It publishes `3000:3000` on every interface rather than on
-loopback, and `.env.example` ships with the default password filled in. Change those two lines and
-it behaves like the command above.
+Compose works too (`cp .env.example .env`, `docker compose up -d`), but read `docker-compose.yml`
+before you do. It publishes `3000:3000` on every interface rather than on loopback, and
+`.env.example` ships with the default password filled in. Change those two lines and it behaves
+like the command above.
-### 4. Watch the first start
+### 3. Watch the first start
```bash
docker logs -f harnessrouter
@@ -178,14 +119,14 @@ missing, and the others still work.
This happens once per volume, not once per start. Every start after it takes a few seconds and
prints no install lines at all.
-If you skipped `HR_AUTH_PASSWORD` in step 3, one more line comes first, and comes back on every
+If you skipped `HR_AUTH_PASSWORD` in step 2, one more line comes first, and comes back on every
start until you fix it:
```
[harnessrouter] WARNING: using the DEFAULT password. Set HR_AUTH_PASSWORD, or change it from the profile page, before exposing this instance.
```
-### 5. Sign in
+### 4. Sign in
Open <http://localhost:3000>. The console is behind a login, on by default, covering the pages and
the API alike:
@@ -215,6 +156,66 @@ stays signed in.
Forgot it? There is no reset email to send, so delete `/data/selfhost-auth.json` and restart. The
instance falls back to `HR_AUTH_USER` / `HR_AUTH_PASSWORD`.
+### 5. Connect a model provider
+
+**Nothing runs until you do this.** There is no bundled model, no trial key, and no free tier
+hiding in the image. The instance you just signed into will do everything except answer you, which
+is what this step buys.
+
+Open **Integrations** and press **Add Integration**. It asks three things: a name, the provider,
+and your API key.
+
+![Adding a provider on the Integrations page](docs/images/05-add-integration.png)
+
+Which models that provider serves is not your problem to configure: the product keeps that list
+and adds to it as providers ship models. Pick the provider, paste the key, and the models it
+covers appear on the row.
+
+If you run more than one provider, the mappings underneath decide which one serves a given model.
+With a single integration there is nothing to set.
+
+<details>
+<summary>Setting it from the environment instead, for a scripted deploy</summary>
+
+A connection names a provider and its credential; a policy says which connection a backend uses.
+Useful when the box is built by a script and nobody is going to open a browser:
+
+```bash
+-e HR_SECRET_GLOBAL_HARNESS_CONN_ANTHROPIC='{"name":"anthropic","provider":"anthropic","api_key":"sk-ant-…"}'
+-e HR_SECRET_GLOBAL_HARNESS_POLICY_CLAUDE='{"chain":["anthropic"]}'
+```
+
+There is one policy variable per backend: `…POLICY_CLAUDE`, `…POLICY_CODEX`, `…POLICY_HERMES`. An
+OpenAI-compatible endpoint of your own takes the same pair with a `base_url` added, and
+`"provider":"openai"` rather than the `"openai-api"` that `.env.example` still shows:
+
+```bash
+-e HR_SECRET_GLOBAL_HARNESS_CONN_LOCAL='{"name":"local","provider":"openai","api_key":"…","base_url":"https://api.example.com/v1"}'
+-e HR_SECRET_GLOBAL_HARNESS_POLICY_CODEX='{"chain":["local"]}'
+```
+
+Not every provider fits every backend, and a pairing that does not fit fails quietly: the turn
+comes back empty after a long wait rather than erroring. The Integrations page does not have this
+problem, because it only offers you providers that work.
+
+| Connection `provider` | Backends that can use it |
+|---|---|
+| `anthropic` | Claude Code, Hermes |
+| `openai` | Codex, Hermes |
+| `openrouter` | Codex, Hermes |
+| `azure-foundry` | Codex, Hermes |
+| `bedrock` | Claude Code, Hermes |
+| `tokenrouter` | Claude Code, Codex, Hermes |
+
+</details>
+
+A backend with nothing connected is forthcoming about it, which is what you get if you skip this
+step entirely:
+
+```json
+{"error":{"type":"invalid_request_error","code":"invalid_input","message":"no provider configured for backend 'codex'. Add an integration for a provider that serves 'gpt-5.4-mini', or configure a connection policy"}}
+```
+
### 6. Give it something to do
**Tasks → New Task.** Pick a harness in the switcher on the left, choose a model next to the
@@ -240,7 +241,7 @@ customers need" is meant to be short. More arrive over time; your instance lists
![The Starter Kits page, before any kit has been launched](docs/images/dashboard-1-starter-kits.png)
Each card names the base and the model it will run on before you launch it, so you can see what a
-kit is about to spend before it spends it. What it names depends on the keys you gave it in step 2:
+kit is about to spend before it spends it. What it names depends on the keys you gave it in step 5:
the screenshot above is an instance with three providers connected, and an instance with one will
recommend that one on every card. Launching asks a single question, what to run it on, and the
runtimes you have no key for are listed but disabled, with the reason on them:
@@ -395,7 +396,7 @@ same components, the same API client. Surfaces that need a service a single box
such as accounts, billing, and marketplace, are simply not shown.
**Supported harnesses:** Codex, Claude Code, and Hermes, installed on first run rather than shipped
-in the image, for the license reasons in step 4. Review each tool's terms before you use it.
+in the image, for the license reasons in step 3. Review each tool's terms before you use it.
**Bring your own key.** Your provider credentials are read from the environment at start-up and
handed to the agent directly. They are never written into the image, never committed, and never