Black Branch/Docs
All sections

Health and the Doctor

This page is for you when you want to know how your install is doing. After reading it you can read status, understand every Doctor row and its fix, send a report when you ask for help, and have problems sent to your phone or your email.

Three tools answer three questions, from quick to thorough:

Tool Question
sudo blackbranch status Is everything running?
The Doctor Is everything set up right?
sudo blackbranch health Would an update's health check pass right now?

Status

sudo blackbranch status answers in a second or two:

Black Branch — example.com (TLS: tunnel)
  release      0.1.0-preview.5 (channel beta)
  site image   ghcr.io/…/web@sha256:3f9a1c0b2d4e…
  federation   off
  setup        finished
  backups      last 2026-11-10T04:00:12Z (a1b2c3d4, to s3) · verify passed 2026-11-09T04:31:40Z
  restart      nothing waiting (32 settings apply only at a restart: blackbranch help lists them)
  update check last read 2026-11-10T04:49:03Z — up to date
  last update  2026-11-08T18:20:41Z: 0.1.0-preview.4 → 0.1.0-preview.5, health check passed

  SERVICE         STATE
  postgres        healthy
  stream-api      healthy
  …

Each service shows one of these states:

State Meaning
healthy Its own health check passes
running It runs, and has no health check of its own
starting It is still starting
unhealthy, exited, missing Something is wrong: read its log (Logs, restarts and repairs)

The ingest service can also show "running, but a chat reader did not start". The service runs, but one platform's chat is not being read. The Doctor's row Chat readers started names which one and why.

The command exits with status 1 if any service is not healthy or running. While an update runs, the update check line shows its progress instead. If setup is not finished, the setup line says how far it got and where to carry on.

The restart line is about settings that take effect only when their service restarts. "nothing waiting" means every one you changed is in use. When you changed one in the Admin Panel since its service last started, the line says WAITING, names the setting and gives the command to run, such as sudo blackbranch restart stream-api. blackbranch help lists every such setting.

The Doctor

Admin Panel → Doctor and sudo blackbranch doctor show the same checks with the same verdicts. The Doctor only reads: it never changes anything.

Mark In the Admin Panel Meaning
Green, ok ok Fine
Amber, warn to look at Works, but worth a look. A fix line is shown under it.
Red, FAIL failing Something does not work. A fix line is shown under it. Fix these first.
Grey, - not checked Switched off, or a fact was missing. The row says which.

The top of the Doctor page sums the rows up in three lines:

Press a count that has rows behind it to jump to the first of them. sudo blackbranch doctor prints the same counts at the top of its list.

The fix lines print the commands as you type them on the server, with sudo in front. A fix in the Admin Panel ends with "press Check": correct the value on that page, then press its Check button.

Check again on the Doctor page asks the server for fresh facts. When the site is down, sudo blackbranch doctor still prints the server's half, and the site's rows say the site did not report.

If your homeserver runs somewhere else rather than inside this install, the Matrix rows' fix lines tell you what to do where it runs, and the federation and lockdown rows are grey ("managed outside Black Branch").

Every check

The Doctor runs 57 checks, in these groups.

Box (the server itself)

Check What it looks at, and what a problem usually means
Memory: at least 4 GB The server's memory. The install uses about half of it, and an update runs a second copy of the site beside the first.
Disk: at least 15 % free Free space where the install lives and where Docker keeps its data. See Disk space.
Clock: in sync The system clock is synchronised. Sign-ins depend on it. Fix: sudo timedatectl set-ntp true.
Security updates install themselves unattended-upgrades is installed and switched on.

Front door (how visitors reach you)

