Upgrade Debian 12 to 13

Hi Debian admins,

Debian 13 Trixie is out since 2025-08-09 and NS8 migration from Debian 12 to 13 should be possible now.
Please test the upgrade procedure on your Debian systems. Core 3.17 is required.

We would like to introduce a testing period until June for this upgrade procedure. In this period both, Debian 12 and 13 will be supported.

After the Testing phase, only Debian 13 will be supported. Support for 12 will be removed from the installer.

Migration steps from Debian 12 to 13

Don’t update during production time as services are restarted.

Upgrade NS8

Upgrade to NS8 core 3.17+ via Software Center.

Update the Debian OS

The sources need to be adapted for Debian 13 Trixie:

sed -i 's/bookworm/trixie/' /etc/apt/sources.list /etc/apt/sources.list.d/*

Please check the sources in /etc/apt/sources.list and /etc/apt/sources.list.d/*. They should point to “trixie” instead of “bookworm”.

Start the OS upgrade:

apt update && apt full-upgrade -y

Following question can be answered with yes:

“Restart services during package upgrades without asking?”

Another question may come up:

“What do you want to do about modified configuration file sshd_config?”

In this case we “keep the local version currently installed”

Update Python

To update Python from 3.11 to 3.13 you need to run the following: (the brackets are required)

(
    set -e -x
    core_dir=/usr/local/agent/pyenv
    mv -v ${core_dir} ${core_dir}.bak
    python3.13 -mvenv ${core_dir} --upgrade-deps --system-site-packages
    ${core_dir}/bin/pip3 install -r /etc/nethserver/pyreq3_13.txt
    echo "/usr/local/agent/pypkg" >$(${core_dir}/bin/python3 -c "import sys; print(sys.path[-1] + '/pypkg.pth')")
    rm -rf ${core_dir}.bak
)

Check python version, it should be 3.13.5 after the update:

runagent python3 --version # output should be 3.13.5

Modernize Debian source files

This is an optional step.

Debian introduced a new APT sources file format, see https://wiki.debian.org/SourcesList#APT_sources_format

To upgrade to the new file format:

apt modernize-sources

Reboot the server.

Now NS8 should run on Debian 13.

4 Likes