Chapter 14:
KOLIBRI SERVER
Serving Kolibri Offline on a Raspberry Pi Hotspot
Kolibri is a powerful tool for delivering digital educational content offline. By following these steps, you can set up and serve Kolibri via an IP address and port 8080 using a Raspberry Pi hotspot.
Step 1: Prepare Your Raspberry Pi
Before you begin, make sure your Raspberry Pi is up-to-date. Open the terminal and run the following commands:
sudo apt update
sudo apt upgrade
Step 2: Install Required Dependencies
Install necessary dependencies using these commands:
sudo apt install libffi-dev python3-pip python3-pkg-resources dirmngr
sudo pip3 install pip setuptools --upgrade
sudo pip3 install cffi --upgrade
Step 3: Add Kolibri Repository
To add the Kolibri repository, run the following commands:
sudo su -c 'echo "deb http://ppa.launchpad.net/learningequality/kolibri/ubuntu xenial main" > /etc/apt/sources.list.d/learningequality-ubuntu-kolibri-xenial.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DC5BAA93F9E4AE4F0411F97C74F88ADB3194DD81
Step 4: Install Kolibri
Now, install Kolibri using:
sudo apt update
sudo apt install kolibri
Step 5: Configure Nginx
Create an Nginx configuration file for Kolibri:
sudo nano /etc/nginx/sites-available/kolibri
Add the following content to the file:
server
{ listen 80;
listen [::]:80;
server_name kolibri kolibri.library;
location / { proxy_pass http://127.0.0.1:8080;
}
}
Save the file and exit the editor.
Step 6: Move Data to an External USB Drive
To move your Kolibri data to an attached USB drive, follow these steps:
# Stop Kolibri
sudo systemctl stop kolibri
# Move the data to the external drive
kolibri manage movedirectory /path/to/your/external_drive
# Start Kolibri again
sudo systemctl start kolibri
# Stop Kolibri
sudo systemctl stop kolibri
# Relocate the Kolibri data and configuration user folder
sudo mv /home/pi/.kolibri /your/external/media/kolibri_data
# Ensure proper ownership
sudo chown -R pi /your/external/media/kolibri_data
# Create a symbolic link
sudo ln -s /your/external/media/kolibri_data /home/pi/.kolibri
# Start Kolibri once more
sudo systemctl start kolibri
Now, your Kolibri setup is ready to serve educational content offline via the Raspberry Pi hotspot. Access it by entering the IP address and port 8080 in your web browser.