---
title: "Deploy Frappe LMS | (Just Updated) Open-Source LMS, Online Courses, API Key Preset"
description: "Frappe LMS open-source learning platform: courses, quizzes, REST API"
category: "Other"
url: https://railway.com/deploy/frappe-lms-or-just-updated-open-source-l
---

# Deploy Frappe LMS | (Just Updated) Open-Source LMS, Online Courses, API Key Preset

Frappe LMS open-source learning platform: courses, quizzes, REST API

**[Deploy Frappe LMS | (Just Updated) Open-Source LMS, Online Courses, API Key Preset on Railway](https://railway.com/template/frappe-lms-or-just-updated-open-source-l)**

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

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

## Template content

### mariadb

- **Image:** ghcr.io/bon5co/erpnext-railway-mariadb:latest

### frappe-lms

- **Image:** ghcr.io/bon5co/frappe-lms-railway:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host Frappe LMS on Railway

Frappe LMS (the Learning app, built on the Frappe framework) is an open-source learning management system: courses with chapters and lessons, video and text content, quizzes with scoring, assignments, programming exercises, batches and cohorts, certificates, discussions, and a student and instructor dashboard. Every document type is exposed over a REST API. It is the open-source alternative to Teachable and Thinkific.

This template deploys Frappe LMS (frappe 16, lms 16.4.0, payments 16.0.1) as **two** services, the application and MariaDB. The deploy form has nothing you have to fill in, and the `Administrator` account already has an API key and secret.

## About Hosting Frappe LMS

Frappe LMS is not one process. A working install needs the web server, a background worker for queued jobs (emails, certificates, scheduled reports), a scheduler, a socket.io service for realtime updates, redis for the cache and the job queues, and nginx in front to serve the built frontend and route the websocket. `frappe_docker` splits those across six containers around a shared `sites/` volume.

A Railway volume attaches to exactly one service, and frappe's web, worker and scheduler all read and write the same `sites/` directory. So on Railway, Frappe LMS is a single container by necessity: this template runs the full process set under `honcho`, exactly as `bench start` does, and if any one process exits the container is restarted rather than left half-running. Redis runs inside that container, which is why you pay for two services and not four.

What this template does differently from a stock Frappe LMS deploy:

- **The app is actually in the image.** The upstream `ghcr.io/frappe/lms` image is broken: every tag from `v2.52.1` to `v2.69.1` and from `v16.0.0` to `v16.4.0` contains only the `frappe` framework, with no `lms` and no `payments` app, although the upstream build workflow is green (checked tag by tag on 2026-11-24). This template's image installs `payments` v16.0.1 and `lms` v16.4.0 from their release tags and builds the frontend, so `/lms` serves the learning UI.
- **The API key pair is preset.** `Administrator` gets `FRAPPE_API_KEY` and `FRAPPE_API_SECRET` from the service variables on every boot, so a script or an AI agent can call the REST API with a token header and never opens the login page.
- **Public sign-up is closed.** Nobody can register an account from the internet; you create users from the admin desk.
- **Custom domains work.** nginx passes the fixed site name `learn` as `X-Frappe-Site-Name`, so frappe resolves the same site whatever `Host` arrives.

Sizing: measured about 400 MB for the application container at idle and 180 MB for MariaDB, so the Hobby plan is enough to start.

**First boot creates the site before anything listens on a port**: `bench new-site --install-app payments --install-app lms` took about a minute on a 5-core machine and under two minutes on Railway. The template sets no healthcheck, because Railway's 300 second default would race a slow first boot. Every later boot finds the existing site and starts in seconds.

### Agent contract

- Public URL: `https://$RAILWAY_PUBLIC_DOMAIN` (the `frappe-lms` service's generated domain); the learning UI is at `/lms`
- Private URL: `http://frappe-lms.railway.internal:8080`
- Credentials: API key in the variable `FRAPPE_API_KEY`, API secret in `FRAPPE_API_SECRET`; browser login is `Administrator` with the secret in `ADMIN_PASSWORD`
- Auth: send the header `Authorization: token FRAPPE_API_KEY:FRAPPE_API_SECRET` on every API call; a request without it answers 403, a wrong key answers 401
- Health: `GET /api/method/ping` returns 200 `{"message":"pong"}` without authentication

```bash
# needs: RAILWAY_PUBLIC_DOMAIN of the frappe-lms service, plus FRAPPE_API_KEY and FRAPPE_API_SECRET from its variables
BASE="https://$RAILWAY_PUBLIC_DOMAIN"
AUTH="Authorization: token $FRAPPE_API_KEY:$FRAPPE_API_SECRET"
curl -s -w "\nhealth: %{http_code}\n" "$BASE/api/method/ping"
curl -s -H "$AUTH" "$BASE/api/method/frappe.auth.get_logged_user"; echo
# the lms app is installed: its LMS Category doctype ships with default categories
curl -s -H "$AUTH" "$BASE/api/resource/LMS%20Category?limit_page_length=3"; echo
curl -s -o /dev/null -w "learning UI: %{http_code}\n" "$BASE/lms"
NAME="Agent Category $(date +%s)"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -X POST "$BASE/api/resource/LMS%20Category" -H 'Content-Type: application/json' -d "{\"category\":\"$NAME\"}"
curl -s -o /dev/null -w "write with wrong key: %{http_code}\n" -X POST "$BASE/api/resource/LMS%20Category" -H "Authorization: token bad:bad" -H 'Content-Type: application/json' -d "{\"category\":\"$NAME\"}"
curl -s -o /dev/null -w "write with key: %{http_code}\n" -X POST "$BASE/api/resource/LMS%20Category" -H "$AUTH" -H 'Content-Type: application/json' -d "{\"category\":\"$NAME\"}"
curl -s -H "$AUTH" "$BASE/api/resource/LMS%20Category/$(printf %s "$NAME" | sed 's/ /%20/g')" | jq -r .data.category
curl -s -o /dev/null -w "public signup: %{http_code}\n" -X POST "$BASE/api/resource/User" -H 'Content-Type: application/json' -d '{"email":"visitor@example.com","first_name":"Visitor"}'
curl -s -X POST "$BASE/api/method/frappe.core.doctype.user.user.sign_up" -H 'Content-Type: application/json' -d '{"email":"visitor2@example.com","full_name":"Visitor Two","redirect_to":"/"}' | grep -o "Sign Up is disabled" | head -1
```

A fresh deploy prints `{"message":"pong"}` and `health: 200`, then `{"message":"Administrator"}`, three default categories (`Web Development`, `Business`, `Design`), `learning UI: 200`, `write without key: 403`, `write with wrong key: 401`, `write with key: 200`, the new category's name read back, `public signup: 403`, and `Sign Up is disabled` from the sign-up method.

## Why Deploy Frappe LMS 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 Frappe LMS 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.

- **A working app, not an empty bench** - the upstream image ships without the lms app; this one has it installed and its frontend built.
- **Nothing to configure** - the database host, the root credential, the `Administrator` login and the API key pair are all generated and wired at deploy time. The form is empty.
- **Cheap to leave running** - two always-on containers, billed by usage rather than per student.
- **Your data, your domain** - attach a custom domain in the Railway UI and it works; courses, enrolments and uploads live on your volume.

## Common Use Cases

- **Replacing a course-platform subscription** - host your own courses, quizzes and certificates without per-student fees or a revenue share.
- **Internal training and onboarding** - employee training programmes with progress tracking, assignments and certificates, behind your own domain.
- **A course back office your own software drives** - the REST API covers every doctype, so an enrolment flow or an internal bot can create courses, categories and batches with a token header.

## Dependencies for Frappe LMS Hosting

- **MariaDB 11.8** (included in this template) on a volume at `/var/lib/mysql`, configured for utf8mb4.
- **Redis** (included, inside the application container) for the cache, the job queues and realtime.
- **A volume for `sites/`** (included) at `/home/frappe/frappe-bench/sites` - the site database config, every uploaded file and every generated certificate live there.
- **An SMTP provider** - optional and not part of the template. Frappe LMS sends enrolment and certificate emails; add an Email Account under Settings after deploying.

### Deployment Dependencies

- [Frappe LMS](https://github.com/frappe/lms) - the upstream learning app (AGPL-3.0)
- [Frappe Payments](https://github.com/frappe/payments) - the payment gateway app lms requires
- [Frappe Framework](https://github.com/frappe/frappe) - the application framework underneath both
- [frappe/lms Docker image](https://github.com/frappe/lms/pkgs/container/lms) - the upstream image this template builds on, pinned by digest at `v16.4.0`
- [bon5co/frappe-lms-railway](https://github.com/bon5co/frappe-lms-railway) - the open-source Railway wrapper image (Dockerfile, entrypoint, Procfile) this template deploys

### Implementation Details

Wait for the `frappe-lms` service to go green. The first deploy is creating the site. Then open your Railway domain and log in:

- **Username:** `Administrator`
- **Password:** the value of `ADMIN_PASSWORD` on the `frappe-lms` service (Variables tab)

The learning interface lives at `/lms`; the desk (admin) is at `/app`. Change the `Administrator` login from Settings once you are in. The API key pair stays in force until you change `FRAPPE_API_KEY` or `FRAPPE_API_SECRET`; redeploying applies the new values.

Useful variables on the `frappe-lms` service, all with working defaults:

| Variable | Default | What it does |
|---|---|---|
| `SITE_NAME` | `learn` | site directory name; changing it after first boot creates a second, empty site |
| `GUNICORN_WORKERS` | `2` | web concurrency |
| `GUNICORN_THREADS` | `4` | threads per web worker |
| `FRAPPE_WORKER_QUEUES` | `short,default,long` | queues the background worker consumes |
| `CLIENT_MAX_BODY_SIZE` | `50m` | upload size limit |

Do **not** set a start command on either service. Both images do their Railway-specific work in their `ENTRYPOINT` (the volume chown, the site creation, the MariaDB configuration), and a Railway start command replaces `ENTRYPOINT` rather than adding to it.


## 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)
- [Wiki-Go](https://railway.com/deploy/wiki-go) — Flat-file Markdown wiki in Go: no database, generated admin login

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