Run and maintain

Update the server and the app, back up the data and read the device alerts.

Update the server

cd ~/guardian
docker compose pull
docker compose up -d

The server updates the database when it starts. The data stays in data/. To go back to a version, set the image tag to sha-<commit> in compose.yaml.

On Unraid: go to Docker > Check for Updates, then apply update.

Mac app updates

Kid Macs check your server for a new version every hour and install it by themselves. Your server gets the versions from the Guardian project on GitHub.

Back up

All data is in data/. Copy the database while the server runs:

docker compose exec guardian python -c "import sqlite3; sqlite3.connect('/data/app.db').backup(sqlite3.connect('/data/backup.db'))"

Then copy these files to your backup:

FileContent
data/backup.dbRules, kids and history.
data/vapid_private.pem, data/vapid_public.txtPush keys. Without them, each parent must turn on notifications again.
.envSettings.

Restore

  1. Stop the server:
    docker compose down
    
  2. Delete data/app.db-wal and data/app.db-shm if they exist.
  3. Copy backup.db to data/app.db. Copy back the other files.
  4. Start the server:
    docker compose up -d
    

Device status

The web app shows the status of each device on the kid page (Devices) and on the Live page. A bad status also shows a red dot next to the kid.

StatusMeaningPush notification
OnlineThe app runs and sends data.
LockedThe screen of the Mac is locked.
AsleepThe Mac sleeps.
OffThe Mac is shut down, or the kid logged out.
App stoppedThe app was quit.“The app was quit. Protection is off.”
SilentNo contact for 5 minutes: no network, or the app was killed. Also after 24 hours asleep with no contact (no push).“No contact. Protection may be off.”
Extension missingChrome is open without the extension.“The Chrome extension is missing or off.”
UnpairedThe kid unpaired the Mac from the menu.“The device was unpaired.”
Waiting to pairThe device has a pairing code, but is not paired.
RemovedYou removed the device.

When the app starts again after a kill or a crash, the timeline shows “App was force-quit”, and you get the push “The app was stopped without a clean exit.”

On the kid Mac:

  • If the extension is missing, a full-screen message covers Chrome, with one button to open the extension page.
  • If the app does not run, the extension blocks each web page with “Guardian is not running”.
  • Without network, the app uses its last decisions. New pages and apps get a challenge.

To stop the alert notifications, turn off Settings > Notifications > Device alerts.