I’m thinking of auto-updating Discourse via cronjob. For example every two weeks in the night a cronjob with the following:
cd /var/discourse
./launcher rebuild app
Do you think this is safe to do? Or should I do this manually?
I’m thinking of auto-updating Discourse via cronjob. For example every two weeks in the night a cronjob with the following:
cd /var/discourse
./launcher rebuild app
Do you think this is safe to do? Or should I do this manually?
It’s possible that something will go wrong and you’ll leave your site broken. I recommend that you list attention when you do it.
Yeah. I was thinking of sending all the build output via mail, so I can check in the morning.
Personally, I do the exact same thing with my sites, but I use the two-container install in case the bootstrap fails.
Only if the bootstrap completes successfully does the old container stop and the new one start.
So far I have had no problems
As Jay said, in rare cases, an update can sheep issues (whether in Discourse itself or with plugins/components).
I’ve seen it happen a couple of times in a few years. It’s very rare, and fixes are made quickly, but because of this, I tend to get information on the updates (and check the bug category
) before rebuilding my instances. I often wait for a few days after a new version is officially released.
And do a ./launcher cleanup sometimes as well.
So, I prefer to update when I want and after gathering information. I have potential damage control, it’s safer.
Anything new about this in 2026?
I’d like to implement security updates asap (even at the risk of breaking a production site because of unattended update). Discourse doesn’t actually distinguish between security updates and other.. so I don’t mind just updating everything, every day. Is corn job still the way to go?
I personally wouldn’t do it. On the one hand, I don’t even need to update monthly for security fixes - which is to say, I read the release notes and make a decision. On the other hand, if you update daily, you’ll find more of the rare times when the thing will fail. You’ll have more downtime, for sure.
If you don’t mind that the cron job will sometimes kill the forum, until someone skilled comes to fix it, then sure, run the cron job. But bear in mind the skilled person might need to engage the developers here and wait some more hours until the thing is diagnosed and fixed.