Configuration Reference
The following reference covers all supported configuration options in Paideia LMS. Paideia LMS can be configured through environment variables, a .env file, and a paideia.config.json file.
Configuration Priority
Section titled “Configuration Priority”Paideia LMS loads configuration from multiple sources in the following order of priority (higher priority overrides lower priority):
paideia.config.json- System configuration file (highest priority for system settings).envfile - Local environment variables (higher priority than hosting environment)- Hosting environment variables - Variables set by your hosting platform (lowest priority)
Environment Variables
Section titled “Environment Variables”Environment variables can be set in your hosting environment or in a .env file at the path where you run the application. The .env file has higher priority than hosting environment variables.
Database Configuration
Section titled “Database Configuration”DATABASE_URL
Section titled “DATABASE_URL”Type: string
Required: true
Sensitive: true
The connection URL for your database. This is required for Paideia LMS to connect to your database.
DATABASE_URL=postgresql://user:password@localhost:5432/paideiaServer Configuration
Section titled “Server Configuration”Type: number
Required: false
Sensitive: true
Default: 3001
The port number for the Paideia LMS backend server.
PORT=3001FRONTEND_PORT
Section titled “FRONTEND_PORT”Type: number
Required: false
Sensitive: true
Default: 3000
The port number for the Paideia LMS frontend application.
FRONTEND_PORT=3000Storage Configuration (S3/MinIO)
Section titled “Storage Configuration (S3/MinIO)”S3_URL
Section titled “S3_URL”Type: string
Required: true
Sensitive: true
The URL endpoint for your S3-compatible storage service (e.g., MinIO, AWS S3).
S3_URL=https://s3.amazonaws.comS3_ACCESS_KEY
Section titled “S3_ACCESS_KEY”Type: string
Required: true
Sensitive: true
The access key ID for your S3-compatible storage service.
S3_ACCESS_KEY=your-access-keyS3_SECRET_KEY
Section titled “S3_SECRET_KEY”Type: string
Required: true
Sensitive: true
The secret access key for your S3-compatible storage service.
S3_SECRET_KEY=your-secret-keyS3_REGION
Section titled “S3_REGION”Type: string
Required: false
Sensitive: true
Default: "us-east-1"
The region for your S3-compatible storage service.
S3_REGION=us-east-1S3_BUCKET
Section titled “S3_BUCKET”Type: string
Required: false
Sensitive: true
The bucket name for your S3-compatible storage service. The bucket name must match the bucket name in your MinIO configuration.
S3_BUCKET=paideia-mediaS3_ENDPOINT_URL
Section titled “S3_ENDPOINT_URL”Type: string
Required: true
Sensitive: true
The endpoint URL for your S3-compatible storage service (without the bucket name). This should match the endpoint URL in your MinIO configuration.
S3_ENDPOINT_URL=https://storage.example.comAuthentication & Security
Section titled “Authentication & Security”PAYLOAD_SECRET
Section titled “PAYLOAD_SECRET”Type: string
Required: true
Sensitive: true
The secret key used by Payload CMS for authentication and encryption. This should be a long, randomly generated string.
PAYLOAD_SECRET=your-secret-key-hereEmail Configuration
Section titled “Email Configuration”SMTP_HOST
Section titled “SMTP_HOST”Type: string
Required: false
Sensitive: true
The SMTP server hostname for sending emails.
SMTP_HOST=smtp.example.comSMTP_USER
Section titled “SMTP_USER”Type: string
Required: false
Sensitive: true
The SMTP username for authentication.
SMTP_USER=your-smtp-usernameSMTP_PASS
Section titled “SMTP_PASS”Type: string
Required: false
Sensitive: true
The SMTP password for authentication.
SMTP_PASS=your-smtp-passwordRESEND_API_KEY
Section titled “RESEND_API_KEY”Type: string
Required: false
Sensitive: true
The API key for Resend email service (alternative to SMTP).
RESEND_API_KEY=re_your-api-keyEMAIL_FROM_ADDRESS
Section titled “EMAIL_FROM_ADDRESS”Type: string
Required: false
Sensitive: false
Default: "info@paideialms.com"
The email address used as the “From” address for system emails.
EMAIL_FROM_ADDRESS=noreply@yourdomain.comEMAIL_FROM_NAME
Section titled “EMAIL_FROM_NAME”Type: string
Required: false
Sensitive: false
Default: "Paideia LMS"
The display name used as the “From” name for system emails.
EMAIL_FROM_NAME=Your School NameSystem Mode
Section titled “System Mode”SANDBOX_MODE
Section titled “SANDBOX_MODE”Type: string
Required: false
Sensitive: false
Default: "0"
Enables sandbox mode for development and testing. When enabled ("1" or "true"), the system will:
- Automatically reset the database on server startup with seed data from
seed.json - Schedule daily database resets via cron job (at midnight)
- Provide manual reset capability via
paideia sandbox resetCLI command
Zero Downtime Reset: The sandbox reset process achieves zero downtime by selectively deleting user data while preserving system tables (job logs, migrations, etc.). The application continues operating normally during the reset process, unlike migrate fresh which drops the entire database and causes downtime.
SANDBOX_MODE=1Zero Downtime
When sandbox mode is enabled, database resets preserve system tables (payload-jobs, payload-jobs-log, payload-migrations, etc.) while only deleting user data. This allows the application to continue operating during resets, achieving zero downtime.
CORS Configuration
Section titled “CORS Configuration”CORS_ORIGINS
Section titled “CORS_ORIGINS”Type: string
Required: false
Sensitive: false
Default: ""
Comma-separated list of allowed CORS origins. If empty, defaults to localhost URLs for both frontend and backend ports. Use "*" to allow all origins (not recommended for production).
CORS_ORIGINS=http://localhost:3000,https://yourdomain.comSpecial values:
- Empty string: Defaults to
http://localhost:3000andhttp://localhost:3001 "*": Allows all origins- Comma-separated URLs: Allows specific origins
CSRF Configuration
Section titled “CSRF Configuration”CSRF_ORIGINS
Section titled “CSRF_ORIGINS”Type: string
Required: false
Sensitive: false
Default: ""
Comma-separated list of allowed CSRF origins. If empty, defaults to localhost frontend port and “localhost” hostname. Wildcard "*" is not supported for security reasons.
CSRF_ORIGINS=http://localhost:3000,https://yourdomain.comSpecial values:
- Empty string: Defaults to
http://localhost:3000and"localhost" - Comma-separated URLs/domains: Allows specific origins
Seed Data Configuration
Section titled “Seed Data Configuration”When SANDBOX_MODE is enabled, Paideia LMS can use seed data from a seed.json file to populate the database with initial test data. This file should be placed at the path where you run the application.
Reset Behavior: When sandbox mode resets the database (on startup or via cron job), it uses a zero downtime approach that:
- Preserves system tables (
payload-jobs,payload-jobs-log,payload-migrations, etc.) - Selectively deletes only user data (users, courses, enrollments, submissions, etc.)
- Re-seeds the database with fresh data from
seed.json - Allows the application to continue operating during the reset process
Seed Data Schema
Section titled “Seed Data Schema”The seed.json file must follow this structure:
{ "admin": { "email": "admin@example.com", "password": "password123", "firstName": "Admin", "lastName": "User" }, "users": { "student": { "email": "student@example.com", "password": "password123", "firstName": "Student", "lastName": "User" }, "teacher": { "email": "teacher@example.com", "password": "password123", "firstName": "Teacher", "lastName": "User" }, "ta": { "email": "ta@example.com", "password": "password123", "firstName": "Teaching", "lastName": "Assistant" }, "additionalStudents": [ { "email": "student2@example.com", "password": "password123", "firstName": "Student", "lastName": "Two" } ] }, "courses": [ { "title": "Introduction to Computer Science", "description": "A beginner-friendly course", "slug": "intro-cs", "status": "published" } ], "modules": { "page": { "title": "Welcome Page", "description": "A welcome page module", "content": "# Welcome" }, "additional": [ { "type": "quiz", "title": "Quiz 1", "description": "First quiz", "status": "published", "instructions": "Answer all questions", "points": 100, "timeLimit": 60 } ] }, "sections": [ { "title": "Week 1", "description": "Introduction" } ], "enrollmentStatuses": ["active", "inactive", "completed"]}Seed Data Fields
Section titled “Seed Data Fields”Type: object
Required: true
The admin user account to create.
email- Admin email addresspassword- Admin passwordfirstName- Admin first namelastName- Admin last name
Type: object
Required: true
Predefined user accounts for testing.
student- Default student accountteacher- Default teacher accountta- Default teaching assistant accountadditionalStudents- Array of additional student accounts
Each user object requires:
email- User email addresspassword- User passwordfirstName- User first namelastName- User last name
courses
Section titled “courses”Type: array
Required: true
Array of courses to create.
Each course object requires:
title- Course titledescription- Course descriptionslug- Course URL slugstatus- Course status:"published","draft", or"archived"
modules
Section titled “modules”Type: object
Required: true
Modules to create for testing.
page- Default page moduletitle- Module titledescription- Module descriptioncontent- Module content (markdown)
additional- Array of additional modules
Each additional module can be one of:
- Page (
type: "page")title,description,status,content
- Quiz (
type: "quiz")title,description,status,instructions,points,timeLimit
- Assignment (
type: "assignment")title,description,status,instructions,dueDate,maxAttempts
- Discussion (
type: "discussion")title,description,status,instructions,minReplies,threadSorting
- Whiteboard (
type: "whiteboard")title,description,status
sections
Section titled “sections”Type: array
Required: true
Array of course sections to create.
Each section object requires:
title- Section titledescription- Section description
enrollmentStatuses
Section titled “enrollmentStatuses”Type: array
Required: true
Array of enrollment statuses to use. Valid values: "active", "inactive", "completed"
System Configuration File
Section titled “System Configuration File”For complex and structured settings (usually system configuration), Paideia LMS reads from a paideia.config.json file at the path where you run the application.
Configuration File Priority
Section titled “Configuration File Priority”The paideia.config.json file has the highest priority for system settings. Values defined in this file will:
- Always override values stored in the database
- Lock the edit field in the UI - administrators cannot change settings that are defined in the config file
For example, if the system name is defined in paideia.config.json, the system name input field will be disabled in the UI, and even administrators cannot change it.
Example Configuration File
Section titled “Example Configuration File”{ "systemName": "My School LMS", "featureFlags": { "enableNewFeature": true, "enableBetaFeatures": false }, "systemSettings": { "maxFileSize": 10485760, "allowedFileTypes": ["pdf", "doc", "docx"] }}Configuration File Behavior
Section titled “Configuration File Behavior”When a setting is defined in paideia.config.json:
- The setting value is read from the file
- The setting is locked in the UI (input field is disabled)
- Administrators cannot override the value through the UI
- The config file value takes precedence over database values
This ensures that critical system settings can be managed through version-controlled configuration files rather than through the UI.
Best Practices
Section titled “Best Practices”When configuring Paideia LMS:
- Use
.envfiles for local development and sensitive credentials - Use hosting environment variables for production deployments
- Use
paideia.config.jsonfor system-wide settings that should be version-controlled - Never commit
.envfiles to version control - Always commit
paideia.config.jsonto version control (with appropriate redaction of sensitive data) - Use
seed.jsononly in sandbox mode for development and testing - Keep sensitive values (passwords, API keys) in environment variables, not in config files
