Automatic updates help keep your node secure and up to date without you needing to upgrade manually. This guide explains how to enable and configure unattended upgrades for Ubuntu, Debian, and Raspberry Pi.
Install unattended-upgrades
The unattended-upgrades
package will automatically install security updates and new versions of Mysterium’s node software.
Run in your terminal:
apt update apt install unattended-upgrades apt-listchanges -y
By default the service should start automatically. You can check its status with:
systemctl status unattended-upgrades
If it isn’t running, enable it manually:
systemctl enable --now unattended-upgrades
Configure the 50unattended-upgrades file (Ubuntu/Debian)
Navigate to the config directory:
cd /etc/apt/apt.conf.d/
Edit the file:
sudo nano 50unattended-upgrades
Add this configuration:
APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1"; APT::Periodic::Verbose "1"; APT::Periodic::AutocleanInterval "7"; Unattended-Upgrade::Mail "root"; Unattended-Upgrade::Origins-Pattern { "o=LP-PPA-mysteriumnetwork-node"; }; Unattended-Upgrade::Package-Blacklist { }; Unattended-Upgrade::Automatic-Reboot "false";
The Origins-Pattern
ensures that only Mysterium’s PPA repository is updated.
Test the configuration
Run a dry-run to check for errors:
unattended-upgrades --dry-run --debug
If no errors appear, automatic updates are correctly set up.
View update logs
To confirm updates are running as expected, check logs:
journalctl -u apt-daily.service | tail
Allowing automatic updates on Raspberry Pi
Edit auto-upgrades file
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
It should look like this:
APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::AutocleanInterval "7"; APT::Periodic::Unattended-Upgrade "1";
Edit unattended-upgrades file
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
Example config:
Unattended-Upgrade::Origins-Pattern { "origin=Raspbian,codename=${distro_codename},label=Raspbian"; "origin=Raspbian,codename=${distro_codename},label=Raspbian-Security"; "o=LP-PPA-mysteriumnetwork-node"; }; Unattended-Upgrade::AutoFixInterruptedDpkg "true"; Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; Unattended-Upgrade::Remove-Unused-Dependencies "true"; Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
This configuration ensures Raspbian and Mysterium node packages update automatically.