Determining whether my VPS needs any upgrades (generally)

Continuing the discussion from Upgrade failed spectacularily:

What is the best way to check whether my VPS needs any upgrades, before performing a Discourse update? Thanks.

3 Likes

From the top of my head, I think you can upgrade it when your OS version is out of date, or when Docker is out of date?

1 Like

If you’re running Ubuntu LTS (typically the recommended Distro for Discourse). Each free version edition from my understanding has a 5 year support cycle.

Source

So from my understanding from the list if you’re running 18.04 or 20.04 you should look into upgrading the OS. If 18.04 is definite and with 20.04 support ending in April should consider doing it as well

The other component would be to look into Docker Version compatibility. This part I honestly am not sure of. Though at a guess I think Ubuntu 22.04 LTS might support the latest Docker Discourse requires but would need someone with stronger knowledge to weigh in. However maybe a search on Meta here might also have this info.

1 Like

Discourse 3.4 is looking for Docker 24.0.7 min

It looks like from Google search that Ubuntu 22.04 LTS supports it.

It is of course also supported in latest Ubuntu 24 LTS… It looks like it is also supported on Ubuntu 20.04 LTS but imho one should consider upgrading as this LTS support is ending in April 2025; however in theory should be safe, if you need more time before upgrading the OS

Do you know what version your OS is? I am presuming you are running an Ubuntu LTS.

My docker version (20.10.21) is earlier than that and my Discourse version is 3.4.0.beta4-dev. Discourse is telling me to upgrade now to 3.4.0.beta4 – “A critical update is available. Please update!”

Two questions:

  1. Are the requirements stated in release notes anywhere? I’ve always skimmed the announcements posts but haven’t noticed Docker or Ubuntu requirements stated.

  2. I guess I should update to Ubuntu 24.04 and whatever Docker version comes with that, before upgrading Discourse again. Does that sound right?

Thanks.

Do you mean “can’t”? I guess so.

Do you mean the upgrade script would end gracefully if the requirements aren’t met, without messing up my forum?

I’ve just noticed at discourse_docker/launcher at main · discourse/discourse_docker · GitHub

docker_min_version='20.10.0'
docker_rec_version='24.0.7'

So maybe I’m all right for now. I hope that you were wrong about 24.0.7 – but maybe I’m looking in the wrong place myself. Could you please check and confirm? I would be grateful. Thanks.

1 Like

The Docker requirement for Discourse 3.4, I pulled that from a topic with a failed command line upgrade topic. Where a Jay from the topic you quoted I believe mentioned there or another topic. Where he mentioned Docker needed to be upgraded based on the log provided. The log states Docker needed to be at the min version I mentioned.

They likely are but I am not always great at reading over them fully if I am being honest. Will try a search here and see.

If your Ubuntu LTS is version 18.04 then definitely. If it is Ubuntu 20.04 LTS as mentioned. I believe you can manually upgrade it via the command line. From what I recall there is a topic on Upgrading Docker. The Docker Documentation I linked I believe should have instructions on how to upgrade. But would recommend seeing if there is a topic in case there might be recommended steps to follow first.

Keep in mind I am still learning a lot things as well with Discourse. Folks like Jay, Robert(Merrifield) are just a couple of the folks with far more experience and understanding on these types of topics.

The main step though is to make sure you make a backup. Imho make a server snapshot and a Discourse backup. Server backup with planned downtime announced can be good as you can load your snapshot to before the upgrade. I imagine even a Discourse backup likely works well.

1 Like

Not sure. As was only going by posts with shared logs

But here is a guide from Documentation that maybe if help.

If I drew a flowchart to answer, the first question would be something like

Do all of the following apply? If so, proceed according to your experience. If not, be sure to be on the latest LTS, so long as it is at least a month old.

  • I am an experienced sysadmin
  • I have a recent backup in a safe place and I am very confident I can restore it
  • I know how to perform a command line upgrade
  • I know how to find and quote the relevant parts of the log when reporting a problem here on meta.

Check your current OS version by reading /etc/lsb-release

root# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"

It should be recently updated, should be an LTS, should not be much more than 2 years old. The first two digits are the year number. But don’t trust an LTS that is less than a month old.

3 Likes

I would spin up a new VM and move to it as described at Move a Discourse site to another VPS with rsync. If you don’t mind a bunch of downtime and the possibility that it’ll wreck you system, you can try to do multiple dist-upgrades. If you do that, you should make a snapshot (which also incurs downtime) so that you can restore to it.

1 Like

I think moving from 18.04 to 20.04 I just did it on the same server. Probably following something like How to upgrade your Ubuntu release - Ubuntu Server documentation. I’m not 100% sure. What’s your view on that?

There’s a possible side-benefit to migrating rather than upgrading in place: you might be able to get a better value offering. In my case, switching from x86 to ARM got me a config with more storage for the same price, even with the same hosting service. There’s also the possibility of changing to a different hosting service, which I also did in another case, again getting a better deal.

2 Likes

With Hetzner, ARM servers are slightly less expensive than x86 for the same specs (vCPU, RAM, storage).

Notably, they seem to be faster (Discourse rebuild speed and page loading).

Sadly there’s no benchmarking for Discourse, but I recently did a build time comparison:

Provider Price Disk CPU GB RAM Build time Data Centers
Hetzner CX22 (x86) €3.95 40GB 2 4 9m56s DE, FI, SG, US (2)
Hetzner CAX11 (arm64) €3.95 40GB 2 4 5m45s DE, FI

Be aware that there’s no official ARM-compatible mail-receiver image.

See:

4 Likes

5 minutes for a rebuild? Wow, it takes ~2-3 hours for me.

I’m on the lowest Digital Ocean droplet that has 2GB memory and I reckon it takes about 10 minutes.

1 Like

That’s not “Google Search”. It’s Gemini. I’d be wary of AI output that talks about specific version numbers and compatible versions as LLMs are not that great with handling such details. But if you can find any definitive source that would help.

This is what I get, different:

:man_shrugging:

2 Likes

Off topic but is has some benefits when living in EU :joy:

3 Likes

Thanks good catch. Though the Docker Documentation link I also posted did confirm that Gemini output seems to have been correct. However thanks for the tip. Will definitely be careful of the AI output from now on

:beers::sunglasses::+1::sparkles:

2 Likes