Koel: Difference between revisions

From FlowerHouseWiki
Line 91: Line 91:


<p>Mount the nfs-share (NAS) to the data folder where all the user files will be stored</p>
<p>Mount the nfs-share (NAS) to the data folder where all the user files will be stored</p>
<syntaxhighlight lang="console">
<syntaxhighlight lang="console" line>
mount -t nfs 192.168.88.5:/mnt/zpool1/NextCloud /home/data/
mkdir /media/audio
mount -t nfs 192.168.88.5:/mnt/zpool1/Musik /media/audio
</syntaxhighlight>
</syntaxhighlight>


Line 102: Line 103:
<p>Add following line at the end of file:</p>
<p>Add following line at the end of file:</p>
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
192.168.88.5:/mnt/zpool1/NextCloud /home/data/ nfs defaults 0 0
192.168.88.5:/mnt/zpool1/Musik /media/audio nfs defaults 0 0
</syntaxhighlight>
 
<p>Re-scan all files after mounting to update file database
<syntaxhighlight lang="console">
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
</syntaxhighlight>
</syntaxhighlight>


== Sources ==
== Sources ==
* [https://docs.koel.dev/#using-a-pre-compiled-archive Koel]
* [https://docs.koel.dev/#using-a-pre-compiled-archive Koel]

Revision as of 20:41, 2 August 2021

Koel-LXC
Koel.png

Network


IP: 192.168.88.17
MAC: BE:7E:92:49:2D:AC

System


OS: Debian Buster
Files: Koel.conf
RAM: 1024MB
Cores: 1
Privileged: Yes

Koel is reachable under 192.168.88.17 which is located in the ServerVLAN.

Basic Setup

Install required packages

apt install nginx ffmpeg

PHP7.4

Install required packages

apt -y install lsb-release apt-transport-https ca-certificates

Add repository

wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list

Update packages

apt update && apt upgrade

Install PHP7.4

apt install php7.4-{cli,fpm,json,common,mysql,zip,gd,mbstring,curl,xml,bcmath,tokenizer} openssl

Check if everything is running correctly

systemctl status php7.4-fpm nginx

Edit php.ini

nano /etc/php/7.4/fpm/php.ini

Find memory_limit and change it to

memory_limit = 512M

Find upload_max_filesize and change it to

upload_max_filesize = 512M

NGINX

Remove default config file

rm /etc/nginx/sites-enabled/default

Create config file and paste from Koel.conf

nano /etc/nginx/sites-available/koel.conf

Activate configuration

ln -s /etc/nginx/sites-available/koel.conf /etc/nginx/sites-enabled/

Check if configuration is working

nginx -t

Reload nginx to apply configuration

systemctl reload nginx.service

Composer

Download install script

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

Install composer

php composer-setup.php

Remove script

php -r "unlink('composer-setup.php');"

Move composer to another path

mv composer.phar /usr/local/bin/composer

Koel

Download Koel

cd /var/www
wget https://github.com/koel/koel/releases/download/v5.1.5/koel-v5.1.5.tar.gz

Untar Koel

tar -zxvf koel-v5.1.5.tar.gz
rm koel-v5.1.5.tar.gz

Create .env-file from template: .env.example and add database information

cd koel
nano .env

Setup composer

composer install

Initialise Koel

php artisan koel:init --no-assets

Give rights to www-data user

chown -R www-data:www-data /var/www/koel

Default admin account:

Username: admin@koel.dev
Password: KoelIsCool

NFS-Share

Install required packages for nfs-share:

apt install nfs-common nfs4-acl-tools

Mount the nfs-share (NAS) to the data folder where all the user files will be stored

mkdir /media/audio
mount -t nfs 192.168.88.5:/mnt/zpool1/Musik /media/audio

Edit fstab to mount at boot:

nano /etc/fstab

Add following line at the end of file:

192.168.88.5:/mnt/zpool1/Musik /media/audio nfs defaults 0 0

Sources