Self-hosting guide

Self-host LMS Bridge

Run the whole platform on your own infrastructure — free and open source under AGPL-3.0. Your student data, your AI key, your servers. The fastest path takes a single machine with Docker and about 15 minutes.

1What you'll be running

LMS Bridge is fully containerized. The production stack is four small services that come up ready to use — migrations and an idempotent seed run automatically on first boot.

BackendFastAPI API + LTI 1.3 provider + remediation engine
FrontendReact app (student & instructor console)
MarketingOptional public site & demo (this page's sibling)
PostgreSQLYour data, in a persistent named volume
Two ways to run it. Prebuilt images (recommended) pull published containers from GitHub Container Registry — no source tree needed, just one compose file. Build from source clones the repo and builds locally. Both are covered below.

2Prerequisites

3Quick start (Docker)

Option A — Prebuilt images (fastest)

Download just the compose file and an example env, fill it in, and start:

# 1. Get the production compose file and an example env
curl -fsSLO https://raw.githubusercontent.com/hjmacemail/lmsbridge/main/docker-compose.prod.yml
curl -fsSL  https://raw.githubusercontent.com/hjmacemail/lmsbridge/main/.env.example -o .env

# 2. Edit .env — set SECRET_KEY, your AI provider + key, and public URLs (see below)
nano .env

# 3. Start the stack
docker compose -f docker-compose.prod.yml up -d

That's it. The frontend comes up on :8080, the backend API on :8000, the marketing site on :8090, and Postgres on a named volume. Pin a release with IMAGE_TAG=v1.0.0 in .env (defaults to :latest).

Option B — Build from source

git clone https://github.com/hjmacemail/lmsbridge.git
cd lmsbridge
cp .env.example .env        # then edit .env
docker compose up --build -d

Verify it's healthy

curl http://localhost:8000/api/v1/health     # backend
# then open http://localhost:8080 in a browser

The seed creates demo accounts so you can log in immediately; disable it for production by dropping the seed --if-empty step from the backend command (see the deployment guide).

4Configure your environment

Everything is driven by .env. The variables you'll almost always set:

VariableWhat to set
SECRET_KEYA long random string. Generate with openssl rand -hex 32. Required.
APP_ENVproduction
DEPLOYMENT_MODEcommunity (single self-hosted institution, no license gate — the default) or hosted (multi-tenant SaaS).
TOOL_BASE_URL
FRONTEND_BASE_URL
Your real public https:// domain (e.g. https://lms-bridge.your-university.edu). Used to build the LMS launch/redirect URLs.
CORS_ORIGINSYour frontend origin(s), comma-separated (e.g. your public HTTPS domain).
LLM_PROVIDER
LLM_MODEL
mock | anthropic | openai | azure_openai, plus the model name.
ANTHROPIC_API_KEY (or OpenAI/Azure keys)The key for whichever provider you chose. Only the selected provider's keys are needed.
POSTGRES_PASSWORDA strong DB password (the prebuilt compose runs Postgres for you).
The frontend reads API_BASE_URL at runtime — you can point it at a new backend without rebuilding the image.

5Put HTTPS in front

An LMS requires public HTTPS, so terminate TLS with a reverse proxy in front of the frontend (:8080) and backend (:8000). Caddy is the shortest path — it gets a certificate automatically:

# Caddyfile
lms-bridge.your-university.edu {
    handle /api/* {
        reverse_proxy localhost:8000
    }
    handle {
        reverse_proxy localhost:8080
    }
}

nginx, Traefik, or your cloud load balancer work equally well. After TLS is live, set TOOL_BASE_URL, FRONTEND_BASE_URL, and CORS_ORIGINS to that https:// domain and restart the backend.

6Register it in your LMS

Self-hosting runs the tool; LMS Bridge then launches inside your LMS as an LTI 1.3 tool. Once it's on a public HTTPS domain, fetch your ready-made registration URLs:

curl https://lms-bridge.your-university.edu/api/v1/lti/config

Then add the tool in Canvas, Moodle, Brightspace, or Blackboard using those URLs (many platforms support one-click Dynamic Registration). Full per-LMS steps are in the Install guide and the downloadable per-LMS PDFs.

7Choose your AI model

LMS Bridge is provider-agnostic and bring-your-own-key, so the AI runs on infrastructure you approve:

You only pay your provider for the tokens you use — there's no per-student LMS Bridge fee. Set a spend cap in your provider's console to stay in control.

8Updates & backups

Update to a new version

# Prebuilt images
docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -d

# From source
git pull && docker compose up --build -d

Database migrations run automatically on backend startup, so updates are safe to apply in place. Your data persists in the postgres-data volume across restarts and upgrades.

Back up your data

docker compose exec db pg_dump -U lmsbridge lmsbridge > backup-$(date +%F).sql

9Other deploy options

Prefer managed hosting or Kubernetes? The same stack deploys anywhere containers run. The repo includes ready-made blueprints:

Step-by-step instructions for each live in the full Deployment Guide in the repository.