Documentation

Server 3.x

Upgrade Debian 11 to Debian 12#

This document will describe step-by-step how to update your eduVPN / Let’s Connect! 3.x server from Debian 11 to Debian 12.

Official Debian release upgrade instructions can be found here. You SHOULD review them carefully.

If you have the opportunity, you SHOULD make a snapshot of your system, e.g. through your VM platform so you can rollback immediately if the upgrade doesn’t work.

Step by Step#

On a typical system, the below instructions will upgrade your server without having to read through the release upgrade instructions linked above. Please look at every line and make sure you understand it. This ONLY works for systems that were installed with deploy_debian.sh and are fairly standard clean Debian installations. If your organization (heavily) modifies standard Debian you MAY run into trouble! You have been warned! :-)

Preparation#

First, make sure your Debian 11 system is fully up to date and reboot it:

$ sudo vpn-maint-update-system
$ sudo reboot

Make sure everything (portal, apps, connecting to VPN) still works as expected before continuing.

Upgrade#

The below commands SHOULD be enough to fully upgrade your system:

# change to bookworm repo for all repository configurations that mention 
# "bullseye"
$ sudo find /etc/apt \
    -type f -name '*.list' \
    -exec sed -i 's/bullseye/bookworm/g' {} +

# perform update/upgrade
$ sudo apt update
$ sudo apt full-upgrade

# enable php-fpm 8.2 (upgrade from 7.4 in Debian 11)
$ sudo a2enconf php8.2-fpm

NOTE: there currently is a problem in which the apt full-upgrade removes vpn-user-portal. This is obviously wrong, but we have been unable to figure out the exact cause. Fortunately it is easy to fix this issue by installing the vpn-user-portal package again after the apt full-upgrade completes:

$ sudo apt install vpn-user-portal
$ sudo a2enconf vpn-user-portal

The PHP upgrade “lost” the PHP tuning we did for version 7.4. You can copy the 7.4 version to 8.2:

$ sudo cp /etc/php/7.4/fpm/pool.d/www_vpn.conf /etc/php/8.2/fpm/pool.d/www_vpn.conf

Better yet, read our PHP Tuning documentation on optimize the settings for your system.

Now, reboot your system. Then you can continue to perform some additional cleanup steps:

$ sudo apt autoremove
$ apt list "~o"
$ sudo apt purge "~o"
$ apt list "~c"
$ sudo apt purge "~c"

To make sure you are running with the latest configuration applied, run this:

$ sudo vpn-maint-apply-changes

After this is complete, you can reboot again. Make sure all comes back as expected and your portal and VPN still works.