mirror of
https://github.com/warmbly/warmbly.git
synced 2026-12-04 08:07:52 +00:00
5.5 KiB
5.5 KiB
name, description
| name | description |
|---|---|
| warmbly-ops | Administer and recover a self-hosted Warmbly instance with warmblyctl's operator commands - instance status and health checks, creating accounts, resetting passwords, granting or revoking platform admin, disabling 2FA, claiming a fresh instance, exporting or importing a workspace. Use when the task is about the instance itself (accounts, access, health, migration) rather than campaigns or contacts. |
Operating a Warmbly instance with warmblyctl
The operator commands talk to the database directly, so they work when
signing in does not. They run wherever PRIMARY_DB is set, which in practice
means inside the backend container:
docker compose -p warmbly exec backend warmblyctl <command>
make cli ARGS="<command>" # same thing on a compose install
Start every investigation with status
docker compose -p warmbly exec backend warmblyctl status # prose + exit 1 on errors
docker compose -p warmbly exec backend warmblyctl status --json # stable keys, always exits 0
make doctor # the same, wrapped
--json keys are a contract (only ever appended to); read .summary.error
for the verdict and .next_steps for the exact commands the situation calls
for. Prefer parsing that over reasoning from the prose.
The commands
| Task | Command |
|---|---|
| Claim a fresh instance | warmblyctl setup-link (refuses once accounts exist) |
| Create an account | warmblyctl user create --email you@example.com [--admin] |
| List accounts / find admins | warmblyctl user list [--admin] |
| Reset a password | warmblyctl user reset-password --email ... (prints a link) |
| Grant platform admin | warmblyctl user grant-admin --email ... --role super|support|ops|analyst |
| Revoke platform admin | warmblyctl user revoke-admin --email ... |
| Clear a lost authenticator | warmblyctl user disable-2fa --email ... |
| Hash for unattended bootstrap | warmblyctl hash-password |
| List workspaces | warmblyctl org list |
| Move a workspace out | warmblyctl org export --org <id|slug|owner-email> --out file.zip |
| Move a workspace in | warmblyctl org import --org ... --file file.zip --dry-run first |
| Back the instance up | warmblyctl backup --out /data/blobs/warmbly.tar.gz, then copy it out and delete it |
| Restore one onto this instance | warmblyctl restore --file /data/blobs/warmbly.tar.gz |
| See which key opens each stored secret | warmblyctl keys status [--json] |
| See what the database is busy with: connections by service, costliest queries, largest tables | warmblyctl db load [--limit N] [--json] |
| Move secrets onto a new primary key | warmblyctl keys reseal (dry run), then keys reseal --apply |
| Mint replacement keys and tokens | warmblyctl keys generate [NAME...] |
Mechanics that bite
- Prompts need a TTY; pipes need
-T.docker compose execallocates a TTY unless you pass-T, so:- prompting:
docker compose -p warmbly exec backend warmblyctl user create --email ... - piping:
printf '%s' "$PW" | docker compose -p warmbly exec -T backend warmblyctl user create --email ... --password-stdin
- prompting:
- Passwords are 8-128 characters, the dashboard's own rule.
--adminopens the admin panel onADMIN_URL(port 5174 by default), not the dashboard onAPP_URL.- Redis down:
setup-linkand link-mintingreset-passwordfail; useuser reset-password --password-stdininstead. Everything else degrades to a warning and keeps working. org importalways with--dry-runfirst; the report is free and names every member whose rows would be reassigned to the owner.org export --with-credentialsproduces the most sensitive file the product has (every mailbox password and refresh token, sealed only by the passphrase you supply). Never write it anywhere world-readable, and never echo the passphrase.backupandrestoreare the INSTANCE-level pair and are not interchangeable withorg export/org import: a bundle cannot be applied to one workspace, and a workspace archive cannot restore an instance.restorereplaces every organization, user and mailbox on the target. It asks for a typedrestorefirst;--yesskips that, so only pass it to a target you have just checked withstatus --json.restorerefuses when the host'sCREDENTIALS_ENCRYPTION_KEYorKMS_LOCAL_MASTER_KEYdiffer from the bundle's, and prints the lines to put in.env. Do that.--forceaccepts losing every stored mailbox credential permanently and is never the right answer to that message.
Standing an instance up, or moving one
Installing, reconfiguring, backing up on a schedule and moving an instance to
another host is the warmbly-install skill.
Interacting with the product itself
Campaigns, contacts, mailboxes, the inbox and settings go through the API
half of warmblyctl with an API key. That is the warmbly-api skill.
- Rotating
CREDENTIALS_ENCRYPTION_KEYorTWOFA_SECRETis never a swap. Deploy the new value with the old one inCREDENTIALS_ENCRYPTION_READ_KEYS/TWOFA_READ_SECRETS, runkeys reseal --applyuntilkeys statusshows nothing under a read key, and keep the old key while any backup, rollback target or pending job still needs it. Swapping the primary without the old key as a read key makes every stored mailbox credential or MFA enrolment unopenable. keys statusandkeys resealexit non-zero when a value opens under no configured key. That is the signal to restore a key, never to retire one, andresealleaves those values untouched.