Check What it looks at, and what a problem usually means
The three names resolve Your domain, api. and matrix. resolve in DNS from the server.
Tunnel connected, or certificates valid Tunnel mode: the tunnel is connected. Direct mode: each name's certificate has more than 14 days left. Let's Encrypt renews at about 30, so 14 means renewal is failing, usually because port 80 or 443 is blocked.
The site, api. and matrix. answer by name Each address answers through the router. In direct mode the server asks its own router, so a home router cannot cause a false alarm here. In tunnel mode it asks through Cloudflare.
Reachable from outside by the public names Direct mode: whether the three names answer when asked from the server by their public address. Amber at worst: many home routers cannot reach their own public address from inside. Open the site on a phone with Wi-Fi off. If it opens, nothing is wrong. If it does not, check the DNS records and that ports 80 and 443 are forwarded to the server.

Services

Check What it looks at, and what a problem usually means
The chat service (stream-api) answers The chat service answers the site. Amber when it answers but has not loaded your saved settings, so it runs on defaults.
The ingest service (stream-ingest) runs The ingest service has reported to the chat service in the last 15 minutes. It reports at least every 5.
Platform chat: reader and last message For each platform you set up: whether it is being read, and when its last message came. A quiet chat is never a problem. Red means nothing reads that platform, or its connection is broken.
Chat readers started Whether each platform's chat reader started. Red names the platform and its one-line reason. The site's Stream tab shows the same.
Live detection answers for every configured platform For each platform you set up: whether the site can tell if you are live right now. Green when every platform answers; amber when one has not answered for a while (a missing key, an API error, a page the site could not read). The site's Stream tab (admins) shows each platform's state and why it can't tell; sudo blackbranch logs stream-ingest has the detail.
Discord bridge The bridge between your Discord server and your site's chat. Grey "off" until a Discord bot token is set. Amber when a token is set but the bridge is not switched on. Green ("on and running") when it runs and Discord and your chat server have let it in. Red "waiting for its settings file" when the bridge has not been given its settings yet (sudo blackbranch up writes them), and red "cannot keep its database" when its storage belongs to another user. Red when it is switched on and does not answer (a refused token, or Discord or the chat server down: it keeps trying by itself); sudo blackbranch logs ooye says what Discord or the chat server answered. Never holds up an update.
Discord bot sees the server Whether Discord lets your bridge's bot in, and whether it is in the Discord server you imported your community from (Admin Panel › Site › Discord). Grey "off" while the bridge is off, and "no Discord server imported yet" before the Import step. Amber when the bot's Server Members or Message Content switch is off on Discord (Developer Portal → your application → Bot). Red "Discord refused the bot token" (paste a new one on the Discord page's Bot step), and red when the bot is not in that server (add it again with the link on the Bot step).

Database

Check What it looks at, and what a problem usually means
Postgres answers The site can reach its database.
The database is at this release's version Every database change this release ships has been applied. Fix: sudo blackbranch migrate.
The vector extension is present The database extension the chat bot's memory uses.
An install from before the platform-key rename keeps its old id Only for sites that ran before Black Branch existed as a product. On a new install it is grey: nothing to translate.

Matrix (the homeserver)

Check What it looks at, and what a problem usually means
Synapse answers (/versions) The homeserver answers.
MAS, the sign-in service, answers (/health) The sign-in service answers.
The homeserver names this site's sign-in service The homeserver's configuration points at the right sign-in service. Fix: sudo blackbranch render.
Both well-known files match the config The two discovery files the site serves name the right addresses.
The rendered config files match a fresh render Nobody edited the generated configuration by hand, and .env still produces it.
Federation matches its switch The switch is on and other servers can reach yours, or it is off and they cannot.
Homeserver sign-up has the lockdown's last change When a lockdown closed or reopened sign-up, the homeserver has applied it. Grey for the first few minutes while it applies.
No legacy Matrix prefix on a fresh install A setting only older, migrated sites use is not set on a new one.
Deleted accounts: their Matrix accounts are removed When someone deletes their account, the site removes their Matrix account last, and retries every hour if the sign-in service refused. Red counts the accounts still waiting.
Mail: the sign-in service can send (password recovery, address checks) From the last sudo blackbranch mail test <your address>. Grey with no mail server set.
Sign in with Google, Discord, Twitch, your OpenID server One row per provider. Grey "off" until you switch it on. Green when the sign-in service offers its button and the provider answers. Red when a client id, secret or address is missing or unusable (nobody sees the button; sudo blackbranch render says which), when the sign-in service does not offer it yet (run sudo blackbranch render), when the provider does not answer the server, or when your own server names a different address for itself (copy its issuer exactly). See Sign-in providers.
The community service account answers Your community's own account, which keeps the rooms: its registration is in place and its token answers as the account. Red when someone already uses its name on your server; the fix line says what to set.
The community's rooms are as the Community page sets them From the last community run. Green: nothing to put back. Amber: it put something back, left a difference as it is, or could not look after a room. Red: the last run failed. See Community rooms → The Doctor.
The community's rooms were checked in the last 30 minutes A run every 10 minutes keeps this green. Amber when runs stopped; grey when the server does not keep the rooms (sudo blackbranch community on switches it on).
The server keeps messages as long as the cap says The chat server's retention settings match Longest a channel keeps messages (Admin Panel → Site → Site, card Channels). Red after you change the cap, until the chat server's next start.

Secrets

Check What it looks at, and what a problem usually means
Every bootstrap secret is present Every secret in .env is there, and the homeserver's and the sign-in service's signing keys exist.
The site holds its secrets The site was started with every secret it needs.
A stored token decrypts with TOKEN_ENC_KEY One stored platform sign-in decrypts. Red means .env holds a different key from the one the tokens were stored with, usually a settings file swapped or restored from the wrong backup.
Saved credentials decrypt The keys you saved in the Admin Panel decrypt.

What each secret protects is on The install's settings file.

Modules

Check What it looks at, and what a problem usually means
Each switched-on module's Test passes The same Check as on the module's Admin Panel page, run again. Grey for a module that is switched off ("not set up yet"), or whose check has not run. Red names the module and what failed.
No setup step left skipped Amber lists the setup steps you skipped.
Read-aloud has its key and a voice While spoken alerts are switched on: the ElevenLabs key and a voice are set. Set them in Admin Panel → Utility → TTS, card Voice.
No switch is held on by the upgrade fail-safe After an update, a feature kept on because a database change has not been applied yet. Fix: sudo blackbranch migrate.

Media

Check What it looks at, and what a problem usually means
No audio or video library through the tunnel Cloudflare's terms do not allow serving a media library through a tunnel. No feature a new install can switch on serves one, so this is green.

Payments

Check What it looks at, and what a problem usually means
Stripe: this site's webhook exists, is enabled and sends every event Stripe's webhook Check, run again. A key without permission to read webhooks shows grey: check the webhook by hand in Stripe's dashboard.
Stripe gets past Cloudflare's bot protection Always grey while Stripe is on: your site cannot see your Cloudflare settings, so check by hand. On a Free plan, Bot Fight Mode must be off; on a paid plan, a Super Bot Fight Mode skip rule for /api/billing/webhook lets Stripe through. See Letting payment webhooks through.
PayPal: the webhook id exists and points at this site PayPal's webhook Check, run again. When you sell subscriptions through PayPal, it also checks the webhook sends the subscription events.
Every gift refund covered whole gifts Amber when a partial refund of a community gift in the last 90 days covered only part of a gift slot. Decide by hand: refund the rest in Stripe, or leave it.

Platforms

Check What it looks at, and what a problem usually means
Platform keys accepted Each platform's Check (Twitch, Kick, YouTube, Streamplace). A platform with only a channel name set has nothing to test and shows "not checked", never green.

Alerts

Check What it looks at, and what a problem usually means
Alerts reach someone Whether the site's phone alert topic is set (Alerts pushed to your phone). Amber with none; important problems still show here, but a failed backup or update is seen only here. Optional: one topic is enough, and it carries the server's own alerts too unless .env names a channel of its own (Alerts from the server).

Backups

Check What it looks at, and what a problem usually means
The last good backup is less than 36 hours old From the last backup's result. Amber when the last run failed but the one before is recent.
The newest backup restores (checked weekly) From the last restore check. Amber when it passed but is more than 8 days old.
The backup target answers The target is reachable, holds backups, and opens with your passphrase.

Updates

Check What it looks at, and what a problem usually means
The update feed was read in the last 3 days When the signed release feed was last read, and whether a release is waiting. Red when it has never been read or not for 3 days. Amber when the last read failed, or the feed is read over plain http.
The last update finished The last update's result: updated, not applied, rolled back, or cut off. See Rollback.

A report to share

When you ask for help, attach the report instead of a screenshot:

sudo blackbranch doctor --report

Where to ask: the Doctor page's header (and the end of the install, and the end of sudo blackbranch doctor) has a Need help? line with the guides, the project's Discord (discord.gg/uFJbHMbaE) and this command.

It writes /opt/blackbranch/doctor-report-<time>.txt with the release, which modules are on, every check, and the fix lines of the failing ones. It holds no secret, no chat text, no viewer id and not your domain.

Before keeping the file, the command searches it for every value of six characters or more in your .env. If it finds one, it deletes the report and stops. Read the report yourself before you send it anyway.

Health: the update's own check

sudo blackbranch health runs, on demand, the check an update runs after it switches to a new release:

  1. It waits for every service to be healthy.
  2. It runs every Doctor check an update can affect (the front door's answers, the database, the homeserver, the secrets) and requires none of them to fail.
  3. It opens a live chat connection to the chat service and waits for a message.
  4. It does a sign-in round trip: a short-lived sign-in for your admin account must work on the homeserver, then it is ended.

It prints each part, and exits with status 1 if any part fails. Run it after a repair, to know the install is as healthy as an update would require.

Alerts from the server

The server tells you about the problems only it can see, so you do not have to open the Doctor to find them. It sends an alert when:

Each alert says what happened and which command shows why. It never holds a password, a key or a program's own error text.

They go to the topic you set for the site's own alerts (Admin Panel → Site → Site, card Alerts to your phone, below): every problem to the urgent topic, the test alert and "working again" notes to the quiet one (one topic takes both). If the database is down when an alert goes out, the server uses the topic it read last. So setting that one topic covers both kinds of alert.

To send the server's alerts somewhere else, set one or both of these in /opt/blackbranch/.env (a topic here replaces the site's for these alerts):

Open the file with sudo nano /opt/blackbranch/.env, fill in the line, and save. Then send a test:

sudo blackbranch alerts test

It says whether the alert went out. With no topic in the Admin Panel and neither value set, alerts go to the server's log, which you read with sudo journalctl -u blackbranch-backup or sudo journalctl -u blackbranch-check. An alert that cannot be sent is noted in the log and never stops a backup or an update.

Alerts pushed to your phone

These topics carry the site's own alerts (what the chat service notices while the site runs) and, unless .env names a channel of its own, the server's too. They are pushed to your phone with ntfy, a free push-notification service with a phone app:

  1. In the ntfy app, subscribe to a topic with a long name nobody could guess. The name is the only secret: anyone who knows it can read it. You can use two topics, one for urgent alarms and one for the rest.
  2. In Admin Panel → Site → Site, card Alerts to your phone, paste the topic's address (https://ntfy.sh/<topic>) as the urgent topic, the quiet topic, or both. With only one set, all alarms go to it.

The last setup page (Phone alerts) takes the same: one topic, both, or neither.

What is pushed:

Topic Alarms
Urgent (top priority, can sound through do-not-disturb) A payment or support event the chat service could not record properly (a failed ledger write, a currency it cannot price, a take-home that came out at zero), and a stream alert it had to reject or drop
Quiet Automod checks failing or too slow (messages are delivered unchecked meanwhile), an AI task failing, the chat bot's memory pausing itself, a saved credential that cannot be read, a burst of browser errors, sign-in discovery failing, a deleted account whose Matrix account could not be removed, and the ingest service failing repeatedly

Each kind of alarm is sent at most once per 15 minutes, with a count of any held back. A push names the kind of problem and counts only, never a supporter's name, an amount or a message.

Next: Logs, restarts and repairs

← Running it