You can run Classroom Stack on your own server, for yourself or a whole school. It’s the same app as classroomstack.com, with accounts and sync.
- Unlocked: everything is included, with no plans and no payments.
- Private: your teachers’ work stays on your server.
- No account required: anyone can still use the app in their own browser without signing in. Their work then stays in that browser.
What you need
- A server: any computer or small server running Linux, with about 1 GB of memory and Docker with Compose.
- A domain name: an address such as
classroom.myschool.ca, pointing at that server. Ports 80 and 443 must be open to it.
HTTPS is required. Browsers only allow the camera, microphone and folder access on secure pages. The included Caddy setup gets and renews the certificate for you.
No domain name? For one classroom, a home server or trying it out, docker compose -f docker-compose.local.yml up -d runs it at http://localhost:4173 on that computer, without HTTPS. See Run it yourself.
Start it
git clone https://github.com/Jeremy-Sheeshka/classroomstack.git
cd classroomstack
echo "DOMAIN=classroom.myschool.ca" > .env
docker compose up -d
The first start downloads the Classroom Stack image for your kind of computer (amd64, or arm64 such as a Raspberry Pi). If it can’t, it builds the image from the code instead, which takes a few minutes.
Open https://classroom.myschool.ca. On your first visit, you choose the owner’s email and password.
To skip that step, put [email protected] and ADMIN_PASSWORD=... in .env before starting.
One teacher, or a whole school
AUTH_MODE=single(the default): one owner account. Use this for your own classroom server.AUTH_MODE=multi: teachers make their own accounts, and each teacher’s work is kept apart.- To limit sign-up to your school’s email addresses, set
SIGNUP_DOMAINS=sd52.bc.ca(separate several with commas). - If you don’t set it, anyone who can reach the server can make an account.
- To limit sign-up to your school’s email addresses, set
Student information
Class lists, attendance and behaviour notes stay on each teacher’s own computer by default. They don’t go to the server.
A teacher can choose to keep one class’s student information in their account, under My class → Keep student information on this computer only. When a teacher turns that back on, the server deletes that class’s student information straight away.
Check your district’s privacy rules before turning it off.
Settings
Set these in .env, or in docker-compose.yml:
| Setting | Default | What it does |
|---|---|---|
DOMAIN |
(required) | The address teachers use. Caddy gets its HTTPS certificate. |
AUTH_MODE |
single |
single: one owner. multi: teachers make their own accounts. |
SIGNUP_DOMAINS |
(anyone) | Multi mode: the email domains that can make an account. |
ADMIN_EMAIL, ADMIN_PASSWORD |
(none) | Single mode: make the owner account at start (password at least 12 characters). |
ADMIN_EMAILS |
(none) | Multi mode: who can use the admin page, such as [email protected],[email protected]. In single mode, the owner can. |
QUOTA_MB |
0 (no limit) |
Storage for each teacher, documents and files together. |
MAX_UPLOAD_MB |
100 |
The largest file a teacher can upload. |
SMTP_URL |
(none) | Your email server, as smtps://user:[email protected]:465. Needed for password-reset emails and team invitations. |
MAIL_FROM |
Classroom Stack <no-reply@localhost> |
Who the emails are from, such as Classroom Stack <[email protected]>. |
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET |
(none) | Sign in with Google: see below. |
LOG_LEVEL |
info |
debug, info, warn, error or silent. |
JOIN_URL |
(this address) | Where students’ devices reach the server, when it isn’t where the teacher reaches it: on a classroom network, the laptop’s address, such as http://192.168.1.20:4173. Join links and QR codes use it. |
CLASSROOMSTACK_VERSION |
latest |
Which version to run: 1.0 stays on 1.0 and gets its fixes (1.0.1, 1.0.2); 1.0.1 is exactly that one. |
The image also sets these for you:
HOST=0.0.0.0,PORT=8787,DATA_DIR=/data,WEB_DIR=/app/apps/web/distandTRUST_PROXY=1(Caddy is in front);BASE_URL=https://$DOMAIN.
Sign in with Google
Teachers can sign in with their Google account (Google Workspace for Education, too) once you set it up:
- In Google Cloud, make an OAuth client of type “Web application”.
- Add the redirect URI
https://classroom.myschool.ca/api/v1/auth/google/callback(your address). - Put its id and secret in
.envasGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET, thendocker compose up -d.
A teacher signs in to the account with the same email, or gets a new one where sign-up is open. With one
domain in SIGNUP_DOMAINS, Google offers the school account first. Google tells the server only the
teacher’s email address and name.
The admin page
Whoever runs the server finds Settings → This server: the owner in single mode, or the people in
ADMIN_EMAILS in multi mode. Nobody else sees it. It lists the teachers, with their storage and last
sign-in, and for each one:
- Reset password: a temporary password, shown once. They choose their own at the next sign-in.
- Sign out everywhere.
- Download their work: a backup file of the whole account, for whoever takes over the class. It opens in any browser, or on another server.
- Turn off: for a teacher who has left. They can’t sign in, and their work stays until you download or delete it.
- Delete: the account and all its work, once you type its email.
Add a teacher makes an account with a temporary password. Use it for a teacher whose email isn’t in
SIGNUP_DOMAINS, or in single mode, where nobody can make their own account. Every one of these actions
is written to the log, with who did it.
Passwords
With SMTP_URL set, teachers reset their own passwords by email. Without an email server, or if an email doesn’t arrive, reset a password on the admin page, or from the server:
docker compose exec classroomstack node server/src/admin.ts reset-password [email protected]
This prints a new password, shown only once, and signs that account out everywhere. To list the accounts, use node server/src/admin.ts users.
Backups
Everything lives in the classroomstack-data volume: the database (/data/classroomstack.sqlite) and the uploaded files (/data/files).
To make a consistent copy while the server keeps running:
docker compose exec classroomstack node server/src/admin.ts backup /data/backups
docker compose cp classroomstack:/data/backups ./backups
Keep copies somewhere other than the server.
To restore from a backup:
- Stop the server:
docker compose stop classroomstack. - In
/data, deleteclassroomstack.sqlite-walandclassroomstack.sqlite-shmif they’re there. They hold the old database’s last changes and must not be applied to the restored one. - Put the backup’s
classroomstack.sqliteandfilesfolder in place of the ones in/data. - Start it again:
docker compose start classroomstack.
scripts/check-selfhost.mjs practises exactly this restore.
Updates
git pull
docker compose pull
docker compose up -d
docker compose pull downloads the newest image (or the newest fix of CLASSROOMSTACK_VERSION). To build
it from the code yourself instead, use docker compose up -d --build. The database updates itself when
the server starts. Make a backup first (above).
Classroom network
Live polls and exit tickets need a server that students’ devices can reach. Without a school server, the teacher’s laptop can be that server for the room:
npm run classroom -- --network
It runs the full server on the laptop and prints the address students use (http://<the laptop's address>:4173/join/) and a QR code. Join links and QR codes on polls and exit tickets show that address
(JOIN_URL), while the teacher keeps using http://localhost:4173, which the camera, linked folders and
the offline copy need. That is the same address as npm run classroom without --network, so a browser
keeps the same stacks in both: the first time, the laptop’s own server asks for an owner account and
takes in the work already in the browser.
npm run classroom -- --install-launcher adds “Classroom Stack” and “Classroom Stack (classroom
network)” to the app launcher (Linux), and npm run classroom -- --stop stops it.
If students’ devices can’t reach the laptop, the school network probably keeps devices apart (many do, on purpose). Ask the district’s IT staff, or use a small travel router of your own in the room: the laptop and the students’ devices join its Wi-Fi, which needs no internet at all. Polls, exit tickets and everything else then work on that network alone.
On a Raspberry Pi
A Raspberry Pi 4 or 5 makes a quiet, low-cost server for a classroom or a small school. The image runs on any 64-bit ARM computer.
- 64-bit Raspberry Pi OS. The 32-bit system can’t run it.
- Memory: 2 GB for a classroom; 4 GB or more for a whole school.
- Storage: an SSD over USB if you can. A microSD card wears out under a database, and a full card stops the server. Either way, keep backups somewhere else (above).
- Docker: install it with Docker’s instructions for Debian (docs.docker.com/engine/install/debian), then follow Start it. The domain name and the open ports 80 and 443 are needed as for any server.
Logs
docker compose logs -f classroomstack
Each event is one line of JSON. Logs never include passwords, sign-in tokens or student information.
Without Docker
You need Node 24 or later (Node 26 recommended), and a reverse proxy that provides HTTPS:
npm ci --ignore-scripts
npm run build -w apps/web
HOST=127.0.0.1 PORT=8787 DATA_DIR=/var/lib/classroomstack BASE_URL=https://classroom.myschool.ca TRUST_PROXY=1 \
node server/src/index.ts
The server runs straight from its TypeScript source; there’s no build step.