
Deploy Didacta
Didacta Is a Fair-Code Self-Hosted Learning Platform
redis
Just deployed
/data
postgres
Just deployed
/var/lib/postgresql/data
Just deployed
/app/data
Deploy and Host Didacta Community on Railway
Didacta Community is a modern, open-source learning management and educational platform designed for creating, managing, and delivering online courses, training modules, and knowledge systems. This Railway template provisions a full three-tier production stack featuring the Didacta Application Server (didacta), a pgvector-enabled PostgreSQL database (postgres), and a Redis cache engine (redis), complete with persistent volume storage and automated secret provisioning.
About Hosting Didacta
Hosting Didacta Community on Railway deploys a robust multi-container architecture:
- Didacta Core Application (
didacta): Node.js web and API application container runningghcr.io/va360labs/didacta-community:0.0.1-alpha.107. It serves both the user-facing web dashboard and API endpoints (listening on web port3000and API port4000), processes file uploads in/app/data/storage, and connects to PostgreSQL and Redis over Railway's internal private network. - Vector PostgreSQL Database (
postgres): Relational and vector database runningpgvector/pgvector:pg16. It handles structured application data and vector embeddings, mounting a persistent storage volume at/var/lib/postgresql/data. - Redis In-Memory Cache (
redis): Cache and pub/sub message broker runningredis:7-alpine. It handles session caching and background job processing, mounting a persistent volume at/data.
Common Use Cases
- Self-hosted Learning Management System (LMS): Create, manage, and distribute structured online learning courses and training paths.
- Vector-assisted educational search: Leverage
pgvectorfor semantic search, intelligent AI indexing, and content retrieval across course materials. - Internal employee onboarding & knowledge base: Build private training hubs for staff and community members with full data sovereignty.
- Integrated educational technology stack: Pre-configured database, Redis queues, and persistent local storage out of the box.
Dependencies for Didacta Hosting
- Didacta Community image:
ghcr.io/va360labs/didacta-community:0.0.1-alpha.107 - PostgreSQL image with pgvector:
pgvector/pgvector:pg16 - Redis image:
redis:7-alpine - Three persistent volumes:
didacta:/app/data(for local file storage and media uploads)postgres:/var/lib/postgresql/data(for database tables and vector indices)redis:/data(for cache state and task queues)
- Railway public domain mapped to port
3000fordidacta - Auto-generated secrets: Cryptographic session secret (
AUTH_SECRET), setup token (DIDACTA_SETUP_TOKEN), and database passwords (POSTGRES_PASSWORD)
Upstream: GitHub (va360labs/didacta-community) · Docker Registry (GHCR)
Implementation Details
| Service | Image | Role | Web / Internal Port | Volume Mount |
|---|---|---|---|---|
| didacta | ghcr.io/va360labs/didacta-community:0.0.1-alpha.107 | Web UI & API Engine | 3000 (Web) / 4000 (API) | /app/data |
| postgres | pgvector/pgvector:pg16 | Relational & Vector Database | 5432 | /var/lib/postgresql/data |
| redis | redis:7-alpine | Cache & Job Broker | 6379 | /data |
Topology
| Service | Role | Volume | Public | Notes |
|---|---|---|---|---|
| didacta | Main Application UI & API | /app/data | Yes (Port 3000) | Healthcheck at /healthz |
| postgres | Relational Vector DB | /var/lib/postgresql/data | TCP Proxy (Port 5432) | pgvector extension enabled |
| redis | Cache & Session Store | /data | TCP Proxy (Port 6379) | Shared password with PostgreSQL |
Volumes (drives) — what to mount
| Service | Mount path | What is stored |
|---|---|---|
| didacta | /app/data | Local file uploads, media assets, export archives (/app/data/storage) |
| postgres | /var/lib/postgresql/data | PostgreSQL tables, vector embeddings, course records, user accounts |
| redis | /data | Redis persistent cache, queue state, active session keys |
Warning: Do not remove or detach any of the three persistent volumes — deleting volumes will cause permanent loss of uploaded course files, user records, or database indexes during container redeployments.
Quick Start
- Click the Deploy on Railway button above.
- Sign in (or create a free Railway account) and click Deploy.
- Wait 2–3 minutes for all three services (
postgres,redis, anddidacta) and their persistent volumes to initialize. - Retrieve the initial setup credentials from the
didactaservice variables (DIDACTA_SETUP_TOKENorPOSTGRES_PASSWORD). - Open the didacta service → Settings → Networking and click the generated public domain URL.
- Access the setup wizard / admin login page to complete your initial administrator configuration.
Configuration
Application Variables (didacta)
| Variable | Default / Source | Description / Notes |
|---|---|---|
NODE_ENV | production | Node.js execution environment |
DIDACTA_CORE_VERSION | 0.0.1-alpha.107 | Core platform version tag |
WEB_PUBLIC_URL | https://${{RAILWAY_PUBLIC_DOMAIN}} | Public canonical base URL for the web interface |
WEB_PUBLIC_ALLOWED_HOSTS | ${{RAILWAY_PUBLIC_DOMAIN}} | Allowed host headers for security verification |
POSTGRES_USER | didacta | Application database username |
POSTGRES_PASSWORD | ${{postgres.POSTGRES_PASSWORD}} | Database password referenced from postgres service |
POSTGRES_DB | didacta | Main application database name |
ADMIN_DATABASE_URL | ${{postgres.DATABASE_URL}} | Private database connection URL |
REDIS_URL | ${{redis.REDIS_URL}} | Private Redis connection URL |
AUTH_SECRET | Auto-generated secret (64 chars) | Cryptographic secret key for session signing |
DIDACTA_SETUP_TOKEN | ${{postgres.POSTGRES_PASSWORD}} | Token required for initial administrative setup |
STORAGE_DRIVER | local | File storage adapter (local or S3) |
STORAGE_ROOT | /app/data/storage | Root path for stored file assets inside volume |
PORT | 3000 | HTTP port exposed to Railway router |
Database Variables (postgres)
| Variable | Default / Source | Description / Notes |
|---|---|---|
POSTGRES_DB | railway | Initial system database created on startup |
POSTGRES_USER | postgres | Superuser database account |
POSTGRES_PASSWORD | Auto-generated secret (32 chars) | Master database password |
DATABASE_URL | Private connection URL | Internal network database string |
DATABASE_PUBLIC_URL | TCP Proxy URL | External connection URL for administrative tools |
Redis Variables (redis)
| Variable | Default / Source | Description / Notes |
|---|---|---|
REDIS_PASSWORD | ${{postgres.POSTGRES_PASSWORD}} | Shared authentication password |
REDIS_URL | Private connection URL | Internal Redis connection string |
REDIS_PUBLIC_URL | TCP Proxy URL | External connection string via TCP proxy |
Custom Domain
- Open the didacta service → Settings → Networking → Custom Domain.
- Add your custom domain (e.g.
lms.yourdomain.com) and update your DNS CNAME record per Railway instructions. - Update
WEB_PUBLIC_URLtohttps://lms.yourdomain.com. - Update
WEB_PUBLIC_ALLOWED_HOSTStolms.yourdomain.com. - Railway automatically issues and renews TLS certificates.
Updating Didacta
- Open the didacta service → Settings → Source.
- Update the image tag (e.g.,
ghcr.io/va360labs/didacta-community:0.0.1-alpha.107to a newer version tag). - Click Redeploy.
All uploaded files (/app/data), database records (/var/lib/postgresql/data), and cache state (/data) will remain safe across updates.
Traps
Common pitfalls and failure modes:
- Host Header Mismatch (
WEB_PUBLIC_ALLOWED_HOSTS) — If you attach a custom domain without updatingWEB_PUBLIC_ALLOWED_HOSTSandWEB_PUBLIC_URL, Didacta will reject web traffic with host security errors or broken redirect URLs. - Database Volume Detachment — Ensure all three volume mounts (
/app/data,/var/lib/postgresql/data,/data) remain attached. Removing the/app/datavolume will delete uploaded course assets and media files. - Database Initialization Order — On first boot,
didactarequirespostgresto be ready. Ifdidactafails during initial migration, wait forpostgreshealthchecks to pass and trigger a redeploy ondidacta. - Private Network vs TCP Proxy Connections — Ensure
ADMIN_DATABASE_URLandREDIS_URLpoint to private domain URLs rather than public TCP proxy domains for lower latency and better security.
Why Deploy Didacta on Railway?
Railway provides a complete platform for hosting multi-container web applications, vector databases, and Redis caches. Deploying Didacta Community on Railway gives you private service networking, persistent volume storage, auto-generated cryptographic keys, automatic HTTPS termination, and zero-maintenance cloud hosting.
Template Content
redis
redis:7-alpinepostgres
pgvector/pgvector:pg16SMTP_FROM
Email address used as the sender for outgoing messages.
SMTP_HOST
SMTP server hostname used for sending emails.
SMTP_PASS
Password used to authenticate with the SMTP server.
SMTP_USER
Username used to authenticate with the SMTP server.
DIDACTA_LICENSE_KEY
License key used to activate licensed Didacta features.
