Operating it
Two reference pages list everything exhaustively and are generated from the code, so they never drift:
configuration.md for every environment variable, and
commands.md for every npm run script. This page explains when and why to use
them.
Install
Resolution needs Node 24, or Docker. Nothing else is needed: the store is built in. Pick one of three first-run paths; each ends with a start link. Placeholders are in angle brackets.
A server, in one command
On a fresh Debian or Ubuntu server, as root or with sudo:
curl -fsSL https://resolution-9jj.pages.dev/install.sh | sudo sh
The script is install.sh at the root of the source. It does the following, in order, and skips what
is already done, so running it again is safe:
- Installs Docker Engine and the compose plugin from Docker's own apt repository if
docker composedoes not already work. On another distribution it says so and stops: install Docker and the compose plugin yourself, then run it again. - Downloads the source tarball (
https://resolution-9jj.pages.dev/get/resolution.tar.gz, agit archiveof the main branch) into/opt/resolution. Git is not needed.--src <url|path>, orRESOLUTION_SRC, takes another tarball, a local tarball or a source directory;--dir <path>moves the install. - On a first run, writes
/opt/resolution/.envwith mode 0600: a generatedPOSTGRES_PASSWORD, a generatedBACKUP_PASSPHRASE,SESSION_UTC=15:30andCOMPOSE_PROFILES=ibkr, which starts the gateway container beside the fund. The broker itself is chosen on the dashboard's broker card, where IBKR is preselected; the installer writes noBROKERline, so the card stays editable. An existing.envis never changed. - Downloads IBKR's Client Portal Gateway zip once and pins its SHA-256 in
.envasIBKR_GATEWAY_SHA256; the gateway image is built from that pin, and every later build refuses a download that differs. This is reproducibility, not verification: IBKR publishes no checksum, so the pin proves that later builds use the file the first run saw, and nothing more. The script prints it; compare it with a download of your own if you want more than that.--repin-ibkrdownloads again and pins the current file. - Builds and starts the fund, Postgres and the gateway (
docker compose --profile ibkr up -d --build), waits for/healthz, and prints the owner link, the gateway's login address and, once, the backup passphrase. Write the passphrase down somewhere that is not the server; backups cannot be read without it.
Everything listens on the server's loopback: nothing is open to the internet. From your laptop, open a tunnel and use the printed link there:
ssh -N -L 4747:127.0.0.1:4747 root@<your-server>
The first visit sets a cookie and starts the setup wizard. The gateway's login page is
https://127.0.0.1:5000 through the same kind of tunnel (resolution ibkr-login prints the address);
log in there with your IBKR username, password and second factor. Resolution never sees that password.
For a phone, use Tailscale (below).
The script also installs a resolution command in /usr/local/bin:
| Command | What it does |
|---|---|
resolution status | docker compose ps and the /healthz answer. |
resolution logs | Follows the logs. |
resolution link | The owner link, with the token. |
resolution update | Fetches the newest source, rebuilds and restarts; keeps .env and the volumes. |
resolution doctor | npm run doctor inside the container. |
resolution backup | Writes an encrypted backup into the fund volume's backups folder. |
resolution ibkr-login | The gateway's login address and how to reach it. |
resolution password | Sets or changes the owner's password, asked twice on the terminal; --reset removes it, --status says whether one is set. |
resolution restart, resolution stop | The containers. |
resolution serve | With Tailscale signed in: the app and the gateway login on your tailnet (below). |
resolution tour | The demo fund beside the real one: on (the default) starts it and, once the app is served, puts it on the tailnet; off removes it; link, status (below). |
resolution online | The app, and the tour if it is on, on the open internet through Tailscale Funnel: on (the default), off, status. Never the gateway login (below). |
Paper only, without the gateway: curl -fsSL … | sudo sh -s -- --no-ibkr. Running the script again without
the flag adds the gateway.
The script is tested against fake docker, curl and tailscale commands (test/install-sh.test.ts)
and has not yet been run on a real server. Treat the first run as a check and read what it prints.
One-click VPS (cloud-init)
deploy/cloud-init.yaml is user data that runs the installer on a server's first boot. Paste it in
the "Cloud config" box when creating a Hetzner server, or under "User data" on DigitalOcean; other
providers have the same field. The installer's output, with the owner link and the backup passphrase,
lands in /var/log/resolution-install.log (mode 0600). Read it once over SSH, write the passphrase
down, and delete the log. resolution link prints the link again at any time.
Update
resolution update
fetches the newest source tarball, replaces everything in /opt/resolution except .env, rebuilds
the image and restarts. .env and the two volumes survive; the Record is append-only and never
migrated in place, so a new version reads the old events. RESOLUTION_SRC=<url|path> resolution update
updates from another tarball or a directory. By hand it is sh /opt/resolution/install.sh --update.
A Mac, for yourself
brew install node@24 git
git clone <repository-url> resolution
cd resolution
npm ci
npm start
The terminal prints what is running (version, provider, market, and where orders go) and a link:
Open http://127.0.0.1:4747/?t=…
Open the link once in each browser you use. It sets a cookie, and from then on the plain address works. The first visit to a new fund opens the setup wizard; the guide walks through it.
The fund lives in ./data (set RESOLUTION_DATA or --data <dir> to move it). The demo uses
./data-demo, so the demo and your fund never mix.
The same with Docker Compose by hand, on a machine that already has Docker: copy the source, cp
.env.example .env, set POSTGRES_PASSWORD, then docker compose --profile ibkr up -d --build and
docker compose logs app | grep Open. Details of the containers are under Docker.
Your phone, over Tailscale
Install Tailscale on the fund's machine and on the phone, signed in to the same account. On a server installed with the one-liner:
sudo tailscale up
resolution serve
resolution serve puts Tailscale's HTTPS proxy in front of the app (port 8443) and of the gateway's
login page (port 5001), adds the machine's tailnet name to ALLOWED_HOSTS, points IBKR_LOGIN_URL at
that page, restarts the app and prints both addresses. On the phone, open
https://<machine>.<tailnet>.ts.net:8443/?t=<token> once.
On a Mac:
sudo tailscale up
sudo tailscale serve --bg 4747
ALLOWED_HOSTS=<machine>.<tailnet>.ts.net npm start
tailscale status shows the machine's name; the full name is <machine>.<tailnet>.ts.net. On the
phone, open https://<machine>.<tailnet>.ts.net/?t=<token> once. More under
phone access over Tailscale.
The tour: a demo fund beside yours
resolution tour
starts a second copy of the app on the same server, running the demo: sixty sessions of a paper fund
on a simulated clock, nothing real. It is the tour service in compose.yaml, behind the compose
profile tour, which the command adds to COMPOSE_PROFILES in .env. It has its own volume and its
own token, and it holds no broker, no model key, no database and none of your Record. The one thing it
shares with your fund is the password file, mounted read-only: the same password opens both, and on the
demo it can be neither changed nor removed (Settings → Password there says so). The command waits
for the tour to answer and prints its link on 127.0.0.1:4748 (TOUR_PORT moves it; TOUR_TOKEN fixes
its token).
Once the app is on the tailnet (resolution serve, above), the tour is published beside it on port
10000 and the two funds learn each other's address: the founding's first screen offers a look around
the demo before it asks anything, and the demo's sidebar says "demo fund" and links back to your own.
resolution tour off unpublishes it, drops the profile, removes the container and blanks both
addresses; the volume stays until you remove it. resolution tour link and resolution tour status
say where it is. resolution update keeps it running.
Online, with the password
resolution online
puts the app on the open internet through Tailscale Funnel, at the same address as on the tailnet:
https://<machine>.<tailnet>.ts.net:8443. Tailscale terminates TLS with a public certificate and
forwards to the app on loopback; the door is still the link or the password, so set a password first
(resolution password) and enrol a passkey under Settings → Passkeys before approving orders from
there. When the tour is on it goes out too, on port 10000. The gateway's login page never does, and port
443 is not touched. Funnel has to be allowed for the machine: when Tailscale refuses, the command prints
its message and where to enable the funnel node attribute in the admin console. resolution online
off closes both addresses again; resolution online status is tailscale funnel status. What this
exposes and what stays private is under who can reach it.
After the first start
Open Setup and connections in the dashboard. It lists every system in the order worth setting it up (prices, AI models, notifications, backups, then the optional broker, phone access, integrations and imports), shows what each enables and what is missing, and has a Test connection that asks the server and answers with a plain result and the fix. The same checks, for the whole install, run in a terminal:
npm run doctor
It talks to the running server when there is one, and checks the files otherwise. Exit code 1 means
something failed. With Docker: docker compose exec app npm run doctor.
Settings made on that page (broker gateway and account, market source, notification channels, backup
passphrase) are kept in <data>/setup-config.json, mode 0600, with secrets sealed by the data folder's
key. They never come back to the browser, which shows only "set". A variable in the environment
always wins and the page says "set by the server environment". Broker passwords are never stored:
there is no field for one and the server refuses it.
Each card's Test connection makes a real call (a short model call, a price fetch, a notification
send, and so on) and answers with a plain result and a fix when it fails; the broker card runs every
IBKR step in turn (see ibkr.md). These are the same checks npm run doctor runs for the whole
install, and CI runs them as part of the test suite (.github/workflows/ci.yml: types, tests, Academy
content, and that the reference docs are current, then a container build and a health check), so a
regression here fails a pull request before it reaches you.
Regenerating the reference pages themselves is npm run docs; npm run docs:check fails instead of
writing when a page is out of date, which is what CI runs.
Docker
docker compose --profile ibkr up -d --build
docker compose logs app | grep Open
This runs the app, Postgres 17 and IBKR's Client Portal Gateway, and publishes the app on
127.0.0.1:4747 and the gateway's login page on 127.0.0.1:5000 only. Without --profile ibkr (or
with COMPOSE_PROFILES empty in .env) the gateway is left out and the fund runs on paper. The app runs
as a non-root user, and /healthz is its health check. A third service, tour, behind the profile of
the same name, is the demo fund beside the real one (the tour).
The whole .env next to compose.yaml reaches the app, so every variable in
configuration.md works there; .env.example lists them with comments.
The composition itself fixes only the container's address, port, data path and database URL. Most
settings can instead be made in Setup and connections, where they are kept in the fund volume; a
variable set in .env wins and the page shows it read-only. The app's data directory, with the token,
saved keys, settings, anchors and backups, is the fund volume; the Record itself is in the pg volume.
CI builds the app image and checks /healthz on every change. The full composition with the gateway,
and install.sh, have not yet been run on a real server; treat the first run as a check.
The IBKR gateway container
IBKR's Client Portal Gateway runs as a container next to the fund, behind the compose profile ibkr
(deploy/ibkr-gateway/, built from a Dockerfile that checks the downloaded gateway's SHA-256 against
IBKR_GATEWAY_SHA256 before using it). install.sh sets all of this up; by hand it is:
# .env
BROKER=ibkr
COMPOSE_PROFILES=ibkr
IBKR_GATEWAY_URL=https://ibkr-gateway:5000/v1/api
IBKR_GATEWAY_SHA256=<the sha256 of clientportal.gw.zip>
then docker compose up -d --build. For the checksum, download the zip yourself and run sha256sum
on it (the exact command is in the Dockerfile). IBKR publishes no checksum, so the pin proves that
later builds use the file you checked, and nothing more. A gateway on the host instead of in a
container needs IBKR_GATEWAY_URL=https://host.docker.internal:5000/v1/api and no profile.
The container's port is published on 127.0.0.1 only, and on a private network (ibkr) shared with the
app; its own conf.yaml admits only loopback and that network. Log in at https://localhost:5000 on the
machine running it (through an SSH tunnel from a laptop); from elsewhere, over Tailscale, resolution serve
publishes the login page on your tailnet and sets IBKR_LOGIN_URL, or set it yourself to the address your
browser reaches, and the dashboard's "Log in to IBKR" button opens it. When the container restarts, the session
is gone and the fund tells you once, not every minute. The twenty-minute path from a running gateway to signed
terms is Rehearse on paper, then go live; full detail on the
session supervisor, order guarantees and Flex reconciliation is in ibkr.md.
A clean redeploy
To throw a Docker install away and start again from nothing:
docker compose down -v
docker compose up -d --build
-v deletes both volumes: pg, the Postgres database that holds the fund's whole Record, and fund,
the app's /data with the access token, saved model keys, the anchor key and the backups folder. Take a
backup first and copy it out of the container and off the machine (see
backups), unless losing the fund is the point. --build rebuilds the
image from the current checkout. The new install has a new token; get the link from the logs again.
The day's run
The scheduler ticks every 60 seconds. It wakes the day's run once per trading day at SESSION_UTC
(15:30 UTC by default, after the European close) on weekdays. If the process starts after the session
time on a weekday that has not run yet, it runs that day at once. Days missed while it was down are not
run afterwards. Each tick also picks up events another process wrote (a kill switch from the command
line, for example), writes an anchor when one is due, and sends the reminder for approvals about to
expire.
An idea you send is researched at once and does not wait for the run. The run proposes it once it has cooled.
Steps and jobs
The run is a list of steps, each run as a job with a key of the form day:<date>:<n>:<step>: submit and
sync fills, expire stale proposals, resolve views, research, propose, propose cooled owner ideas, monitor
theses, propose exits, reconcile (live only), strike the NAV, update the readiness rung, measure (nulls,
stress, attribution, factors, balances), and finally a wake.outcome event with every step's result,
what failed or was skipped and why, and the model spend against the cap.
- Retries. A research step is retried once, the others twice, with backoff from 2 seconds doubling
to at most 60. A step that still fails is recorded as
job.deadand the run goes on. - Idempotency. A job that finished is not run again. If the process dies mid-run, the restart resumes the day without redoing finished steps.
- What never stops. Risk, reconciliation, NAV and maintenance steps run even when research has stopped.
Dead jobs appear on Ops and make health degraded for a day. Look at the error in the job.dead
event on Record. The next day's run starts fresh.
The breaker and the spend cap
Each model provider has a breaker. After breaker_failures (3) failed calls in a row it opens, and calls
to that provider stop; after breaker_cooldown_min (15) it lets one call through to test, and closes if
it works; if that call fails, it opens again. Every change is recorded as breaker.changed. An open breaker is at the top of Ops and of
the assistant's list. Usually the provider is down or the key has run out of credit. Check the provider,
or move the seats to another one (see the roster).
Each run may spend at most wake_spend_cap_usd (5 USD) on models. When the cap is reached, the research
steps stop for that run, and a budget halt is raised with scope research. Risk, reconciliation and
the NAV go on. Research stays stopped until you clear the halt (POST /api/halt/clear {"halt":"budget"}).
Raise the cap in Mandate if the run needs more; raising it is a loosening and waits out the cooling
period.
The monthly budget
The monthly budget, monthly_model_budget (40 USD), counts the cost of every seat.call this calendar
month (UTC). Past 80% the assistant warns. At 100% it stops:
- Stopped: research and the screens in the daily run, the judge's order and position measurements, and the model-written brief. The daily run reports each skipped research step with the reason; the brief falls back to its scripted text. No halt is raised: the stop lifts when the month turns or when you raise the budget.
- Still running: every call on a path that can block or clear a trade. That is your own idea, the
bears' attack on it, the analyst's reply, the judge's ruling, and the pre-mortem the kernel reads
before a signature. These run on the cheapest live model the fund has configured (the default provider
or any keyed roster entry, by list price). Each one is marked
budget_fallbackon itsseat.call, and the assistant tells you, first in the list. A HARD check is never skipped to save money.
Spend can pass the budget by the cost of those essential calls. A budget of 0 means no monthly ceiling.
Model keys
Without a key, the seats run on a scripted provider. It is deterministic, costs nothing, and is useful for learning the fund. It is not research.
The simplest way to add a key is Settings → Model: choose a provider, paste the key, and press
Test and save. The key is tried with one short call and saved only if it works, to model-key.json
in the data directory with mode 0600. It takes effect at once. Forget deletes it. A server whose
store is in memory cannot save a key.
Or set it in the environment, which outranks a saved key and cannot be changed from the browser:
| Provider | SEAT_PROVIDER | Key variable | Default model |
|---|---|---|---|
| Anthropic | anthropic | ANTHROPIC_API_KEY | claude-sonnet-5 |
| OpenAI | openai | OPENAI_API_KEY | gpt-5-mini |
| Google Gemini | google | GOOGLE_API_KEY | gemini-2.5-flash |
| OpenRouter | openrouter | OPENROUTER_API_KEY | anthropic/claude-sonnet-4.5 |
| Mistral | mistral | MISTRAL_API_KEY | mistral-medium-latest |
| Groq | groq | GROQ_API_KEY | llama-3.3-70b-versatile |
| xAI | xai | XAI_API_KEY | grok-4 |
| DeepSeek | deepseek | DEEPSEEK_API_KEY | deepseek-chat |
| Together | together | TOGETHER_API_KEY | from the catalogue |
| Fireworks | fireworks | FIREWORKS_API_KEY | from the catalogue |
| Perplexity | perplexity | PERPLEXITY_API_KEY | sonar |
| Cohere | cohere | COHERE_API_KEY | command-a-03-2025 |
| Azure OpenAI | azure | AZURE_OPENAI_API_KEY | your deployment name, in SEAT_MODEL; needs SEAT_BASE_URL |
| Ollama | ollama | OLLAMA_HOST (no key) | llama3.3 |
| LM Studio | lmstudio | LMSTUDIO_HOST (no key) | the loaded model |
| Any OpenAI-compatible endpoint | custom | CUSTOM_API_KEY (optional) | set SEAT_MODEL; needs SEAT_BASE_URL |
Without SEAT_PROVIDER, the first key found in this order is used. SEAT_MODEL picks another model,
and SEAT_BASE_URL another endpoint (OPENAI_BASE_URL is still read). A model the catalogue does not
price is costed at its most expensive row, never at zero; local models cost nothing.
If a live call fails, the seat falls back to the scripted answer and the failure is recorded. Cost per seat per month is on Seats & costs.
Prompt caching
Every seat asked about one view gets the same start: one system prompt (it names no seat) and then the dossier, which holds a few mandate rows, the instruments held and the view itself. The seat's role and its question come after that. The dossier holds no money figure.
- Anthropic. The dossier is sent as a second system block with an ephemeral
cache_controlbreakpoint, so the bears, the rebuttal and the judge can read it from the cache. - OpenAI and OpenAI-compatible services. The system message is byte-identical across those seats, so a service that caches repeated prefixes by itself (OpenAI does) can do so. Nothing is sent to ask for it.
- Other services. The same prefix is sent; whether it is cached is up to the service.
The cache read and write tokens are on each seat.call event (tokens_cache_read,
tokens_cache_write); tokens_in still counts every input token. Cached tokens are priced at the
model's own cached price where the catalogue lists one, else at the provider's published multiplier
(Anthropic: reads 0.1×, writes 1.25× the input price), else at the normal input price.
Limit: providers cache only prefixes above a minimum length (for Anthropic, 1,024 tokens or more depending on the model). A small book's dossier can be shorter than that. The breakpoint is then ignored, no error is raised, and the call is priced at the normal rate.
The overnight batch
Set SEAT_BATCH=1 to send the judge's two measurements from the daily run through the service's batch
interface, at half the price. These are the order check (debate.orders_compared) and the position
check (judge.position_swapped). They are LOG-grade: they are shown on the Scorecard, and no ruling or
trade waits on them.
- During research the measurements are queued in the database, not asked. After research, the
batch_submitstep sends every queued measurement as one batch. - On a later day the
batch_collectstep (the first step after the housekeeping) asks whether the batch has ended. When it has, each answer is recorded as aseat.callwithbatch: true, priced at the batch rate and stored for audit like any other call. Then the measurement itself is recorded. - Everything else runs at once. The bears, the rebuttal, the ruling and every call about an idea you typed in are never batched. Your idea's measurements are not batched either.
It falls back to asking directly, the normal way, when:
- the judge's service has no batch interface;
- the batch is refused;
- the batch ends failed or expired;
- an answer is missing;
- the judge has moved to another model since the batch was sent.
The reason is kept on the queued job. At the monthly budget, queued measurements are dropped, not sent.
Limits:
- Only Anthropic (direct, not through Bedrock or OpenRouter) and OpenAI's own service have a batch interface here. Services that copy OpenAI's chat interface do not.
- A batch can take up to 24 hours. The measurements then appear a day or two after the debate, not beside it.
- The wake's spend cap sees a collected batch's cost only once it is recorded, on the day it is collected.
- The batch paths are tested against fake services only. The first real run is the first check against the live interface.
Roster changes
By default every seat uses the one provider above. The roster gives a seat its own provider and model.
The seats are scout, analyst, bear-cold, bear-hot, judge, pm, risk and chief-of-staff.
From Settings. The roster editor lists each seat with its provider, model and whether a key is set. Saving records
roster.setin the Record, with no key in it. A key for a provider other than the default is saved tomodel-key.<provider>.json, mode 0600. It is refused when the store is in memory or whenSEAT_ROSTERis set.From the environment.
SEAT_ROSTERoutranks the saved roster, as JSON or in short form:SEAT_ROSTER=judge=openai:gpt-5-mini,bear-hot=groq:llama-3.3-70b-versatileRestart the server after changing it.
A model must be in the provider's catalogue, except for OpenRouter, Azure, Ollama, LM Studio and custom endpoints, which take any name. A seat whose provider has no key uses the default provider.
The judge on a different vendor
A judge built on the same maker's model as the bears shares their training and their blind spots, so
its ruling is partly the model grading itself. The mandate row judge_independent_vendor (on by
default) asks for the judge on a different vendor from both bears. The vendor is the model's maker,
not the service that hosts it: Claude on Bedrock or OpenRouter counts as Anthropic, Llama on Groq as
Meta.
- The roster editor refuses a roster that puts the judge on a bear's vendor while the row is on, and says which seats to move. A seat without a key counts as the default provider. With the row off the editor only warns.
- At runtime, a live ruling whose model shares a vendor with a bear on the same view is recorded on
its
seat.callasvendor_conflict, and Governance lists the last 50. This happens when a single key serves every seat, or whenSEAT_ROSTERsets a conflicting roster. The ruling itself is unchanged: severity 4 still kills. - Switching the row off is a loosening and waits out
cooling_days. The scripted seats and replays have no vendor and never conflict.
Market data
Your fund reads live market data by default: public quotes and ECB reference FX. When a source fails,
the quote falls back to synthetic and says so. MARKET=synthetic runs the seeded offline market with
one documented effect; the demo always uses it. Public quotes are not an entitled feed. A live order
priced from a fallback is refused, and its limit is checked against IBKR's own price before it is
sent.
WIRE_FEEDS sets the RSS or Atom feeds for the wire in live mode, as a comma-separated list.
OPENFIGI_API_KEY is an optional key for OpenFIGI's ISIN-to-contract lookups, used when importing and
when mapping instruments for IBKR; it works without one, at a lower rate limit. See
imports.md.
Trading real money
A fund starts on paper. It trades real money through Interactive Brokers once you sign it over. You need an IBKR account, IBKR's Client Portal Gateway, and market data permissions for what you trade.
1. Run the gateway
Download the Client Portal Gateway from IBKR's Web API pages. It needs Java. Unzip it and run it from its folder:
bin/run.sh root/conf.yaml
Open https://localhost:5000 in your browser, accept the gateway's certificate there, and log in. The
password and the second factor go to IBKR, never to Resolution. The session lasts about a day, and
IBKR resets it overnight. When it lapses, Resolution sends nothing and says so in Settings →
Broker. Log in again to resume.
2. Connect Resolution to the gateway
In Setup and connections → Broker (IBKR), choose Interactive Brokers, enter the gateway address and your account id, save, and press Test connection. It answers whether the gateway is reachable, logged in, and on the account you named. Or set it in the environment, which wins:
BROKER=ibkr npm start
| Variable | Effect |
|---|---|
BROKER=ibkr | Connect to IBKR. Without it the fund stays on paper, and a fund already signed live sends nothing. |
IBKR_GATEWAY_URL | The gateway's API. Default https://localhost:5000/v1/api. In Docker the default is the gateway container, https://ibkr-gateway:5000/v1/api; for a gateway on the host set https://host.docker.internal:5000/v1/api. |
IBKR_ACCOUNT | Needed only if your login sees more than one account. |
IBKR_CONIDS | Pins an instrument to an IBKR contract id when the search is ambiguous, as JSON: {"SAN.PA":12345}. |
IBKR_GATEWAY_CERT_SHA256 | The SHA-256 fingerprint of the gateway's certificate. Only that certificate is accepted. The wizard sets it for you (below). |
The startup line says Orders: paper · IBKR configured, not signed live until you sign.
Trust the gateway's certificate
The gateway ships a self-signed certificate, so no certificate authority vouches for it. Resolution accepts it only by its SHA-256 fingerprint, which you trust once. Until you do, it refuses the gateway and sends nothing.
Run the wizard's first step, The gateway answers. It shows the fingerprint of the certificate the gateway presents, the name it was issued to, and its validity dates.
On the machine that runs the gateway, print the fingerprint of the gateway's own certificate:
keytool -list -v -keystore root/vertx.jks -storepass mywebapi | grep SHA256Run it in the gateway's folder; for the container, prefix it with
docker compose exec ibkr-gateway. If you replaced the keystore, use your own file and password.openssl s_client -connect localhost:5000 </dev/null | openssl x509 -noout -fingerprint -sha256gives the same line, read over loopback.If the two match, press Trust this certificate. The server trusts it only if the gateway still presents that same certificate, and saves it as
IBKR_GATEWAY_CERT_SHA256. You can also paste the fingerprint into that field, or set it in the environment.
From then on every call checks the fingerprint before a byte of the request is written. A different
certificate is refused: nothing is sent, orders included, the broker shows down with the code
pin_mismatch, and a notice goes out. If you replaced the certificate yourself, the wizard shows the
new and the trusted fingerprints side by side and asks you to confirm before it trusts the new one.
A trusted fingerprint with a plain http: gateway address is refused.
The gateway's stock keystore is the same file in every download, and its password is published. The
fingerprint proves the fund talks to the gateway you checked and not to something else on the path;
it does not make that stock key secret. For a gateway on another machine, give it a keystore of its
own (IBKR's gateway documentation covers sslCert and sslPwd in conf.yaml) and trust that
certificate instead.
Deployments that relied on the old acceptance of a self-signed certificate on loopback (and
IBKR_STRICT_TLS) must trust the certificate once after upgrading; until then the broker shows down
with the code cert_untrusted and nothing is sent.
3. Rehearse on an IBKR paper account
IBKR gives every account a paper-trading login. Log the gateway in with that login first and do
everything below against it: sign live, approve a small order, watch it fill, and go back to paper.
Resolution cannot tell a paper login from a real one. The account id tells you (paper accounts
start with DU).
4. Sign the fund live
The fund must be set up, not the demo, with the kill switch released and a flat book: no paper positions and no working orders. A fund that has traded on paper can be closed out first, or you can found a new fund whose capital is what you mean to trade.
Setup and connections → From paper to live shows the readiness checklist: what the gate requires (founded fund, readiness ladder, kill switch released, flat book, broker configured, gateway logged in, the right account, your signing key) and what is recommended besides (paper sessions, backups and a restore drill, a notification channel, the kill switch tried once, cooling-off, a recent dry run). Recommendations never block; the gate decides. The checklist changes nothing.
The dry run sends one small preview order. With the gateway logged in it goes to IBKR's what-if endpoint, which prices it (commission, margin, equity change) and places nothing. Without one it is a simulation on paper, labelled as such. It is never written to the Record.
The broker panel below it (also in Settings → Broker) shows, once the gate passes, the terms:
- the account, the fund's cash, and IBKR's available funds, which must cover the fund's cash;
- the largest order that may add risk (
live_max_order, 1,000 EUR to start) and the price collar (live_collar_pct, 2%); - what the account already holds, which the fund leaves out of its book;
- the IBKR contract for every instrument. Instruments that do not map to exactly one contract are listed and will not be traded.
Tick the acknowledgement and press Sign: trade real money. Your browser key signs the terms' hash, and the top bar shows Live from then on.
5. Day to day
Proposals arrive as before. The approval shows the account and the exact contract. Approving sends the order to IBKR at once. Before it leaves, the kernel and the venue refuse an order that:
- is priced from simulated data;
- adds risk beyond the live order cap;
- has a limit outside the collar around IBKR's price;
- is a buy the available funds do not cover;
- is a sell of shares the account does not hold.
IBKR's order warnings are confirmed automatically only after your signature, and they are recorded with the order. Fills are booked as IBKR reports them, checked once a minute. Every five minutes the book is reconciled against IBKR. Two breaks in a row halt all trading; clear the halt in Settings → Broker once you know why they differed. A trade you place by hand in the same account causes exactly such a break.
To raise the live order cap or widen the collar, change it in Mandate. It is a loosening and waits out the cooling period. To stop at once, use the kill switch. To go back to paper, close every live position first, then press Back to paper: one click, no confirmation and no waiting period. The top bar shows Paper or Live on every page.
Stuck and stale orders
Every minute the scheduler checks the orders the fund has sent:
- No answer. An order still
sending(written, no answer yet) orunknown(sent, the answer lost) afterORDER_STUCK_MINminutes (default 30) is flagged once asorder.stuck. It appears at the top of the chief of staff's list and is sent to your notification channels. From then on it is never sent again automatically: recovery still looks it up by its client order id, so the fund adopts it if it shows up at IBKR, but it does not resend one IBKR has not listed. Look in IBKR's order list and decide. A live order whose approval has expired while it was never at IBKR is closed as cancelled, as before. - Stale paper orders. Every order is a DAY limit order. On paper, one still working after the day it was accepted (UTC) is cancelled as expired, with any partial fills kept. Live, IBKR expires DAY orders itself and the fund books the cancellation it reports.
Flex reconciliation
With IBKR_FLEX_TOKEN (a read-only Flex Web Service token) and IBKR_FLEX_QUERY_ID set, the scheduler
pulls IBKR's own statement once a UTC day, from IBKR_FLEX_PULL_HOUR (UTC, default 6, when the previous
day's statement is ready). The pull runs in the jobs runner as flex:<date>: a network failure is retried
twice, a minute apart, and then dead-lettered for the day (a job.dead event and a notice); the next day
tries again. A statement already in the Record is not imported twice. When IBKR is the broker, a newly
imported statement is then laid beside the fund's fills as the job flex-recon:<statement date>: each
break (a missing or differing fill, a trade the fund did not place) and each corporate action is recorded
once as a discontinuity for you to explain. Nothing is fixed automatically and no corporate action is
applied. Without both settings the job does nothing and makes no request. The token is never written to
the Record, a log line or an error. Set these two only; there is no field, and no environment variable,
for a broker password. Detail: ibkr.md and
imports.md.
What is not verified
The IBKR path is tested against a simulated gateway that speaks the same API. It has not been run against IBKR by the people who wrote it. Rehearse on a paper login. Start with the default cap, and check each order and fill in IBKR's own screens until you trust it.
The kill switch
The kill switch stops research, proposals and orders at once. It is recorded as kill.engaged with your
reason and stays on until you release it.
In the browser: Settings → Kill switch, with a reason.
POST /api/kill/cancel-ordersalso cancels the fund's working orders at the venue.From a terminal, for when the browser is not an option:
npm run kill -- --reason "gateway misbehaving" [--data ./data] npm run release [-- --data ./data]If a server is running on that data directory, the command goes through its API with the token from
.token(orRESOLUTION_TOKEN). If not, it opens the store itself, verifies the whole chain first, and appends the event with producerowner-cli. WithDATABASE_URLit appends directly, and a running server picks the event up within one tick (60 seconds). WithBROKER=ibkr, engaging also cancels the fund's working orders at IBKR. It exits 0 on success, 1 if some cancels failed, 2 if it could not engage.
A notification goes out on every channel you configured.
Notifications
The fund can tell you when something needs you, by email, ntfy or Telegram, and also Slack, Discord, Microsoft Teams, Pushover, Signal or a signed webhook (their variables are in integrations.md). Set them in Setup and connections or in the environment; a saved channel takes effect at once, with no restart. A variable set in the environment always wins and cannot be changed from the dashboard. Connections and Ops show which are configured.
| Channel | Variables |
|---|---|
| Email (SMTP) | NOTIFY_EMAIL_HOST, NOTIFY_EMAIL_PORT (587), NOTIFY_EMAIL_SECURE (on by default for port 465; otherwise STARTTLS), NOTIFY_EMAIL_USER, NOTIFY_EMAIL_PASS, NOTIFY_EMAIL_FROM (defaults to the user), NOTIFY_EMAIL_TO (comma list) |
| ntfy | NOTIFY_NTFY_URL (the topic URL), NOTIFY_NTFY_TOKEN (optional) |
| Telegram | NOTIFY_TELEGRAM_TOKEN, NOTIFY_TELEGRAM_CHAT_ID |
| Slack | NOTIFY_SLACK_WEBHOOK_URL |
| Discord | NOTIFY_DISCORD_WEBHOOK_URL |
| Microsoft Teams | NOTIFY_TEAMS_WEBHOOK_URL (a Workflows webhook) |
| Pushover | NOTIFY_PUSHOVER_TOKEN, NOTIFY_PUSHOVER_USER |
| Signal | NOTIFY_SIGNAL_URL (a signal-cli REST API you run), NOTIFY_SIGNAL_NUMBER, NOTIFY_SIGNAL_RECIPIENTS |
| Generic webhook | NOTIFY_WEBHOOK_URL, NOTIFY_WEBHOOK_SECRET (optional, signs the payload) |
What is sent: a halt, the kill switch engaged or released, a reconciliation break, a discontinuity, an approval 10 minutes before it expires, going live or back to paper, an order with no answer, a failed or partial day run, a dead job, a breaker opening, a backup problem, the IBKR session needing a login (with the login link) or taken by IBKR Mobile or the website, the IBKR gateway presenting a certificate other than the one you trusted, and a test. The broker notices go once per lapse: the next one comes after the session was logged in again. ntfy marks halts, the kill switch and reconciliation breaks as high priority. The same notice is not sent twice by one process.
When notices arrive
Every notice has a grade, as the rules do (src/notify/policy.ts):
| Grade | Kinds | Delivery |
|---|---|---|
| HARD | a halt, a reconciliation break, the kill switch, going live or back to paper, an order with no answer, the backup dead-man's switch (a health alarm), a test | At once, day or night, whatever the categories say |
| SOFT | a discontinuity, an expiring approval, a failed day run, a dead job, a breaker opening, a backup problem | At once outside quiet hours. Inside them it waits in a digest, sent as one notice on the first scheduler tick after quiet hours end. A category you switched off is not sent |
| LOG | none by default; a notice marked LOG | Never sent. It stays on the Record and the dashboard |
Quiet hours are read in your timezone: NOTIFY_TZ (default Europe/Amsterdam) and NOTIFY_QUIET_HOURS
(default 22:00-07:00; off for none; a window may cross midnight). NOTIFY_CATEGORIES is a comma list
of the SOFT categories you want: risk (discontinuities), approvals, orders, ops (day runs, dead
jobs, the breaker) and backups; empty means all. The kill switch category is always on. All three can
be set in Connections → Notifications → When notices arrive. A malformed value in the environment
falls back to the default rather than silencing anything.
The digest waits in <data>/notify-digest.json (mode 0600), so a restart does not lose it; it holds at
most the newest 100 notices. Ops shows the policy in force, whether it is quiet now and how many
notices wait.
Send a test from Ops (or POST /api/notify/test; 409 means no channel is configured). The Record
keeps only notification.sent with the channel, the kind and whether it worked, never the message or a
credential. If a channel fails, the channels that work say so, and health turns degraded
(notify:<channel>).
Backups and the restore drill
The Record is the fund. A backup is the whole store in one encrypted file: every event and the rows of
blobs, bars, wire items, paper orders and venue orders, with the head's sequence and hash and the
projection hash. It is encrypted with AES-256-GCM under a key derived from your passphrase (scrypt).
Files are named resolution-<time>-seq<N>.backup, mode 0600, and written to <data>/backups.
Set a passphrase. BACKUP_PASSPHRASE, at least 8 characters. The server needs it to write
backups; the command line asks for it without echo if it is not set. Keep it somewhere other than the
machine. Without it a backup cannot be read, by you or anyone.
Write one.
npm run backup [-- --to <dir>] [--data ./data]
If the server is running, it writes the backup into its own backups folder; copy the file from there.
Otherwise the command opens the store, verifies the chain, and writes to --to. Ops has a button
for the same (POST /api/backup). Each backup is recorded as backup.written. A backup refuses to run
on a broken chain.
On a schedule. With a data folder and a passphrase, the server backs itself up every
BACKUP_EVERY_HOURS hours (24; 0 switches it off). The backup runs through the jobs runner, keyed by its
time slot, so a restart does not make two, and a failing one is retried twice and then dead-lettered. It
is recorded as backup.written with producer ops.
The dead-man's switch. While the schedule is on, no backup.written for BACKUP_MAX_AGE_HOURS hours
(36) is itself the alarm: health turns degraded with the clause backup:deadman, and one backup
notice goes out per missing backup (not one a minute). This catches a schedule that stopped for any
reason: a full disk, a passphrase removed, a server that was not running.
Copy it off the machine. A backup on the same disk as the fund does not survive the disk. Every backup, scheduled or by hand, is copied to each target you set:
| Target | Variables |
|---|---|
| A second folder (a mounted disk or share) | BACKUP_COPY_DIR, an absolute path |
| An S3-compatible bucket (AWS S3, Backblaze B2, Cloudflare R2, MinIO, Wasabi, ...) | BACKUP_S3_ENDPOINT (https://), BACKUP_S3_BUCKET, BACKUP_S3_REGION (us-east-1), BACKUP_S3_PREFIX (optional), BACKUP_S3_ACCESS_KEY_ID, BACKUP_S3_SECRET_ACCESS_KEY |
The copy is the same encrypted file, so the target never holds anything readable without the passphrase.
The upload is one path-style PUT <endpoint>/<bucket>/<prefix><file>, signed with AWS Signature
Version 4 in node:crypto; the fund never lists, reads or deletes objects, so give the key write access to
that bucket only. Each target's result is kept in the backup.written event (copies: [{target, ok,
error?}], the error scrubbed of the keys). A failed copy sends a backup notice and degrades health
(backup:copy) until a later backup is copied. All of these can be set in Setup and connections →
Backups too; the S3 keys are sealed like the other saved secrets.
What is tested: the signature against the AWS documentation's example request, and the upload against a local fake bucket that checks the signature the way S3 does. It has not been run against a real bucket by the people who wrote it: make one backup by hand after setting it up and look for the file in the bucket.
Health. A backup older than backup_max_age_days (7), or none at all once the fund is that old,
makes health degraded and puts a backup at the top of the assistant's list. With the schedule on, the
dead-man's switch (36 hours) is the stricter clause and replaces this one.
Drill the restore. A backup is only trusted once it has been restored. On Ops, Drill restores
a file into memory, verifies the chain and the head, compares the projection hash, and records
restore.drilled. Rung 3 of the readiness ladder needs a recent drill.
The schedule drills too: when the last drill is older than DRILL_EVERY_DAYS days (7; 0 switches it
off), the newest backup is restored into a throwaway in-memory store and checked, once per file. A
backup that cannot be decrypted or does not match is recorded as a failed drill with its reason (never
the passphrase), sends a backup notice and degrades health (backup:drill) until a drill passes.
Restore for real.
npm run restore -- --from <file> --data <empty dir>
Or with DATABASE_URL set, into an empty Postgres database. The target must be empty and must not be
the folder of a running server. The restore rebuilds the store, verifies the chain and the head,
compares the projection hash with the one in the backup, and records restore.drilled in the restored
Record. Then point the server at the new directory.
Export on the Record screen, or GET /api/export, still downloads every event as readable JSON
lines. It is not encrypted and does not carry the other tables.
Anchors
An anchor is a signed checkpoint of the Record's head: {seq, head_hash, at}, signed with an ed25519 key
the server makes on first use (<data>/anchor.key, mode 0600, and anchor.pub beside it). Each is
written to <data>/anchors/anchor-<seq>.json, recorded as anchor.written, and POSTed to ANCHOR_URL if
you set one. One is due every ANCHOR_EVERY_MIN minutes (60), and only when the head has moved. Ops
can write one now (POST /api/anchors).
An anchor proves the Record up to that point has not been rewritten since, as long as a copy of the
anchor lives somewhere the machine cannot change. That is what ANCHOR_URL is for: point it at a
service you control elsewhere that stores what it is sent.
To check:
npm run verify [-- --data ./data]
It verifies the chain, every anchor against anchor.pub, and the projection hash, and writes nothing.
The embedded store has one owner at a time, so stop the server first, or check through the API while it
runs (GET /api/verify, GET /api/anchors). An anchor fails when its signature does not verify, when it
was signed by another key, when the Record is shorter than the anchor (truncated), or when the hash at
that sequence differs (rewritten).
OpenTimestamps (optional)
A signed anchor proves only that your own key signed it. For a witness that does not depend on your
machine or your key, set OTS_ENABLED=1. It is off by default because it sends a hash to outside servers.
- Once a UTC day, the newest anchor is timestamped. The digest is the SHA-256 of the checkpoint the
anchor key signed (
{seq, head_hash, at}). A random nonce is appended and hashed, so the calendars never see the digest itself. The result is POSTed to each calendar inOTS_CALENDARSat/digest. By default these are the two opentimestamps.org pools and the eternitywall pool. One calendar answering is enough. - The pending proof is written to
<data>/ots/root-<seq>.otsin the standard.otsformat, andanchor.ots_submittedis recorded with the seq, the digest and the calendars that answered. If none answers, the job retries twice and then dead-letters for the day (job.dead). It tries again the next day. - The upgrade. A calendar puts the digests it collected into a Bitcoin transaction, usually within a
few hours. Once an hour, each pending proof asks its calendars for the completed proof. Calendars are
asked at
/timestamp/<commitment>, and only calendars inOTS_CALENDARSare asked; a URL written inside a proof is never followed on its own. It keeps asking forOTS_UPGRADE_DAYS(14) days. A "not yet" answer is waiting, not an error. When a Bitcoin attestation arrives it is merged into the file, andanchor.ots_upgradedrecords the block height.
To check:
npm run ots:verify [-- --data ./data] [path/to/root-<seq>.ots ...]
It reads files only: no database and no network. For each proof it checks that the digest is the one the signed anchor at that seq produces. It then re-applies every operation up to each attestation. It prints the block height and the Merkle root the proof commits to for each Bitcoin attestation, and the calendar for each proof still pending.
What it does not check: the Bitcoin block header. A completed proof ends in "this value is the Merkle
root of block N". Confirming that needs a Bitcoin node or a block explorer you trust, and that step is out
of scope here. Compare the printed root with block N's header yourself, or run the stock ots verify
client against a node. The .ots files are standard, so that client reads them too. Until you do, the
proof shows that the calendars hold a commitment to your anchor. It does not yet show that Bitcoin does.
Corporate actions
The fund never reconciles a corporate action on its own authority.
- A discontinuity is flagged. A price that moves more than
discontinuity_jump_pct(25%) in one session, or a position that disagrees with the venue, is recorded asrecon.discontinuity. It shows on Governance and the assistant's list, and blocks rung 3 until explained. - Record what happened on Governance (or
POST /api/corpaction): the instrument, the kind (split,symbol_change,spinoff,mergerordividend), the date, a note, and for a split the ratio or for a symbol change the new symbol. This explains the open discontinuities on that instrument. Nothing in the book changes. - Read the preview. It shows the position before and after. Only a split (quantity times the ratio, average price divided by it) and a symbol change adjust the book; the other kinds are recorded for the history.
- Sign it. Your browser key signs
corpaction:<id>:<instrument>:<kind>:<ratio>:<new symbol>, and the server recordscorpaction.applied.
The security master (name, ISIN, listing, currency, status per symbol) is corrected the same way, with
POST /api/instrument.
Reaching it from another device
The server listens on loopback only. To reach it from a phone, put a tunnel in front of it (for example Tailscale, or a Cloudflare tunnel with access control) and name the tunnel's host:
ALLOWED_HOSTS=fund.example.ts.net npm start
Any other host name gets 421. Do not bind to 0.0.0.0 on an open network. The token is the only lock.
Phone access over Tailscale
Tailscale gives the phone a private HTTPS address on your tailnet, and the server stays on loopback. With Tailscale installed and signed in on both the fund machine and the phone:
Put Tailscale's HTTPS proxy in front of the server:
sudo tailscale serve --bg 4747Start Resolution with the machine's tailnet name accepted:
ALLOWED_HOSTS=<machine>.<tailnet>.ts.net npm startOn the phone, open the start link once, with the tailnet address in place of the loopback one:
https://<machine>.<tailnet>.ts.net/?t=<token>. The link sets the cookie and the token leaves the address bar.Add the page to the home screen (Safari: Share, then Add to Home Screen; Chrome: the menu, then Add to Home screen). It opens full screen, like an app, and stays signed in.
Only devices on your tailnet can reach the address. sudo tailscale serve reset removes it. The
Phone access card in Setup and connections has the same steps and tests the result.
On a server installed with the one-liner, resolution serve does steps 1 and 2: it serves the app on
https://<machine>.<tailnet>.ts.net:8443 and the gateway's login page on port 5001, writes the name
into ALLOWED_HOSTS and IBKR_LOGIN_URL in .env, restarts the app and prints both links. Running it
again is harmless.
The access token
The token is in .token in the data directory, with mode 0600. To rotate it, stop the server, delete
the file and start again. Or set RESOLUTION_TOKEN to fix a value. Every browser then needs the new
link once.
A password is the second way in, for a browser that has lost the link: set it under Settings →
Password or with resolution password (npm run password -- --set reads it from stdin). It signs the
browser in with the same cookie as the link, no more. Forgotten: resolution password --reset or
npm run password -- --reset removes it; the link keeps working throughout.
Upgrades
On a server installed with the one-liner:
resolution update
From a checkout:
git pull
npm ci
npm test
npm start
With Docker, from a checkout:
git pull
docker compose up -d --build
Neither of these touches a volume or the data folder: the fund, its Record and its settings all survive
an upgrade. The record is append-only and never migrated in place, so a new version simply reads the old
events. Only docker compose down -v deletes the pg and fund volumes, which destroys the whole fund
and the owner token together; that command is for throwing an install away (see
a clean redeploy), never for an ordinary upgrade.
Health
GET /healthz needs no token. It returns {ok, status, degraded, reasons, setup}, where status is
healthy, degraded or down, the reasons are clause names only, and setup is incomplete until
the wizard has run and complete after, so nothing about the fund leaks to an unauthenticated caller.
Point an uptime monitor at it; the installer polls it to tell "up" from "ready".
Ops (and GET /api/ops, with the token) shows the detail. Each reason carries its clause:
| Clause | Means |
|---|---|
breaker:<provider> | That provider's breaker is open. |
provider:<provider> | Half or more of its calls among the last 50 seat calls failed, over at least four calls. |
market | The market layer's last request failed. |
wake:day | The last day run was partial or failed. Down when the last two failed. |
jobs | A job died in the last day. |
notify:<channel> | A notification channel is failing. |
backup | The last backup is older than backup_max_age_days, or none was written in the fund's first that many days. |
backup:deadman | Scheduled backups are on and none has landed for BACKUP_MAX_AGE_HOURS (36) hours. |
backup:copy | The last backup was not copied to one of its off-machine targets. |
backup:drill | The last restore drill failed. |
It also shows the connectors, seat call latency (p50 and p95 over the last 50 calls), recent runs, breakers, dead jobs, and the last backup and anchor.
Troubleshooting
Run npm run doctor first (in Docker: docker compose exec app npm run doctor). It names what is
wrong and how to fix it. The common cases:
| What you see | Why | Fix |
|---|---|---|
| The start link opens "not signed in" | The token in the link is old, or the cookie was cleared. | Get the current link: the terminal where the server started, or docker compose logs app | grep Open. |
421 Misdirected Request | You opened it by a name that is not in ALLOWED_HOSTS. | Add the name (host only, no https://, no port) to ALLOWED_HOSTS and restart. |
| The phone cannot reach the address | Tailscale is off on one device, or tailscale serve is not running. | tailscale status on both; run sudo tailscale serve --bg 4747 again. |
docker compose logs app has no link | The app is still waiting for Postgres, or it exited. | docker compose ps; docker compose logs db. A changed POSTGRES_PASSWORD needs docker compose down -v, which deletes the fund. Back up first. |
EADDRINUSE on start | Another server holds port 4747. | Stop it, or start with --port <n> (Docker: PORT=<n> in .env). |
| Prices show "fallback" | The live price source did not answer. | Check the machine reaches the internet; a firewall or proxy may block it. MARKET=synthetic runs without it. |
| The doctor says the clock is off | Sessions, cooling-off and signatures depend on the time. | Turn on automatic time: macOS Date & Time settings; Linux sudo timedatectl set-ntp true. |
| The seats "run scripted" | No model key is set, or the key failed its test. | Setup and connections → AI models: paste a key and test it. |
| A test notice never arrives | The channel's address or token is wrong, or it points at the wrong chat. | Re-enter the fields in Notifications and press Send a test notice; the result names the failing channel. |
| Backups are off | No BACKUP_PASSPHRASE. | Set one in Backups, make a backup and run a restore drill. Keep a copy of the passphrase elsewhere. |
| The broker test says "does not answer" | The Client Portal Gateway is not running, or not at that address. | resolution status shows whether the ibkr-gateway container is up. On the host, start it (bin/run.sh root/conf.yaml). The address is https://ibkr-gateway:5000/v1/api for the container and https://host.docker.internal:5000/v1/api for a gateway on the host. |
| The broker test says "not logged in" | IBKR ends gateway sessions daily. | Open the login page (resolution ibkr-login prints it; https://localhost:5000 on the gateway's machine) and log in. Resolution never sees that password. |
| A setting says "set by the server environment" | The variable is in the environment or .env, which always wins. | Change it there and restart, or remove it there to manage it from the page. |
| "This server keeps nothing on disk" | It was started with --memory. | Start without --memory to keep the fund and save settings. |