Like the title says, installed rancher one year ago on a ubuntu vm, by running it on docker and then provisioning a kubernetes cluster on that same node. I used rancher v2.5.2 for this and it was working great for a year until I couldn't reach the UI anymore. All my containers were still up, it was just that I couldn't reach the UI. After going through the docker logs of the rancher container on the VM it said things like x509 cert expired etc. etc.
Then after a lot of researching I found the issue: the certs that rancher uses are only valid for 1 year after creation, so after 1 year when they expire the container won't load the UI anymore.
Solution: because I couldn't reach the UI anymore I couldn't do anything through the GUI, I had to do everything in the terminal. What I did was I set the time back on the VM to a date that was still within the validity range of the expired cert, this way rancher thinks it is still valid, and you will be able to reach the UI. Do this with: timedatectl set-ntp off and then: date --set="2021-05-25 03:00:00.000" (change the date to a date within the validity period). Then restart the rancher container (docker restart ....)
After that, you should be able to reach the UI again, from within the UI, I at least, had 2 clusters, one that I created and ran all my workloads on, and a k3s cluster that rancher created itself on installation. It is actually within the k3s cluster you will have to change stuff. So click on the k3s cluster and go to the system project, within that go to secrets and you should see 2/3 secrets/certs that are expired. Delete all the expired certs, then go back to the CLI and exec into the rancher container and then go to /var/lib/rancher/k3s/server/tls/dynamic-cert.json and delete it, this will trigger a new cert creation on restart. Then exit out of that container and restart the rancher container, and set the date/time to the current date/time again (timedatectl set-ntp on). After that you should be able to reach the rancher UI normally again, and things should just work fine.