OPE Server is a collection of Docker containers that work together to provide a complete educational environment. It is specifically designed to operate in restricted network environments such as correctional facilities, where internet access may be limited or unavailable.
┌─────────────────────────────────────────────────────────────────────┐
│ OPE Gateway (nginx) │
│ Reverse proxy & SSL termination │
└─────────────────────────────────────────────────────────────────────┘
│
┌───────────────────────────┼───────────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌─────────────────┐ ┌───────────────┐
│ Canvas LMS │ │ SMC │ │ Other Apps │
│ (ope-canvas) │ │ (ope-smc) │ │ │
└───────────────┘ └─────────────────┘ └───────────────┘
│ │ │
└───────────────────────────┼───────────────────────────┘
│
┌───────────────────────────┼───────────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌─────────────────┐ ┌───────────────┐
│ PostgreSQL │ │ Redis │ │ DNS │
│(ope-postgresql)│ │ (ope-redis) │ │ (ope-dns) │
└───────────────┘ └─────────────────┘ └───────────────┘
| Service | Description |
|---|---|
| ope-canvas | Canvas LMS - Learning Management System by Instructure |
| ope-canvas-rce | Rich Content Editor service for Canvas |
| ope-canvas-mathman | Math equation rendering service for Canvas |
| ope-smc | Student Management Console - User management and content sync |
| ope-gateway | Nginx reverse proxy with SSL termination |
| ope-postgresql | PostgreSQL database server |
| ope-redis | Redis cache server |
| ope-dns | DNS server for local domain resolution |
| ope-ntp | NTP time synchronization server |
| ope-fog | FOG Project imaging server for system deployment |
| ope-kalite | Khan Academy Lite offline content |
| ope-gcf | GCFLearnFree.org offline content |
| ope-codecombat | CodeCombat coding education platform |
| ope-freecodecamp | freeCodeCamp offline content |
| ope-jsbin | JS Bin code playground |
| ope-rachel | RACHEL offline educational content |
| ope-git | Git Server (GitLab) |
| ope-penpot | Penpot open-source design platform |
| ope-websites | OSN approved websites |
| ope-dl | Download site (Apache autoindex for apps and Docker images) |
| ope-letsencrypt | Let's Encrypt SSL certificate automation |
- Linux server (Ubuntu 20.04+ recommended)
- Docker Engine 20.10+
- Docker Compose v2+
- Python 3.6+ (not required on air-gapped targets -- see Offline Deployment)
- Minimum 8GB RAM
- 500GB+ storage (varies based on content)
- Clone the repository:
git clone https://github.com/open-prison-education/ope-server
cd ope-server- Run the interactive setup wizard:
./setup.shThe wizard walks you through network settings, passwords, and service
selection. It writes config.yml (and .secrets.yml for auto-generated
secrets). Alternatively, copy the example config and edit it by hand:
cp config.yml.example config.yml
# Edit config.yml with your settingsCore services (ope-gateway, ope-dns) and any dependencies (e.g.
ope-redis, ope-postgresql for Canvas) are resolved automatically --
you only need to list the services you actually want.
- Start enabled services:
./up.shIf config.yml does not exist yet, up.sh will launch the setup wizard
automatically before starting containers.
- Stop enabled services and remove containers:
./down.shope-server/
├── config.yml.example # Example configuration (copy to config.yml)
├── config.yml # Your active configuration (git-ignored)
├── .secrets.yml # Auto-generated secrets (git-ignored)
├── .env.template # Environment variable template
├── setup.sh # Interactive setup wizard
├── up.sh # Rebuild compose & start services
├── down.sh # Stop enabled services and remove containers
├── scripts/
│ ├── setup.py # Setup wizard logic
│ ├── rebuild_compose.py # Generates docker-compose.yml & .env
│ ├── rebuild.sh # Script to generates docker-compose.yml & .env only, a wrapper for rebuild_compose.py
│ ├── service_deps.py # Service dependency map
│ ├── ensure_venv.sh # Python bootstrap (bundled runtime or system venv)
│ ├── requirements.txt # Python dependencies
│ ├── bundle_runtime.sh # Build offline ope-server tarball with bundled Python
│ ├── retag_images.sh # Retag Docker images from operepo/* to ghcr.io/open-prison-education/*
│ ├── push_images.py # Push images to registry
│ ├── export_databases.sh # Backup PostgreSQL and MySQL databases
│ ├── flush_redis_keys.sh # Clear Redis cache
│ └── recompile_canvas_assets.sh # Recompile Canvas assets
├── docs/ # Documentation
└── ope-*/ # Individual service directories
| Command | Description |
|---|---|
./setup.sh |
Run the interactive setup wizard (creates config.yml) |
./up.sh |
Rebuild compose files and start all configured services (pulls pre-built images from the registry) |
./up.sh b |
Build images locally from source instead of pulling from the registry, then start services |
./down.sh |
Stop all containers |
./scripts/rebuild.sh |
Regenerate docker-compose.yml and .env without starting containers |
./scripts/export_databases.sh |
Backup PostgreSQL and MySQL databases |
./scripts/flush_redis_keys.sh |
Clear Redis cache |
./scripts/bundle_runtime.sh |
Build an offline ope-server tarball with bundled Python for air-gapped deployment |
./scripts/retag_images.sh |
Retag local Docker images from the old operepo/* namespace to ghcr.io/open-prison-education/* |
The system is configured through:
config.yml- Main configuration file listing enabled services and settings. Generated by./setup.shor copied fromconfig.yml.example..secrets.yml- Auto-generated secrets (Canvas encryption keys, etc.). Not committed to version control..env/.env.template- Environment variables consumed by Docker Compose. The.envfile is regenerated automatically byrebuild_compose.pyfrom the template andconfig.ymlvalues -- do not edit it by hand.docker-compose-include.yml- Per-service Docker Compose fragments assembled into the finaldocker-compose.ymlat build time.
To reconfigure the server, either edit config.yml directly or re-run ./setup.sh.
By default, persistent service data is stored in ./volumes/ relative to the project root. To use a different location (e.g. a dedicated data partition), set volumes_root in config.yml:
settings:
volumes_root: "/mnt/data/ope-volumes"Both absolute paths and paths relative to the project root are supported. If unset, it defaults to ./volumes.
To add a new service (e.g. ope-myapp):
- Create the service directory with a
docker-compose-include.yml(and optionally avolumes-include.yml):
ope-myapp/
├── Dockerfile
├── docker-compose-include.yml
└── README.md
-
Register the service in
scripts/service_deps.py:- Add an entry to
SERVICE_DEPSmapping the service name to its dependency list (e.g."ope-myapp": ["ope-gateway", "ope-dns"]). Use an empty list[]if it has no dependencies beyond the core services. - Add it to the appropriate group in
SERVICE_CATALOGso it appears in the./setup.shinteractive wizard. If you skip this step, users can still enable it by hand-editingconfig.yml, but the wizard won't present it as an option.
- Add an entry to
-
Add it as a commented-out entry in
config.yml.exampleso users can discover it. -
Enable the service in
config.ymland run./up.sh bto build all enabled services and start them. Or rundocker compose build ope-myappto build only your service, then./up.shto start everything.
For a complete deployment walkthrough -- system requirements, Docker installation, configuration, SSL, DNS, backups, and public deployment hardening (e.g. preventing search engine crawling) -- see the Deployment Guide.
Deploying on an air-gapped machine with no internet? If you already have the
pre-built files (ope-server-offline.tar.gz and ope-images.tar.gz), see the
Offline Deployment Guide. To build those
files, see the Offline Distribution Guide.
Once services are running, the Accessing Services Guide covers how to reach Canvas, SMC, and other applications -- including DNS setup for air-gapped environments and remote access via public IP.
To work on an individual service:
- Navigate to the service directory (e.g.,
cd ope-smc) - Make changes to Dockerfile or configuration
- Rebuild the compose files:
./scripts/rebuild.sh - Build the service image:
docker compose build ope-smc - Start services:
./up.sh
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is open source. See individual service directories for specific licensing information.
- GitHub Issues: https://github.com/open-prison-education/ope-server/issues