Checking an instance
doctor checks what an instance needs to run and prints one report. Run it after setting an instance up, after
changing its environment, or when something is wrong and you don't know where to start. It only reads: it writes,
stores or changes nothing, and it never prints a secret, not even part of one (decision 0007 point 13).
Run it where the API runs, with the API's environment, in each container you want checked (the admin, public and worker containers each have their own):
node console/doctor.mjs
docker exec <api container> node console/doctor.mjs --json
In a checkout of SHADE: pnpm doctor from the repository root. On a server shade install set up, sudo shade doctor runs it in the admin container with the proxy's and the clock's checks below (Self-hosting without
Coolify).
What it checks
| Check | Fails when | Warns when |
|---|---|---|
env | The API would refuse to start with this environment. It runs the same check the API runs at start and lists every problem, by variable. | |
secrets | Some of the instance's secrets are neither set nor generated yet (with SHADE_SECRETS_DIR). Otherwise it names which were generated on the first start and which set in the environment, never a value, and asks for a copy of a generated APP_SECRET and backup key apart from the server. Without SHADE_SECRETS_DIR, every secret comes from the environment. | |
url-passwords | A password inside DATABASE_URL, REDIS_URL or another connection URL has characters a URL can't hold as they are, such as @ : / ? # % or a space. It names the variable, never the password. | |
redis | Redis doesn't answer a ping within 3 seconds, or REDIS_URL is missing. | |
database-role | The role in DATABASE_URL is a superuser, has BYPASSRLS or owns a table (SHADE refuses to start with it, The database's roles). It names each problem. | |
row-security | A table has row-level security switched off (SHADE refuses to start with it, Row-level security), or one of the views modules read accounts and the trash through is missing, shows another column, lost its security_barrier or can be written by another role. It names the tables or the problem and how to switch it on again. | The database couldn't be read. |
sealed-values | A stored secret opens with neither APP_SECRET nor APP_SECRET_PREVIOUS, or the database can't be reached or read. | |
backup-key | Backups are on (SHADE_BACKUP_URL) but SHADE_BACKUP_KEY is missing or isn't 32 bytes in base64. | Backups are off. |
backup-target | Never. It says where the backup target and the bucket's keys come from, by variable: the backup-target command's file, the environment (which wins), or both. Never a key. | |
migrations | Core's migrations aren't all applied, or the database can't be reached or read. It names the pending ones and how to apply them. | |
kept-copy | Nobody has confirmed that a copy of APP_SECRET and SHADE_BACKUP_KEY, as they are now, is kept apart from the server (an admin signed in themselves: POST /api/backups/kept-copy), or the database couldn't be read. The public container, which holds no backup key, can't tell and says so. | |
account-route | …/api/v1/account/session on SHADE_ACCOUNT_URL (else SHADE_API_URL) answers 404: the proxy sends the account API to the admin container, or strips the prefix on the way there. | Nothing answers within 5 seconds, or the answer is a server error, a redirect, an access gate or another server. It is skipped, with a note, when neither address is usable or the address is the machine's own (localhost). |
last-upgrade | The database couldn't be read. Otherwise it tells the last upgrade the database recorded: the version, when and by which container. | |
clock (with --host-clock) | The server's clock is not synchronised, or the host could not tell. | |
proxy-certificates (with --proxy) | A domain's certificate is not trusted, or ends within 14 days. | |
proxy-domains (with --proxy) | A domain doesn't answer through the proxy, or answers with a server error (5xx). | |
proxy-health (with --proxy) | /health on the API's domain doesn't answer 200 through the proxy. | |
proxy-api (with --proxy) | The proxy's API answers (Caddy's admin API at port 2019, /config/; Traefik's /api/rawdata), or its dashboard port, 8080, answers /api/rawdata the same way. SHADE's own Caddy keeps the admin API on a socket, so it passes. |
APP_SECRET_PREVIOUS is optional: without it, only APP_SECRET is tried.
Reading the report
Each check prints one line: ok, warning or failed, its name, and the reason, with what to do where that helps.
The last line sums it up.
ok env: The environment is valid: the API starts with it.
ok url-passwords: The passwords in DATABASE_URL, REDIS_URL are URL-safe.
ok redis: Redis answered.
ok sealed-values: APP_SECRET opened 12 of 12 sealed values tried.
warning backup-key: Backups are off: SHADE_BACKUP_URL is not set, so no backups are taken and none needs SHADE_BACKUP_KEY.
ok backup-target: No backup target: set one in the admin container with node console/backup-target.mjs set, or SHADE_BACKUP_URL and the bucket's keys in the environment.
ok migrations: Core's migrations are applied.
ok last-upgrade: SHADE 0.1.0, recorded 2026-11-20T09:30:00.000Z by admin@web-1.
ok account-route: /api/v1/account answers on https://example.org.
No check failed; 1 warning.
--proxy <host:port>adds the proxy's checks: it connects to the proxy there and names each domain as a browser does, the domains ofSHADE_API_URL,SHADE_ADMIN_URLandSHADE_ACCOUNT_URL(https only).shade doctorpasses--proxy caddy:8443; on another host give the proxy's public address (--proxy api.example.com:443).--host-clock synced|unsynced|unknownreports the server's clock as the host found it: a container can't tell.shade doctorpasses whattimedatectlsays.- The exit code is 0 when no check failed, warnings included, and 1 when one did.
--jsonprints{ "ok": true, "checks": [{ "name", "status", "message" }] }instead, for scripts and Shade Desk.
The checks in more detail
url-passwords: percent-encode a password in a URL:@is%40,:is%3A,/is%2F,#is%23and%is%25. Or choose a password of letters and digits. The database and Redis keep the password as it is; only the way it's written in the URL changes.sealed-valuesopens up to 20 rows from each of the stores SHADE seals withAPP_SECRET: modules' secret settings, the email and other providers' secrets, and webhook signing secrets. It says how many opened out of how many it tried, and how many neededAPP_SECRET_PREVIOUS. When some did, finish rotating APP_SECRET withrotate-secrets. It doesn't try team members' two-factor secrets or what modules seal in their own tables.backup-key: the worker takes the backups and the admin container takes one before it migrates, so both need the sameSHADE_BACKUP_KEY(Updating and backups). In the public container, which reads no backup setting, this check andbackup-targetsay so and pass.migrationscompares core's migrations in this image with those the database applied, asstatusdoes. The modules' migrations run when SHADE starts, after it reads the modules, sodoctorleaves them tostatus. The last upgrade comes from the update history shown on Settings, Updates.