KooZic is an open-source media manager designed for personal use or small businesses. It allows you to organize and manage your music library, photos, and videos with ease. In this tutorial, we will show you how to install KooZic on Debian Latest.
Before we begin, you must have the following installed:
First, you need to ensure your system is up-to-date. To do this, log in as root or with sudo privileges and run the following command:
apt-get update && apt-get upgrade -y
This command will update your system and upgrade your current packages to the latest versions.
After updating the system, we need to install some required packages for KooZic. These dependencies are PostgreSQL, Python3, NGINX, and Git.
apt-get install postgresql postgresql-contrib python3 nginx git -y
Now that we have installed PostgreSQL, we can proceed with creating the KooZic database and user in PostgreSQL.
We can do that by running the following commands:
sudo su - postgres
createdb koozic
createuser -P koozic
Once the user is created, we need to grant the necessary privileges to the koozic
user by logging in to PostgreSQL shell:
psql
GRANT ALL PRIVILEGES ON DATABASE koozic TO koozic;
\q
Let's clone the KooZic repository using the Git command below:
git clone https://github.com/DocMarty84/KooZic.git koozic
Once it's done, navigate into the KooZic directory and run the following commands:
cd koozic
pip3 install -r requirements.txt
Before running KooZic, we need to configure it. Navigate into the KooZic directory and edit the config.py
file.
nano config.py
Update the following details:
SECRET_KEY = "your-own-secret-key"
SQLALCHEMY_DATABASE_URI = "postgresql://koozic:password@localhost/koozic"
Make sure to replace your-own-secret-key
with your own secret key, and password
with the password you have set for the koozic
user in PostgreSQL.
Now, run the below command to create the necessary database tables:
python3 manage.py db upgrade
We will use NGINX as a reverse proxy server for KooZic. Create an NGINX virtual host configuration file:
nano /etc/nginx/sites-available/koozic
Copy and paste the following configuration code:
server {
listen 80;
server_name yourdomain.com ;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Make sure to replace yourdomain.com
with your own domain name.
Save and close the file, and then create a symbolic link to enable the virtual host configuration:
ln -s /etc/nginx/sites-available/koozic /etc/nginx/sites-enabled/
Test for configuration syntax errors:
nginx -t
Finally, restart Nginx:
systemctl restart nginx
Now we can start KooZic with the following command:
python3 manage.py runserver --host 0.0.0.0 --port 5000
You can now access KooZic at http://yourdomain.com
.
You have successfully installed KooZic on Debian Latest. You can now add your music library and start using all its features to manage and organize your media.
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!