Skip to content
Your own VPN server, managed from a web page
Download

4. Updating

From the web page

Open Updates. Check for updates asks the update server whether a newer version exists and shows what is new. Install now installs it. The page reloads or is unavailable for a few seconds while the new version is switched in; VPN connections stay up.

The Updates page

From the console the same thing is:

sudo -u tunnelry php /opt/tunnelry/current/artisan tunnelry:update --check
sudo -u tunnelry php /opt/tunnelry/current/artisan tunnelry:update --yes

An update needs an update server configured (--update-url at installation, or /etc/tunnelry/update.json).

What it does, and why it is safe

  1. Downloads the release and verifies its signature and checksum. A release that is not signed by the project, or is not newer than the installed one, is never installed.
  2. Unpacks it next to the running version; nothing changes yet.
  3. Makes a copy of the database (kept in /var/lib/tunnelry-update/backups, readable by root only).
  4. Installs the new helper program and system files, updates the database, switches to the new version in one atomic step, reloads the web server.
  5. Checks that the new version answers. If it does not, it switches back automatically to the previous version, the previous helper program and the saved database, and tells you.

The VPN service is not restarted by an update. The three latest versions are kept on disk.

Updating the system, PHP included

Updating Tunnelry replaces Tunnelry. It does not update the operating system, and the web interface runs on the system's PHP, so a flaw in PHP is fixed only by updating the system. Do that regularly (and at once when a serious PHP flaw is announced):

sudo apt update && sudo apt upgrade
sudo systemctl restart php8.4-fpm

The number in the second command is your PHP version; ls /lib/systemd/system | grep fpm shows it.

The dashboard helps: when the system has PHP updates waiting, Server health shows "PHP updates: waiting to be installed". The check reads the package lists the system refreshes by itself, so it can lag behind by a day. To get security updates installed without remembering, enable unattended-upgrades (sudo apt install unattended-upgrades, then sudo dpkg-reconfigure -plow unattended-upgrades); it does not restart PHP by itself on every system, so restart it after a PHP update as above.

If PHP comes from a third-party repository (for example packages.sury.org), the fix arrives when that repository publishes it; apt-cache policy php8.4-fpm shows which version is offered.

If something goes wrong

The page (or tunnelry:update) says which step failed and that the previous version is running again. Details are in the journal: sudo journalctl -t vpnctl --no-pager -n 50. Try again later, or write to contact@tunnelry.com (security problems: security@tunnelry.com).

Next: backup and restore.