Repository navigation
0.2.0
✨ What’s new in 0.2.0
This release turns the Linux helper into a proper sibling of the Windows and macOS
delayed update scripts:
- dedicated main script
netbird-delayed-update-linux.sh; - JSON state file with candidate version and timestamps;
- per-run log files with retention;
- optional script self-update from GitHub releases;
- CLI-based systemd installation and uninstall;
- default delay increased to 10 days.
🚀 Added
-
Main script
netbird-delayed-update-linux.sh:- implements delayed / staged rollout using the APT candidate version of
netbird; - stores state in
/var/lib/netbird-delayed-update/state.jsonwith:CandidateVersionFirstSeenUtcLastCheckUtc;
- writes per-run logs under:
/var/lib/netbird-delayed-update/netbird-delayed-update-YYYYMMDD-HHMMSS.log - supports
--log-retention-days(default:60,0disables cleanup).
- implements delayed / staged rollout using the APT candidate version of
-
Script self-update (optional):
- queries the latest GitHub release of this repository;
- compares the release tag (
X.Y.Z) toSCRIPT_VERSION(currently0.2.0); - if newer:
- tries
git pull --ff-onlywhen the script lives inside a git checkout; - otherwise downloads
netbird-delayed-update-linux.shfrom the tagged version
onraw.githubusercontent.comand overwrites the local script;
- tries
- the updated script is used on the next run.
-
Systemd integration via CLI:
--install/-icreates or updates:/etc/systemd/system/netbird-delayed-update.service/etc/systemd/system/netbird-delayed-update.timer;
--uninstall/-uremoves these units;--remove-stateadditionally removes:/usr/local/sbin/netbird-delayed-update.sh/var/lib/netbird-delayed-update;
- configuration options:
--delay-days--max-random-delay-seconds--daily-time "HH:MM"--log-retention-days.
🔧 Changed
- Default delay for new NetBird versions is now 10 days:
- when you run
--installwithout extra flags, the timer will only allow
upgrades after the candidate version has stayed in the APT repo unchanged
for at least 10 days; - you can override this with
--delay-days Nduring installation.
- when you run
state.jsonhandling no longer usespython3:- the script writes a small JSON file itself and reads it back via
grep,
which simplifies runtime dependencies; - Python is no longer required to run the delayed-update logic.
- the script writes a small JSON file itself and reads it back via
- Age calculation between
FirstSeenUtcand the current time is clamped to
>= 0 days to avoid negative values when the system clock moves backwards. - Version comparison is now based on
dpkg --compare-versions, which correctly
handles Debian/Ubuntu-style version strings. - The README and examples now use
netbird-delayed-update-linux.shdirectly as the main
entry point for:- one-off runs,
- installing the systemd service and timer,
- uninstalling them later.
🐛 Fixed
- More robust behaviour when:
- the
netbirdpackage is not installed locally (no silent auto-install); - APT reports
Candidate: (none)or no candidate at all; - the optional
netbird-uipackage is missing from the repository
(upgrade falls back tonetbirdonly).
- the
- Log creation and cleanup are now consistent across runs:
- each run creates a new timestamped log file;
- old log files are removed based on
--log-retention-dayswhen configured.
🧪 Upgrade / install notes
For new installations, follow the updated README:
git clone https://github.com/NetHorror/netbird-delayed-auto-update-linux.git
cd netbird-delayed-auto-update-linux
chmod +x ./netbird-delayed-update-linux.sh
sudo ./netbird-delayed-update-linux.sh --installThis will:
- copy the script to
/usr/local/sbin/netbird-delayed-update.sh; - install
netbird-delayed-update.serviceandnetbird-delayed-update.timer; - reload systemd and enable the timer;
- schedule a daily delayed-update check with version aging and log retention.
To keep the previous behaviour with a shorter delay (e.g. 3 days), install with:
sudo ./netbird-delayed-update-linux.sh --install \
--delay-days 3 \
--max-random-delay-seconds 3600 \
--daily-time "04:00"Existing setups based on the previous installer script can be migrated by:
- dropping the old systemd units, and
- reinstalling them via
netbird-delayed-update-linux.sh --installwith the desired
parameters.
See CHANGELOG.md for the full list of changes.