Funkwhale is a free, decentralized, and open-source platform that allows you to share, listen, and organize your music online. In this tutorial, we will learn how to install Funkwhale on Debian, the latest version.
Before starting with the installation, ensure that the following requirements are met:
Open the terminal and login as root or use sudo with your existing user to update the system.
sudo apt update && sudo apt upgrade
Next, we need to install some dependencies for Funkwhale to run correctly. These dependencies are:
Docker, a container platform that automates the process of creating, deploying, and running applications using containers.
docker-compose, a tool for defining and running multi-container Docker applications.
Use the following command to install Docker and Docker-compose:
sudo apt install docker docker-compose
Once both packages are installed, start the Docker service using the command:
sudo systemctl start docker
You can also enable the service to start at boot time using the command:
sudo systemctl enable docker
Clone the Funkwhale repository using the following command:
git clone https://dev.funkwhale.audio/funkwhale/funkwhale.git
Change to the new directory funkwhale
and check out the latest version of Funkwhale:
cd funkwhale
git checkout tags/0.23.1
Now we will create a docker-compose.yml
file in the funkwhale
directory to set up the required services.
Create and edit the docker-compose.yml
file using the command:
nano docker-compose.yml
Paste the following configuration into the file:
version: '3'
services:
postgres:
image: postgres:13-alpine
environment:
POSTGRES_USER: funkwhale
POSTGRES_PASSWORD: funkwhale
POSTGRES_DB: funkwhale
volumes:
- postgres_data:/var/lib/postgresql/data
web:
build: ./funkwhale-api
image: funkwhale/funkwhale:latest
environment:
DATABASE_URL: postgres://funkwhale:funkwhale@postgres/funkwhale
# edit below and set your domain name, with the subdomain or domain that will point to your server
FUNKWHALE_SELF_HOST: 'funkwhale.example.com'
FUNKWHALE_PROTOCOL: 'https'
FUNKWHALE_DEBUG: '0'
# Schedule scanning of media on at most one CPU every 60 minutes
FUNKWHALE_SCHEDULER_PERIOD: '60'
volumes:
- funkwhale_data:/funkwhale-data
- ./custom-nginx.conf:/etc/nginx/sites-enabled/default:ro
- ./custom-entrypoint.sh:/app/funkwhale/entrypoint.sh:ro
ports:
- "127.0.0.1:5000:80"
cleanup:
build: ./instance-cleaner
environment:
# Number of days before media is considered stale, and can be cleaned up
FUNKWHALE_INSTANCE_CLEANUP_DAYS: "30"
# Required to actually delete files
FUNKWHALE_INSTANCE_CLEANUP_DRY_RUN: "false"
# Required to allow for automatic cleanup
FUNKWHALE_REVERSE_PROXY_TYPE: "caddy"
volumes:
- funkwhale_data:/funkwhale-data
depends_on:
- web
volumes:
postgres_data: {}
funkwhale_data: {}
Replace funkwhale.example.com
with your domain name that will point to the server.
Save and exit the file using Ctrl-X, Y, Enter
.
To build and run the services, execute the following command:
docker-compose up -d
This command will pull all required images from Docker Hub and start the services in the background.
After some time, you can access your Funkwhale instance by opening your web browser and entering the URL that you set in the docker-compose.yml
file.
In this tutorial, we successfully installed Funkwhale on Debian latest using docker-compose. You can now start exploring the platform and upload your music. If you have any issues, please consult the Funkwhale documentation or seek help from the Funkwhale community.
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!