Installing Koha on the latest Ubuntu 24.04 (Noble Numbat) is a great choice for a modern, stable library system. While the commands in your text file are a solid foundation, Ubuntu 24.04 has some minor changes (like preferring MariaDB over MySQL and using modern keyring management) that we should account for.
Here is a blog-style guide and the updated commands specifically optimized for Ubuntu 24.04.
📚 How to Install Koha 24 on Ubuntu 24.04 LTS
Koha is the world’s first open-source Integrated Library System (ILS), used by thousands of libraries globally. This guide will walk you through the terminal-based installation and initial web setup.
Prerequisites
A fresh installation of Ubuntu 24.04 LTS.
A user with
sudoprivileges.An internet connection.
Step 1: System Preparation
Before installing anything, ensure your system is fully up to date.
sudo apt update && sudo apt upgrade -y
Step 2: Add the Koha Repository
The Koha community maintains its own Debian-based repository. We will add the stable branch.
# Add the GPG Key (Modern Ubuntu 24.04 method)
sudo wget -O- https://debian.koha-community.org/koha/gpg.asc | sudo gpg --dearmor -o /usr/share/keyrings/koha-keyring.gpg
# Add the Repository
echo "deb [signed-by=/usr/share/keyrings/koha-keyring.gpg] http://debian.koha-community.org/koha stable main" | sudo tee /etc/apt/sources.list.d/koha.list
# Update package list again
sudo apt update
Step 3: Install Core Components
Koha requires a database and a web server. On Ubuntu 24.04, MariaDB is the recommended replacement for MySQL.
# Install MariaDB and Apache
sudo apt install mariadb-server apache2 -y
# Install Koha Common
sudo apt install koha-common -y
Step 4: Network Configuration
By default, Koha tries to use Port 80. To avoid conflicts with the default Apache page, we’ll set the Staff Client to Port 8080.
Configure Koha Sites:
sudo nano /etc/koha/koha-sites.confFind the line
INTRAPORT="80"and change it toINTRAPORT="8080".Add Port 8080 to Apache:
sudo nano /etc/apache2/ports.confAdd
Listen 8080right below the lineListen 80.
Step 5: Enable Apache Modules & Instance
Now, we enable the specific modules Koha needs and create your first library database.
# Enable modules
sudo a2enmod rewrite cgi
sudo systemctl restart apache2
# Create your Koha instance (we'll name it "library")
sudo koha-create --create-db library
# Enable the new site and restart
sudo a2dissite 000-default
sudo a2ensite library
sudo systemctl restart apache2
Step 6: Retrieve Your Admin Password
Koha generates a random password for the initial setup. You need this to log in to the web installer.
sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml; echo
Tip: Copy the alphanumeric string that appears—you'll need it in the next step.
Step 7: Final Web Installation
Open your browser and go to:
http://localhost:8080(or your server's IP).Username:
koha_libraryPassword: (The one you just copied in Step 6).
Follow the on-screen Onboarding Tool to set up your library’s name, circulation rules, and patron categories.