Unattended upgrade setting for selfhosted instances with rexctl

(#4343) Feature Closed: Shipped security self-hosting

Current problem

Currently you need to manually upgrade your self hosted instance. For someone like me who is running Fluxer for a small friend group it is not really practical to keep the instance always up to date. This is also very important considering security updates which these days are recommended to install immediately.

Proposed change

Add a new argument to rexctl like --set-autoupdate TRUE and --autoupdate-interval 1 to update daily. If you could add any sort of notification to this that would be extremely helpful - however just the automated updates would go a long way.

Additional information

Currently I solve this problem with a wrapper and called it with a cronjob. It used to wrap around install.sh and now around rexctl. The files are attached to the request.
  1. Hampus changed the status from Under consideration to Planned
  1. The pull request fluxer#3666 mentions this post Merged

16 comments

Sign in with Fluxer to comment and vote.
Comment by Rex
RexSystem 1 vote 9 replies
Status changed from Planned to Shipped
rexctl auto-upgrade on turns on daily upgrades with a systemd timer or cron, with optional --notify webhook (fluxerapp/fluxer#3666), in release 2026.1027.192901
Comment by Ahryoo
Ahryoo OP1 vote 8 replies
WOW that was fast!
Comment by Hampus
HampusStaff 2 votes 7 replies
(I may or may not have actually started working on this implementation a little yesterday because it was cool)
Comment by Ahryoo
Ahryoo OP1 vote 6 replies
Love it!
rexctl auto-upgrade
✓ rexctl upgrades Fluxer every day between 05:00 and 05:30.
Next run  Wed 2026-10-28 05:07:53 CET
Last run  Tue 2026-10-27 21:00:23 CET
Notify    https://ntfy.sh/…
Log       journalctl -u fluxer-upgrade.service
Is there a specific reason for the 30min randomizer?
Comment by Hampus
HampusStaff 1 vote 5 replies
mostly so that not every instance hits the release check and the image registry at the same second, since a lot of people will keep the default 04:00. it spreads the runs over the next 30 minutes, so with --at 04:00 it runs sometime between 04:00 and 04:30, and only the systemd timer does this for now because of its builtin RandomizedDelaySec (haven't looked into how to do it for cron in a good way yet)
Comment by Ahryoo
Ahryoo OP1 vote 4 replies
Alright that makes sense to me, I totally get that. As for cron - I am by no means an expert, but couldn't you just put a random sleep in front of the command? Something like:
0 4 * * * root sleep $(shuf -i 0-1799 -n 1); rexctl upgrade --yes ...
Comment by NojuHD
NojuHD 1 vote 5 replies
couldn't you just use a cronjob?
Comment by Ahryoo
Ahryoo OP1 vote 4 replies
That is what I am doing. The cronjob is attached as .txt file. I added the wrapper around it to get notification for updates, failures and logs for those. And I still believe it would be a nice addition to rexctl to provide such things out-of-the-box.
Comment by Hampus
HampusStaff 3 votes 3 replies
I too think it would be nice if there was a command that installed a cronjob for you, will look into this eventually
Comment by Ahryoo
Ahryoo OP1 vote
Nice hearing from you! Just to add why I'd love an officially supported command: Me as the system admin would not have to check on my update script on a regular basis to see if it is still compatible with the newest version of rexctl. For example, I already had a wrapper for the install.sh (which was a lot more complicated than this version with rexctl - so huge thanks for the improvements here!) which stopped working a few days ago with the change to rexctl. With an update option it could be a lot more set-and-forget. Cheers, big fan!