Where the data lives
-
Accounts and school settings:
/var/lib/schoolstack/school.json; each class (its posts, work and grades) in its own file in/var/lib/schoolstack/school-classes/, so a change rewrites only the class it touches and the site stays quick for a whole school. They're plain, readable text./opt/schoolstack/bin/schoolstack-cli --data /var/lib/schoolstack/school.json exportprints all of it as one file (that's what the backups hold). -
Uploaded files:
/var/lib/schoolstack/files, each named by its contents' fingerprint (SHA-256), so a file used in many places is stored once. -
PDF page pictures:
/var/lib/schoolstack/files/previews, drawn the first time someone opens a PDF's pages and kept (with each PDF's page count). They can be deleted at any time; they are drawn again when needed. A PDF that takes more than 20 seconds to draw, or is damaged, is shown as a download only, and the journal says why (previews: …). -
Simulations:
/var/lib/schoolstack/simulations, the approved simulations' files in English and Arabic (about 80 MB).schoolstack-updatedownloads any that are missing and checks each against its fingerprint, so a changed file is never used; to fetch them by hand, runsudo runuser -u schoolstack -- /opt/schoolstack/bin/schoolstack-server get-simulations --data /var/lib/schoolstack/school.json. They are not in the backups (they can always be downloaded again). Until they are there, lessons say "This simulation isn't on this server yet." -
Who is signed in:
/var/lib/schoolstack/logins.json, so updates and restarts don't sign anyone out. It holds only a fingerprint of each sign-in, never anything that could be used to sign in. Deleting it (with the site stopped) signs everyone out. -
Notifications: the server's own push key in
/var/lib/schoolstack/push-key.jsonand the devices that have them on in/var/lib/schoolstack/push.json(see "Notifications" above). -
Backups:
/var/backups/schoolstack, every night and before every update, 14 kept, plus every uploaded file. -
Copies off the server: download the backups to your own computer now and then (once a week is a good habit). The one-time key setup and the download command are in
deploy/README.md, "Download the backups to your computer". -
Automatic copies off the server (optional):
sudo /opt/schoolstack/bin/schoolstack-offsite-setupcopies every night's backup, and the uploaded files, to a folder called SchoolStack-backups in a Google Drive (14 days of backups kept there). It needs a small one-time setup in the Google Cloud console and on your computer: the steps are indeploy/README.md, "Automatic off-server backups (Google Drive)".sudo /opt/schoolstack/bin/schoolstack-offsite-setup --statuschecks it.
Example: A teacher deleted a class by mistake yesterday. The owner finds last night's backup in
/var/backups/schoolstack and follows the restore steps in deploy/README.md.
Related: Server options · Test accounts · Command-line tool and AI agents