Self-hosting for developers
Academy is open source (AGPLv3) and runs on your own servers. The full guides are in the handbook Run a server: install, deploy and update, configuration, backups. This page is the map for developers: what the two tools do, and how a self-hosted installation differs from your local one.
Local, for development
Section titled “Local, for development”pnpm dev with docker compose (quickstart): the API and the web app from the checkout, AUTH_MODE=dev, emails in the log. Nothing of this belongs on a server: production refuses AUTH_MODE=dev.
install.sh: setting up servers
Section titled “install.sh: setting up servers”install.sh at the repository’s root installs a server once from its checkout (install, ADR 0444). It checks the machine first, makes every secret itself, and never overwrites an installation that exists.
| Role | What the machine gets |
|---|---|
portal (default) |
the API, the web app and their services (nginx, certificates, modules), built in the checkout, the runtime in APP_DIR |
lab |
a lab node that runs learners’ code in gVisor containers |
- The database server is a provision (PostgreSQL 17 with pgvector, Redis over TLS, an admin user): nothing of ours is installed there.
deploy/db/setup.sh(alsoinstall.sh --db-setup) makes the portal’s database, roles and extensions over the network; the admin password is asked for hidden and kept nowhere. - The admin console and the website have their own repositories and installers. The console is installed first and alone: it makes the database, its roles and the schemas
adminandplatform; the portal is installed on top of it and only consumes what the console configures (install). - Systems: AlmaLinux, Rocky or RHEL 9 and 10, Debian 12 and 13, Ubuntu 24.04.
- Unattended:
sudo ./install.sh --answers install.env(install.env.exampledescribes every answer);--checkruns only the checks. - Docker:
INSTALL_MODE=dockerruns the same services as containers behind Caddy, with their own database, all on one machine.
deploy/update.sh: updates and rollbacks
Section titled “deploy/update.sh: updates and rollbacks”An administrator runs it as root in the checkout, by hand (deploy and update):
git pullsudo deploy/update.sh # build, deliver, back up, migrate, switch, checksudo deploy/update.sh <commit> # a given commit of mainsudo deploy/update.sh rollback # back to the release before- Every migration is marked
-- deploy: expandor-- deploy: contract. Expanding ones go out at any time; contracting ones only in a maintenance window (CONTRIBUTING). - Before pending migrations it dumps the schema
publicintoBACKUP_DIR; a failure after that restores the dump and switches back to the release before. APP_DIRkeeps the release in use and the two before it.
Which version runs
Section titled “Which version runs”There are no version numbers yet: a release is its commit, built on the server. GET /readyz answers the running release (ciRun is null; from this machine and the admin console’s addresses only, /healthz is open):
{ "status": "ready", "cell": "eu-1", "region": "eu", "release": { "commit": "dd95931a…", "builtAt": "2026-11-20T06:12:00Z", "ciRun": null } }The docs site always shows the documentation of main; an installation on an older release may lack what is newer here. The automation API’s promise holds across releases.
What a self-hosted installation decides
Section titled “What a self-hosted installation decides”- Its addresses: the API, the portal, the docs site and the content host have their own names. Every example in these handbooks uses
api.academy.example.com; use yours. - Operation mode: an installation serves many organisations (
saas) or one (single), set in the admin console (ADR 0269). Withsingle, organisations don’t sign themselves up and there are no contracts between them and the operator. - What is switched on: company sign-in, knowledge sources, labs, live sessions and AI each need their services and settings (deploy).
- Slack: the operator creates the platform’s Slack app from
deploy/slack/app-manifest.jsonwith their own API address and product name.