Hearth documentation

Troubleshooting

Start with three things: the container's log (docker compose logs hearth --tail 200), the answer of /readyz, and Administration, Jobs. Most problems show in one of them.

Hearth does not start

Hearth checks every setting before it starts and stops with all the mistakes at once, one per line, after hearth:. For example:

hearth: STORAGE must be set to local or s3
PUBLIC_URL must be https (http only for localhost)
MASTER_KEY_FILE: cannot read /run/hearth/master.key: permission denied

Common ones:

Message What to do
X must be set a required setting is missing: add it
PUBLIC_URL must be an address like https://hearth.example.com (no path) give the origin only, without a path or a trailing part
PUBLIC_URL must be https (http only for localhost) use https; plain http works only on localhost
MASTER_KEY_FILE: cannot read ... the file is missing or not readable by user 65532
MASTER_KEY_FILE must hold 32 bytes as 64 hex characters or base64 (e.g. openssl rand -hex 32) the file has the wrong content; make it with openssl rand -hex 32
... must be a whole number from A to B (it is "...") a number outside its range; see the configuration reference
MAIL_SMTP_TLS=none is only for a relay on localhost use tls (port 465) or starttls (port 587) for a remote mail server
TALK_SEALED_COPY_DEFAULT: true or false, with TALK=true add TALK_SEALED_COPY_DEFAULT when Talk is on (Talk and calls)
OCR_MODELS_DIR: required with OCR_HELPER set both, or neither
TYPST_FONTS: the bundled fonts' folder, required with TYPST_ENGINE set both, or neither
... the jail program is found beside Hearth's binary ... the engines need hearth-jail next to /hearth; use the image as built, do not copy the binary out alone

Settings that come in groups (MAIL_*, LITELLM_*, QDRANT_*, CALLS_LIVEKIT_*, VAULTWARDEN_*, the APNs settings) are all or nothing: one of them set makes the others required.

With Docker Compose, a compose file that names a variable missing from .env with ${X:?...} stops before Hearth runs at all. docker compose config shows the problem.

/readyz says "not ready"

/readyz names what does not answer:

Everyone has the same address in the audit log

Every sign-in, audit entry and signing record shows the proxy's address instead of the visitor's. TRUSTED_PROXIES does not include the address the proxy connects from.

  1. Find the gateway of each Docker network the Hearth container is on:

    docker network inspect $(docker inspect hearth -f '{{range $k, $v := .NetworkSettings.Networks}}{{$k}} {{end}}') -f '{{.Name}} {{range .IPAM.Config}}{{.Gateway}}{{end}}'
    
  2. List all of them in TRUSTED_PROXIES, comma-separated, and restart.

A network added to the container later needs its gateway added too. This also matters for the sign-in limit: without it every visitor shares one network count, and one person's wrong passwords slow everyone down.

Mail does not go out

Invitations, guests' codes and the weekly summary need outgoing mail.

Invitations are never mailed to placeholder addresses or to an address that already has an account.

Office documents do not open

Look at Administration, Office, or run hearth office show.

The virus scanner is not answering

Administration, Virus scan shows Not answering, and admins get a notice.

Sync apps list everything again after a restore

That is intended. When Hearth notices that its database was put back from a backup, it gives every storage a new sync epoch, and every sync app compares its folders with the server once, instead of trusting ids the restored database no longer knows. Nothing is deleted on either side by this.

Hearth notices by comparing the database with the value in SYNC_LINEAGE_DIR. If you restored the database by hand and also copied an old SYNC_LINEAGE_DIR back, Hearth cannot tell: run hearth sync new-epoch yourself, and never back up or restore that folder.

hearth sync status shows the sync feed's storages and the files still waiting for a content hash.

Background work is slow or stuck

Administration, Jobs shows what is waiting, running and failed.

People cannot sign in

Finding one request

Every response carries X-Request-Id. When someone reports an error, ask for the time (or the id from the browser's network panel), then search the log for it: every line of that request carries the same rid, and the "request failed" line has the cause.