Deploying Open edX
Introduction
Open edX is the open-source learning management system (LMS) that powers edX.org and thousands of other online learning platforms worldwide. Originally developed by MIT and Harvard, Open edX provides a comprehensive platform for creating and delivering online courses with features like video lectures, interactive assessments, discussion forums, and verified certificates.
As one of the most mature and feature-rich open-source LMS platforms available, Open edX handles everything from small internal training programs to massive open online courses (MOOCs) with thousands of learners. The platform is highly customizable and has been adopted by universities, corporations, and governments globally.
Key highlights of Open edX:
- Course Authoring: Visual course builder with drag-and-drop components
- Video Lectures: Integrated video player with transcripts and captions
- Assessment Tools: Multiple question types, auto-grading, and manual grading
- Discussion Forums: Threaded discussions with voting and moderation
- Certificates: Customizable course completion certificates
- Mobile Apps: Native iOS and Android apps for learners
- Analytics: Comprehensive learning analytics and dashboards
- LTI Support: Integrate external learning tools
- Multi-tenancy: Host multiple organizations on one instance
- 100% Open Source: AGPL licensed with extensive community
This guide walks through deploying Open edX on Klutch.sh using Tutor, the official Docker-based deployment method, and configuring your learning platform.
Why Deploy Open edX on Klutch.sh
Deploying Open edX on Klutch.sh provides several advantages for online learning:
Simplified Deployment: Klutch.sh handles infrastructure while Tutor simplifies Open edX deployment complexity.
Data Ownership: Keep learner data and course content on your own infrastructure.
Persistent Storage: Attach volumes for courses, user data, and media that persist securely.
HTTPS by Default: Automatic SSL certificates for secure learning experiences.
Scalable Resources: Scale from small pilots to large deployments by adjusting resources.
Custom Domains: Use your institution’s domain for a branded learning experience.
Prerequisites
Before deploying Open edX on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- Significant resources (minimum 8GB RAM recommended for production)
- A custom domain for your learning platform
- SMTP server for email notifications
- Basic familiarity with Docker and containerized applications
Understanding Open edX Architecture
Open edX is a complex, multi-service application:
LMS (Learning Management System): The learner-facing application for taking courses.
CMS (Studio): The course authoring tool for creating and managing content.
MySQL Database: Stores user data, enrollments, grades, and course structure.
MongoDB: Stores course content, assets, and discussion forum data.
Elasticsearch: Powers search functionality across courses and content.
Redis: Caching and session storage for improved performance.
Celery Workers: Background task processing for emails, grading, and analytics.
Caddy/Nginx: Web server and reverse proxy.
Preparing Your Repository
Create a GitHub repository with your Open edX configuration using Tutor.
Repository Structure
openedx-deploy/├── Dockerfile├── config/│ └── config.yml├── scripts/│ └── init.sh└── .dockerignoreCreating the Dockerfile
Create a Dockerfile for Open edX with Tutor:
FROM python:3.9-slim
# Install system dependenciesRUN apt-get update && apt-get install -y \ curl \ git \ docker.io \ docker-compose \ && rm -rf /var/lib/apt/lists/*
# Install TutorRUN pip install tutor
# Create working directoryWORKDIR /openedx
# Copy configurationCOPY config/ /openedx/config/COPY scripts/ /openedx/scripts/RUN chmod +x /openedx/scripts/*.sh
# Initialize Tutor environmentRUN tutor config save --set LMS_HOST=localhost --set CMS_HOST=studio.localhost
# Expose portsEXPOSE 80 443
# Start scriptCMD ["/openedx/scripts/init.sh"]Creating Configuration
Create config/config.yml with your Open edX settings:
# Open edX Tutor configuration
# Platform settingsPLATFORM_NAME: "Your Learning Platform"CONTACT_EMAIL: admin@example.com
# Domain settings (override via environment variables)LMS_HOST: learn.example.comCMS_HOST: studio.example.com
# Email settingsSMTP_HOST: smtp.example.comSMTP_PORT: 587SMTP_USE_TLS: trueSMTP_USERNAME: your-smtp-userSMTP_PASSWORD: your-smtp-password
# Feature flagsENABLE_HTTPS: trueENABLE_WEB_PROXY: true
# Resource limitsMYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}OPENEDX_MYSQL_PASSWORD: ${OPENEDX_MYSQL_PASSWORD}SECRET_KEY: ${SECRET_KEY}Creating Initialization Script
Create scripts/init.sh:
#!/bin/bashset -e
echo "Initializing Open edX..."
# Apply configuration from environment variablestutor config save \ --set LMS_HOST=${LMS_HOST:-localhost} \ --set CMS_HOST=${CMS_HOST:-studio.localhost} \ --set PLATFORM_NAME="${PLATFORM_NAME:-Open edX}" \ --set CONTACT_EMAIL=${CONTACT_EMAIL:-admin@localhost}
# Start Open edX servicestutor local start -d
# Wait for services to be readysleep 30
# Run database migrations if neededtutor local run lms ./manage.py lms migratetutor local run cms ./manage.py cms migrate
# Keep container runningtail -f /dev/nullCreating the .dockerignore File
Create a .dockerignore file:
.git.github*.mdLICENSE.gitignore.DS_StoreDeploying Open edX on Klutch.sh
Follow these steps to deploy your Open edX instance:
learn.example.com- LMS (learner access)studio.example.com- CMS (course authoring)- Select HTTP as the traffic type
- Set the internal port to 80
- CPU: 4+ cores recommended
- Memory: 8GB minimum, 16GB recommended
- Storage: 50GB+ for data
- Add
learn.example.comfor LMS - Add
studio.example.comfor CMS
Generate Secure Keys
Generate required secrets:
# Secret keyopenssl rand -base64 32
# MySQL passwordsopenssl rand -base64 24Configure Your Domain
Plan your domain structure:
Push Your Repository to GitHub
Initialize and push your configuration:
git initgit add .git commit -m "Initial Open edX configuration"git remote add origin https://github.com/yourusername/openedx-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project for your learning platform.
Create a New App
Create a new app within your project and connect your GitHub repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
LMS_HOST | learn.example.com |
CMS_HOST | studio.example.com |
PLATFORM_NAME | Your Learning Platform |
CONTACT_EMAIL | admin@example.com |
SECRET_KEY | Your generated secret key |
MYSQL_ROOT_PASSWORD | Your MySQL root password |
OPENEDX_MYSQL_PASSWORD | Your MySQL user password |
SMTP_HOST | Your SMTP server |
SMTP_USERNAME | SMTP username |
SMTP_PASSWORD | SMTP password |
Allocate Sufficient Resources
Open edX requires significant resources:
Attach Persistent Volumes
Add persistent volumes for Open edX:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/openedx/data | 100 GB | MySQL and MongoDB data |
/openedx/media | 50 GB | Course media and uploads |
/openedx/config | 1 GB | Tutor configuration |
Configure Custom Domains
Add both domains in Klutch.sh:
Configure DNS A records for both domains.
Deploy Your Application
Click Deploy to build and start Open edX.
Create Admin Account
After deployment, create the admin account:
tutor local run lms ./manage.py lms createsuperuserAccess Your Platform
Navigate to your LMS domain to access the learning platform.
Initial Setup and Configuration
Accessing Studio
Access Studio (CMS) at your CMS domain to create courses:
- Log in with your superuser account
- Create a new course
- Configure course settings
- Add content modules
Creating Your First Course
Create courses in Studio:
- Click “New Course”
- Enter course name, organization, and number
- Set course dates and enrollment options
- Add sections, subsections, and units
Course Structure
Open edX courses follow a hierarchy:
Course├── Section (Week 1)│ ├── Subsection (Lesson 1)│ │ ├── Unit (Video Lecture)│ │ ├── Unit (Reading)│ │ └── Unit (Quiz)│ └── Subsection (Lesson 2)└── Section (Week 2)Adding Content
Add various content types:
- Video: Upload or embed videos with transcripts
- HTML: Rich text content and formatted materials
- Problems: Multiple choice, coding, and other assessments
- Discussions: Forum topics for learner interaction
Managing Learners
User Registration
Configure registration options:
- Go to LMS admin panel
- Configure registration settings
- Set email verification requirements
- Configure allowed email domains (if needed)
Enrollment Management
Manage course enrollments:
- Self-enrollment: Learners enroll themselves
- Manual enrollment: Admin adds learners
- Bulk enrollment: CSV upload for many learners
User Roles
Assign roles to users:
| Role | Description |
|---|---|
| Student | Take courses and submit work |
| Course Staff | View learner data for specific courses |
| Course Admin | Manage course content and settings |
| Global Staff | Manage all courses |
| Superuser | Full platform administration |
Assessments and Grading
Question Types
Open edX supports various assessment types:
- Multiple choice (single and multi-select)
- Dropdown selection
- Numerical input
- Text input
- Code submission
- File upload
- Peer assessment
Grading Configuration
Configure grading policies:
- Set grade cutoffs (A, B, C, etc.)
- Configure assignment weights
- Set up late submission policies
- Enable/disable grade passback
Certificates
Create course completion certificates:
- Design certificate template
- Configure certificate requirements
- Enable web certificates
- Optionally enable verified certificates
Discussion Forums
Forum Configuration
Set up discussions:
- Enable discussions in course settings
- Create discussion topics
- Configure moderation settings
- Set up cohorts for targeted discussions
Moderation
Moderate discussions effectively:
- Pin important posts
- Close threads when resolved
- Flag and remove inappropriate content
- Assign moderator roles
Analytics and Reporting
Learner Analytics
Track learner progress:
- Enrollment statistics
- Completion rates
- Assessment performance
- Video engagement
Course Insights
Access Insights dashboard:
- View engagement metrics
- Analyze assessment results
- Monitor discussion activity
- Track certificate generation
Data Export
Export data for analysis:
- Grade reports (CSV)
- Learner profiles
- Assessment responses
- Discussion data
Customization
Theming
Customize the platform appearance:
# Create custom themetutor config save --set COMPREHENSIVE_THEME_DIR=/openedx/themes/customTheme elements:
- Logo and branding
- Color scheme
- Header and footer
- Email templates
Plugins
Extend functionality with Tutor plugins:
# Install pluginpip install tutor-mfe
# Enable plugintutor plugins enable mfePopular plugins:
- MFE: Micro-frontends for modern UI
- Notes: Learner note-taking
- Discovery: Course discovery service
Production Best Practices
Performance Optimization
- Caching: Ensure Redis is properly configured
- CDN: Use a CDN for static assets
- Database: Optimize MySQL and MongoDB
- Workers: Scale Celery workers for background tasks
Security Recommendations
- HTTPS Only: Enforce HTTPS for all connections
- Strong Passwords: Require strong user passwords
- Regular Updates: Keep Open edX updated
- Backup Secrets: Securely store all credentials
Backup Strategy
Regular backups should include:
- MySQL database
- MongoDB database
- Course media and uploads
- Tutor configuration
Monitoring
Monitor critical metrics:
- Server resource usage
- Database performance
- Celery queue length
- Error rates
Troubleshooting Common Issues
Services Not Starting
Symptoms: Open edX services fail to start.
Solutions:
- Check resource allocation
- Verify database connectivity
- Review Tutor logs
- Ensure all dependencies are available
Course Content Issues
Symptoms: Courses not loading or displaying incorrectly.
Solutions:
- Check MongoDB connectivity
- Verify asset storage
- Review CMS logs
- Clear caches
Email Not Sending
Symptoms: Learners not receiving emails.
Solutions:
- Verify SMTP configuration
- Check Celery worker status
- Review email queue
- Test SMTP connectivity
Performance Problems
Symptoms: Slow page loads or timeouts.
Solutions:
- Increase resource allocation
- Optimize database queries
- Enable caching
- Scale workers
Additional Resources
- Open edX Documentation
- Open edX GitHub
- Tutor Documentation
- Open edX Community Forums
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Open edX on Klutch.sh gives you access to a world-class learning management system that powers education for millions of learners globally. The combination of Open edX’s comprehensive features and Klutch.sh’s container management means you can deliver professional online courses without managing complex infrastructure.
With course authoring tools, video integration, assessments, discussions, and certificates, Open edX handles everything from small training programs to large-scale online education. Whether you’re a university offering MOOCs, a company providing employee training, or an organization sharing knowledge, Open edX on Klutch.sh provides the foundation for impactful online learning.