Overview
This guide walks you through setting up a complete Kolibri development environment. By the end, you’ll have Python, Node.js, all dependencies installed, and be ready to run the development server.Prerequisites
Before starting, you’ll need:- Git and Git LFS
- Terminal/command line access
- Internet connection for downloading dependencies
Git and GitHub Setup
Install Git
Install and configure Git on your computer. Try this interactive tutorial if you need practice with Git.
Create GitHub Account
Sign up for GitHub if you don’t have an account already.
Fork the Repository
Fork the main Kolibri repository. This makes it easier to submit pull requests later.
Install Git LFS
Important: Install and set up Git Large File Storage. This is required for managing large files in the repository.
Clone the Repository
Clone your Kolibri fork to your local machine (replace$USERNAME with your GitHub username):
Python Setup
Kolibri requires Python 3.9 or higher (but not 3.14 or above).Install pyenv (Recommended)
pyenv allows you to manage multiple Python versions easily. This is the highly recommended approach.- macOS
- Linux
Create a Virtual Environment
Virtual environments isolate project dependencies and prevent conflicts.You can use pyenv-virtualenv, virtualenv, venv, or any other virtual environment tool. The instructions below use pyenv-virtualenv.
Environment Variables
Set required environment variables before running Kolibri.Required: KOLIBRI_RUN_MODE
This variable is required and filters development work out of usage statistics:~/.bash_profile or ~/.bashrc to make it permanent:
Optional: KOLIBRI_HOME
Set this if you want to run multiple Kolibri versions simultaneously:Install Python Dependencies
With your virtual environment active and inside thekolibri directory:
The
--upgrade flags can usually be omitted to speed up installation on subsequent runs.Node.js and pnpm Setup
Kolibri requires Node.js 20.x for frontend development.Install Node.js with nodeenv
Thenodeenv tool (installed with Python dependencies) allows you to use specific Node.js versions:
Install JavaScript Dependencies
Database Setup
Initialize the Kolibri database:Pre-commit Hooks (Required)
Pre-commit hooks are strongly recommended and ensure code quality before committing.Install Pre-commit
Using Pre-commit
When you commit changes:- Run
git commit -m "Your message" - Pre-commit runs checks automatically
- If checks fail:
- Many issues are auto-fixed (formatting, etc.)
- Review the auto-fixed files
- Stage the fixed files:
git add <files> - Re-run the commit
- Once all checks pass, the commit succeeds
Running the Development Server
You’re ready to run Kolibri!Quick Start (Frontend + Backend)
Build frontend assets and start the Django server:http://127.0.0.1:8000/
Hot Reload Mode (Faster Development)
For faster frontend development with automatic reloading:Build Specific Plugins Only
To save resources, build only specific plugins:Separate Servers (Backend Development)
If working mainly on backend code, run servers separately: Terminal 1 - Django devserver:Load Sample Data
Import Content
Import the Kolibri QA channel (~350MB) for testing:- Go to
http://127.0.0.1:8000/ - Navigate to Device > Channels
- Import with token:
nakav-mafak
Generate Test Users
Auto-generate sample users, classes, and data:Editor Configuration
Kolibri includes an.editorconfig file for consistent code formatting. Install the EditorConfig plugin for your editor:
Recommended Editor Plugins
- Vue.js - Syntax highlighting and support
- ESLint - JavaScript linting
- Prettier - Code formatting
- stylelint - CSS/SCSS linting
Vue.js Development Tools
Install Vue.js devtools (Legacy) browser extension for debugging.Kolibri uses Vue 2, so install the “Legacy” version of Vue devtools, not the latest version.
Next Steps
Your development environment is ready! Here’s what to explore next:Frontend Development
Learn Vue.js patterns, Design System, and composables
Backend Development
Understand Django, ValuesViewset, and API patterns
Testing
Write tests with pytest and Jest
Plugin Development
Create your first Kolibri plugin
Troubleshooting
Node Sass Binding Error
If you get “Node Sass could not find a binding” error:Pre-commit Issues with Git Clients
If pre-commit fails with alternative Git clients (like GitUp):Database Migration Errors
If migrations fail, ensure:- Your virtual environment is active
- Python dependencies are installed
KOLIBRI_RUN_MODEis set