Koha Installation: A Step by Step Complete Guide in 2023

Koha Installation Guide

If you want to know how to Install Koha. This manual walks you through the process of installing and configuring the Koha Library Management System on an Ubuntu-based system. These step-by-step instructions will work as your trusted guide whether you’re setting up a brand-new library or improving your old system.  Koha is a reliable open-source library management system that is utilized by libraries all around the world. To ensure a good installation, carefully follow this guide. This manual is created keeping in view the official guide provided on Koha Community’s official website. By the end of this exercise, you’ll have a fully functional Koha system at your disposal, ready to transform the operations of your library.

More information about Koha are available at: Koha ILMS

Prerequisites for Koha Installation:

Operating System: Use a server that is based on Ubuntu.

Hardware: Make sure you have enough CPU, RAM, and storage.

Updates: Keep your operating system and packages up to date.

Access: Root or sudo access is required.

Connectivity: A consistent internet connection.

Installation Steps:

1. Add Koha Repository:

You need to add the Koha Community Repository into your system in order to ensure that you install the most recent Koha release.

echo deb http://debian.koha-community.org/koha stable main | sudo tee /etc/apt/sources.list.d/koha.lis

To prevent installation warnings, add the repository key to your APT trusted keys next:

2. Update and Upgrade Ubuntu

wget -O- https://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
sudo apt update
sudo apt upgrade
sudo apt clean

3. Download and install the latest Koha release

Before proceeding, ensure your Ubuntu system is up-to-date:

Now, you can download and install the latest Koha release by using the following command:

Sudo apt-get install koha-common

4. Server configuration:

After completion of installation open the following file by applying the the code:

sudo nano /etc/koha/koha-sites.conf

Open the Koha configuration file for editing:

For your setup, change the following variables as necessary:

e.g: change INTRAOPRT=”8001” (koha admin panel will be accessed through this port)

OPACPORT=”8002” (port to access opac)

# Apache virtual hosts creation variables
INTRAPORT="80" # use 8080 for an IP-based install.
 # SQL file to load into new instances
 # Zebra global configuration variables
ZEBRA_MARC_FORMAT="marc21" # or normarc or unimarc.
ZEBRA_LANGUAGE="en" # match with installation language (e.g. es for Spanish)
 # Memcached global configuration variables

after making changes save and exit the editor.

5. Database Installation (MariaDB or MySQL)

Koha uses MySQL or MariaBD as the data source which can be installed using the following commands:

sudo apt install -y mariadb-server       OR 
sudo apt install mysql-server 

Note: It will be for database password during installation kindly give a strong password.

To enhance database security apply the following command increase MySQL security:

Sudo sudo mysql_secure_installation

Answer the first prompt with “N” and the rest with “Y”

After database installation Enable Apache mod_rewrite and mod_cgi modules:

sudo a2enmod rewrite
sudo a2enmod cgi
sudo service apache2 restart

6. Create the library  instance (the name can be changed to anything )

To create instance just copy and past the following code terminal:

sudo koha-create --create-db library

7. Enable Modules and Site and respart apache2

sudo a2enmod deflate
sudo a2ensite library
sudo service apache2 restart
8. To Get the Default Password of Koha Copy and paste the following command in the terminal

sudo xmlstarlet sel -t -v ‘yazgfs/config/pass’ /etc/koha/sites/library/koha-conf.xml;ech

Congratulations Koha installation for the command prompt is completed. To access the web installer open the browser and type the following address:



Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top