Self-host EaseLMS
This guide will walk you through setting up EaseLMS on your own infrastructure. You’ll have complete control over your data, users, and platform customization.Don’t want to manage infrastructure? Check out our hosted service for a fully managed solution.
Prerequisites
Before you begin, ensure you have the following:Node.js 18.0+
Download from nodejs.org
npm 10.0+
Included with Node.js installation
Supabase account
Sign up at supabase.com (free tier available)
Git
For cloning the repository
- AWS account - For S3 file storage (optional for development)
- SendGrid account - For email notifications
- Stripe account - For accepting payments globally
- Flutterwave account - For African market payments
Installation steps
Install dependencies
Install all required packages using npm:
EaseLMS is a monorepo built with Turborepo. This command installs dependencies for both the LMS app and the marketing website.
Set up environment variables
Create a Add the following environment variables:
.env.local file in the apps/lms/ directory:Create a Supabase project
Set up your Supabase database:
- Go to supabase.com and sign in
- Click “New Project”
- Choose your organization
- Enter project details:
- Name - Your project name (e.g., “easelms-production”)
- Database Password - Strong password for database access
- Region - Choose the closest region to your users
- Click “Create new project” and wait ~2 minutes for provisioning
Supabase free tier includes 500MB database storage, 1GB file storage, and 2GB bandwidth - perfect for getting started.
Get Supabase credentials
Retrieve your Supabase API credentials:
- Navigate to Project Settings → API
- Copy the following values:
- Project URL →
NEXT_PUBLIC_SUPABASE_URL - anon/public key →
NEXT_PUBLIC_SUPABASE_ANON_KEY - service_role secret key →
SUPABASE_SERVICE_ROLE_KEY
- Project URL →
- Update your
.env.localfile with these values
Run the database migration
Set up your database schema:
- In your Supabase project, go to SQL Editor
- Click New Query
- Open the migration file at
apps/lms/supabase/migrations/database_setup.sql - Copy the entire file contents
- Paste into the SQL Editor
- Click Run (or press Cmd/Ctrl + Enter)
- Wait for “Success. No rows returned” confirmation
Database tables created
Database tables created
profiles- User profiles linked to Supabase Authcourses- Course information and settingslessons- Individual lessons within coursesenrollments- Student course enrollmentsprogress- Lesson completion trackingpayments- Payment records and receiptscertificates- Generated course certificatesinstructors- Instructor profilesresources- Downloadable course materialsquiz_questions- Quiz questions and answersquiz_settings- Quiz configurationquiz_attempts- Student quiz attemptsquiz_results- Quiz scores and resultscourse_instructors- Links courses to instructorscourse_prerequisites- Course dependencieslesson_resources- Links lessons to resourcesplatform_settings- Global platform configuration
Verify the database setup
Confirm your tables were created successfully:
- Go to Table Editor in Supabase
- You should see all 17 tables listed
- Click on any table to view its structure
The migration also creates triggers for automatically updating timestamps and creating user profiles on signup.
Start the development server
From the root directory, start the development server:This starts both applications:
- LMS Application: http://localhost:3000
- Marketing Website: http://localhost:3001
Access the application
Open your browser and navigate to http://localhost:3000.You’ll be redirected to
/auth/learner/login - the learner login page.Create your first admin user
After installation, you need to create an admin account to access the admin dashboard.Sign up through the UI
- Navigate to http://localhost:3000
- You’ll be redirected to the login page
- Click “Sign Up” to create a new account
- Fill in your details and submit
Promote user to admin
By default, new users are created with the “user” (learner) role. To make your account an admin:
- Go to your Supabase project → Table Editor
- Open the
profilestable - Find your user record by email
- Change the
user_typefromusertoadmin - Save the changes
Configure platform branding
Customize your EaseLMS instance with your own branding.Update platform information
Configure your platform details:Basic information:
- Platform name - Your LMS name (appears in sidebar, emails)
- Platform description - Brief description for metadata
- Contact email - Support email shown to users
- App URL - Your domain (used in emails and links)
- Logo (light mode) - Logo for light theme
- Logo (dark mode) - Logo for dark theme
- Favicon - Browser tab icon
- SEO title - Browser title and search engine display
- SEO description - Meta description for search engines
- SEO keywords - Comma-separated keywords
- SEO image - Social media preview image
Upload assets
Upload your brand assets:
- Click the upload button for each asset type
- Select your image file
- Wait for upload to AWS S3 (if configured) or Supabase Storage
- Preview the changes in real-time
Recommended sizes:
- Logo: 120x40px (transparent PNG)
- Favicon: 32x32px or 64x64px
- SEO image: 1200x630px (JPG or PNG)
Set up email notifications
Enable automated email notifications for enrollments, completions, and payments.Create a SendGrid account
- Sign up at sendgrid.com
- Verify your email address
- Complete the SendGrid onboarding
Generate an API key
- Navigate to Settings → API Keys
- Click Create API Key
- Name it (e.g., “EaseLMS Production”)
- Select Full Access permissions
- Click Create & View
- Copy the API key (shown only once)
Verify sender identity
- In SendGrid, go to Settings → Sender Authentication
- Choose Domain Authentication (recommended) or Single Sender Verification
- Follow the verification steps
- Wait for verification to complete
Test email delivery
Restart your development server and test:
- Create a new user account
- Check your inbox for the welcome email
- Enroll in a course and verify enrollment confirmation
- Welcome email (new user signup)
- Enrollment confirmation
- Course completion notification
- Certificate ready notification
- Payment confirmation/failure
- Admin notifications (enrollments, payments, completions)
Configure payment gateways
Accept payments for paid courses using Stripe or Flutterwave.- Stripe (Global)
- Flutterwave (Africa)
Create a Stripe account
- Sign up at stripe.com
- Complete business verification
- Activate your account
Get API credentials
- Navigate to Developers → API keys
- Copy your Publishable key and Secret key
- Use test keys for development, live keys for production
Deploy to production
When you’re ready to deploy your EaseLMS instance:Choose a hosting platform
Deploy to your preferred platform:
Vercel
Easy deployment with zero config
AWS
Full control with EC2, ECS, or Amplify
DigitalOcean
Simple droplet or App Platform
Set production environment variables
Configure all environment variables in your hosting platform:
- Use production Supabase credentials
- Use live Stripe/Flutterwave keys
- Set production AWS S3 bucket
- Update
NEXT_PUBLIC_APP_URLto your domain
Troubleshooting
Database connection errors
Database connection errors
Error: “Could not connect to Supabase”Solutions:
- Verify your
NEXT_PUBLIC_SUPABASE_URLis correct - Check that your
NEXT_PUBLIC_SUPABASE_ANON_KEYis valid - Ensure your Supabase project is active (not paused)
- Check Supabase service status at status.supabase.com
Migration fails
Migration fails
Error: Migration errors when running
database_setup.sqlSolutions:- Ensure you’re running the migration in a fresh database
- Check for syntax errors if you modified the migration
- Run each section separately to identify the failing part
- Check Supabase logs for detailed error messages
File upload issues
File upload issues
Error: “Failed to upload file”Solutions:
- Verify AWS credentials are correct
- Check S3 bucket permissions allow uploads
- Ensure CORS is configured on your S3 bucket
- For development, uploads will fall back to Supabase Storage if AWS is not configured
Email notifications not sending
Email notifications not sending
Error: Emails not being deliveredSolutions:
- Verify SendGrid API key is valid
- Check sender email is verified in SendGrid
- Review SendGrid activity logs for failures
- Check spam folder for test emails
- Ensure
SENDGRID_FROM_EMAILmatches verified sender
Payment processing errors
Payment processing errors
Error: Payment redirects failSolutions:
- Verify Stripe/Flutterwave API keys are correct
- Use test mode keys for development
- Check webhook endpoints are accessible
- Review payment gateway dashboard for errors
- Ensure
NEXT_PUBLIC_APP_URLis set correctly for redirects
Next steps
Create your first course
Log in as admin and start building your course content
Customize branding
Upload your logo and configure platform settings
Invite instructors
Add instructors to help create and manage courses
Deploy to production
Launch your LMS and start enrolling students