Keep masks healthy
The health panel
Section titled “The health panel”The overview in Manage this server has a Health panel. masks runs every check every 10 minutes. Each check shows Fine, Needs a look, or Failing, says what it found, and says what to do about it. Check now runs them again.
| Background jobs | Whether any job, such as sending mail, failed in the last day. |
| Worker | Whether the part of masks that runs jobs is running. |
| Queue | Whether jobs start on time. |
| LDAP | Whether the directory service, if it is on, is reachable only in a safe way. |
| Metrics | Whether the page that reports figures to a monitor is on and protected. |
| Whether the mail server answers. No mail is sent. | |
| Public address | Whether requests reach masks at its own address. A proxy that is set up wrong shows up here. |
| Domains | Whether every domain you claimed still has its proof. |
| Signing keys | Whether the key masks signs with is fresh. |
| Reverse proxy | Whether the web server in front of masks passes requests along the way masks expects. |
Whoever runs the server can also have masks check for new releases once a day. The overview then says Version and the new number is available, with a Release notes link. When a release needs a step from the person who runs the server, the overview says This release needs a step from an operator. Read its notes before you upgrade. Turning the check on is in self-hosting.
Back up
Section titled “Back up”Everything masks holds is in its database and its master key. Keep both together. A backup of the database alone cannot be read without the key.
With masks in one container named masks:
-
Save the database:
Terminal window docker exec masks pg_dump --host=/rails/tmp/postgres --format=custom masks_production > masks.dump -
Save the master key:
Terminal window docker cp masks:/rails/storage/master.key master.key -
Keep the two files together, somewhere other than the computer masks runs on.
With Compose, run the same commands with docker compose exec masks and docker compose cp.
Restore
Section titled “Restore”-
Start masks the same way as before, with the same master key in its volume.
-
Load the backup into the running container, then restart it:
Terminal window docker exec -i masks pg_restore --host=/rails/tmp/postgres --dbname=masks_production \--clean --if-exists --no-owner --role=masks_owner < masks.dumpdocker restart masks
Everyone keeps their passkeys and second steps. Sign-ins that were live at the time of the backup work again.
Upgrade
Section titled “Upgrade”- Take a backup.
- Open the release notes on GitHub. A line that starts with Operator: is a step you have to take yourself.
- Change the version and restart.
With Compose, change the number after ghcr.io/masksrb/masks: in compose.yml, then:
docker compose up -dWith docker run, stop and remove the container, then start it again with the new version. The
masks volume keeps everything. Put the new version in place of 0.12.0:
docker stop masksdocker rm masksdocker run --name masks -p 3000:3000 -v masks:/rails/storage ghcr.io/masksrb/masks:0.12.0Each start brings the database up to date, so you can skip versions. Updates do not run backwards, which is why the backup comes first.
Locked out
Section titled “Locked out”When the only manager has lost their phone and their backup codes, nobody can sign in to reset them. Whoever runs the server can reset that account from the server itself. See getting back into a locked account.