Upgrade your Debian Funkwhale installation
If you installed Funkwhale following the Debian guide, follow these steps to upgrade.
Cleanup old funkwhale files
Stop the Funkwhale services.
# systemctl stop funkwhale.target
Navigate to your Funkwhale directory.
# cd /srv/funkwhale
Remove the old files.
# rm -Rf api/* front/* venv
Download Funkwhale
Export the Funkwhale version you want to update to. You’ll use this in the rest of the commands in this guide.
export FUNKWHALE_VERSION=1.4.0
Follow the Download Funkwhale instructions in the installation guide.
Follow the Install the Funkwhale API instructions in the installation guide.
Upgrade your systemd unit files
To make sure you receive any updates made to unit files, download the latest versions from the repo.
# curl -L -o "/etc/systemd/system/funkwhale.target" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale.target"
# curl -L -o "/etc/systemd/system/funkwhale-server.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-server.service"
# curl -L -o "/etc/systemd/system/funkwhale-worker.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-worker.service"
# curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-beat.service"
Update your reverse proxy configuration
To ensure your reverse proxy is up-to-date with changes, you should regenerate your Nginx configuration with each upgrade. To do this:
Log in to a root shell to make changes to the config files
$ sudo su
Download the new Nginx templates from Funkwhale
# curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale_proxy.conf" # curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/nginx.template"
Update the Nginx configuration with details from your
.env
file# set -a && source /srv/funkwhale/config/.env && set +a envsubst "`env | awk -F = '{printf \" $%s\", $$1}'`" \ < /etc/nginx/sites-available/funkwhale.template \ > /etc/nginx/sites-available/funkwhale.conf
Check the configuration file to make sure the template values have been updated properly
# grep '${' /etc/nginx/sites-available/funkwhale.conf
Once you’ve updated your configuration, reload Nginx.
# systemctl reload nginx
Update your Funkwhale instance
Once you have downloaded the new files, you can update your Funkwhale instance. To do this:
Install or upgrade all OS dependencies using the dependencies script.
# api/install_os_dependencies.sh install
Collect the new static files to serve.
# venv/bin/funkwhale-manage collectstatic --no-input
Apply new database migrations.
# sudo -u funkwhale venv/bin/funkwhale-manage migrate
Restart the Funkwhale services.
# systemctl start funkwhale.target
That’s it! You’ve updated your Funkwhale pod. You should now see the new version running in your web browser.