Koel is a free and open-source web-based music streaming server, written in PHP and Vue.js. It allows you to access your music library from anywhere with an internet connection. In this tutorial, we will guide you step-by-step on how to install Koel on EndeavourOS Latest using the LAMP stack.
Before installing any new packages, it is recommended to update the system to the latest version.
sudo pacman -Syu
To run Koel, we need to install some PHP extensions, MariaDB server, and some other dependencies. Use the following command to install them all.
sudo pacman -S mariadb php php-apache php-gd php-mbstring php-intl php-pdo php-redis ffmpeg imagemagick
During the installation, you will be prompted to start and enable MariaDB. You can do this by running the following command:
sudo systemctl enable --now mariadb
Koel uses a MySQL/MariaDB database to store the metadata and other information about your music library. We need to create a new database and user for Koel using the following commands:
sudo mysql -u root
CREATE DATABASE koel;
GRANT ALL PRIVILEGES ON koel.* TO 'koeluser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;
Remember to replace koeluser
and password
with your desired database username and password.
Composer is a dependency manager for PHP that we will use to install Koel.
sudo pacman -S composer
To install Koel, we need to clone the source code from GitHub and then install the dependencies using Composer. Run the following commands:
git clone https://github.com/phanan/koel.git
cd koel
composer install --no-dev
We need to create a new configuration file for Koel using the example file provided.
cp .env.example .env
Then, open the .env
file and edit the following parameters to match your environment:
APP_ENV=local
APP_DEBUG=false
DB_DRIVER=mysql
DB_DATABASE=koel
DB_USERNAME=koeluser
DB_PASSWORD=password
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=null
ADMIN_EMAIL=admin@example.com
ADMIN_NAME=admin
ADMIN_PASSWORD=password
APP_URL=http://localhost:8000
Koel provides a migration script that we need to run to populate the database with tables and data.
php artisan migrate --seed
We can start Koel server by running the following command:
php artisan serve
Then, open your web browser and navigate to http://localhost:8000
to access Koel.
In this tutorial, we have shown you how to install Koel on EndeavourOS Latest using the LAMP stack. You can now start uploading your music files and enjoy streaming your music from anywhere.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!