---
title: "Deploy Didacta | (Just Updated) Open Source LMS, Online Course Platform With Admin Login Generated"
description: "Didacta open source LMS, online course platform, admin login and REST API"
category: "Other"
url: https://railway.com/deploy/didacta-or-just-updated-open-source-lms-
---

# Deploy Didacta | (Just Updated) Open Source LMS, Online Course Platform With Admin Login Generated

Didacta open source LMS, online course platform, admin login and REST API

**[Deploy Didacta | (Just Updated) Open Source LMS, Online Course Platform With Admin Login Generated on Railway](https://railway.com/template/didacta-or-just-updated-open-source-lms-)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/didacta-or-just-updated-open-source-lms-/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Other

## Template content

### database

- **Image:** pgvector/pgvector:pg16@sha256:484e838076e04939d27d3e176e91c86eea96236126023be8d3059761122e579f

### cache

- **Image:** redis:8.2.1-alpine@sha256:987c376c727652f99625c7d205a1cba3cb2c53b92b0b62aade2bd48ee1593232
- **Start command:** `/bin/sh -c 'chown -R redis:redis /data && exec docker-entrypoint.sh redis-server --requirepass "$REDIS_PASSWORD" --appendonly yes --dir /data'`

### didacta

- **Image:** ghcr.io/bon5co/didacta-railway:0.1.0-beta.26@sha256:ae2738ef735cdfc468ad1f242790a967c8111c5a58830387b28000f01db32d92
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Didacta on Railway

**Built for an LLM agent to deploy and use.** The deploy form has no fields to fill: the administrator login, the auth secret, the setup token and the database and Redis passwords are generated, the server cannot start without them, and public sign-up is closed so nobody can register on a fresh instance. Didacta Community is an open-source learning management system (LMS): build courses and learning paths, enrol learners, issue certificates and extend it with modules, with a REST API and Swagger docs.

## About Hosting Didacta

This template runs three services: **didacta**, the official `ghcr.io/va360labs/didacta-community` image (0.1.0-beta.26) pinned by digest through a thin wrapper, with a volume at `/app/data` that holds uploaded files and the generated keys; **database**, a PostgreSQL 16 instance with the pgvector extension and a volume at `/var/lib/postgresql` that holds courses, users and progress; and **cache**, a Redis 8 instance with a volume at `/data` that holds queues and cache. One public domain serves the web app and the API. The image runs the Next.js web app and the NestJS API in one container; the wrapper moves the web app onto the injected `PORT` (8080) and the API stays on an internal port. The healthcheck is `GET /healthz`. A cold first boot applies 44 database migrations, so allow a few minutes before the first request answers.

**What the wrapper fixes.** The stock image expects you to open a setup page and create the first organisation and administrator by hand. The wrapper creates both from `ADMIN_EMAIL` and `ADMIN_PASSWORD` through Didacta's own setup endpoint (guarded by the generated `DIDACTA_SETUP_TOKEN`) as soon as the API answers, sets the public host the application checks requests against, and repairs one Railway-specific failure: a deploy killed while the first migration is running leaves a half-applied baseline that makes every later start fail, so the wrapper resets the empty database schema and applies the migrations again, and leaves any database that holds finished migrations alone. Not reproduced on a Railway control of an incumbent listing.

**Using it.** Open the domain and sign in as `ADMIN_EMAIL` with `ADMIN_PASSWORD`; you are the super administrator of the organisation `didacta`. Add learners from the admin area, because public registration is disabled. Outgoing email is not configured: add the `SMTP_*` variables to send invitations and notifications. Didacta is released under the Didacta Sustainable Use License: internal use is free, managed hosting and resale need a commercial agreement with the vendor. Everything is stored in PostgreSQL, Redis and the data volume, so redeploys keep it.

### Agent contract

- Public URL: `https://RAILWAY_PUBLIC_DOMAIN` (the generated domain of the `didacta` service)
- Private URL: `http://didacta.railway.internal:8080`
- Credentials: the variables `ADMIN_EMAIL` and `ADMIN_PASSWORD` on the `didacta` service (plain text; `ADMIN_EMAIL` is `admin@` plus the public domain)
- Auth: `POST /api/v1/auth/signin` with JSON `{"email","password"}` returns `tokens.accessToken`; send it as `Authorization: Bearer ACCESS_TOKEN` on every call under `/api/v1/`. Interactive API docs are at `/api/docs`
- Health: `GET /healthz` returns 200 without credentials

```bash
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, ADMIN_EMAIL, ADMIN_PASSWORD (variables of the didacta service); also curl, sed.
R="https://$RAILWAY_PUBLIC_DOMAIN"; J="content-type: application/json"
n=0; until [ "$(curl -s "$R/api/v1/setup/status")" = '{"initialized":true}' ]; do n=$((n+1)); [ "$n" -le 90 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/healthz"
# sign in as the generated administrator: the access token is a Bearer token for the API
TOKEN=$(curl -s -H "$J" -d "{\"email\":\"$ADMIN_EMAIL\",\"password\":\"$ADMIN_PASSWORD\"}" "$R/api/v1/auth/signin" | sed -n 's/.*"accessToken":"\([^"]*\)".*/\1/p')
# a read with the token succeeds, the same read without it is refused
curl -s -o /dev/null -w "read with token: %{http_code}\n" -H "Authorization: Bearer $TOKEN" "$R/api/v1/auth/api-keys"
curl -s -o /dev/null -w "read without token: %{http_code}\n" "$R/api/v1/auth/api-keys"
# write-auth: minting an API key with the token succeeds, the same write without it is refused
curl -s -o /dev/null -w "write with token: %{http_code}\n" -H "$J" -H "Authorization: Bearer $TOKEN" -d '{"name":"agent-check"}' "$R/api/v1/auth/api-keys"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -H "$J" -d '{"name":"anon"}' "$R/api/v1/auth/api-keys"
# public signup: a stranger's registration is refused, accounts are created by the administrator only
curl -s -o /dev/null -w "public signup: %{http_code}\n" -H "$J" -d '{"email":"stranger@example.org","password":"Stranger-Pass-Abcdef1","name":"Stranger"}' "$R/api/v1/auth/signup"
```

Expected output against a fresh deploy (measured on a Railway control deploy; the output is recorded in `template.md`):

```text
health: 200
read with token: 200
read without token: 401
write with token: 201
write without key: 401
public signup: 403
```

The refusals are the contract: a read or write without the token answers 401 (`write without key: 401`), and an anonymous registration answers 403 (`public signup: 403`) because public sign-up is disabled.

## Why Deploy Didacta on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Didacta on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

- **Agent-ready** - no deployer fields, a contract block, and one script that proves the server is healthy, a stranger is refused, and the generated administrator can sign in and write.
- **No setup wizard** - the organisation and administrator exist before the first request, and public sign-up is closed.
- **Data survives redeploys** - courses and users in PostgreSQL with pgvector on a volume, queues in Redis on a volume, uploads and keys on a volume.
- **Restart-safe first boot** - a deploy killed during the first migration recovers instead of failing forever.
- **Pinned** - the upstream image is pinned by digest and the wrapper by tag and digest.

## Common Use Cases

- **Employee training and onboarding** - courses, learning paths and completion tracking on your own server.
- **Online academy for customers or members** - a branded course platform with certificates and memberships.
- **Course delivery from your own tools** - create and manage learning content through the REST API and AI agents.

## Dependencies for Didacta Hosting

- The didacta service, a PostgreSQL service with pgvector and a Redis service, each with its volume, created by the template.

### Deployment Dependencies

- [Didacta repository](https://github.com/va360labs/didacta-io)
- [Wrapper image source](https://github.com/bon5co/didacta-railway)


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/didacta-or-just-updated-open-source-lms-
