[ The version of k3s bundled in the single-node Docker of Rancher v2.3.3 didn't contain the automatic rotation functionality, so we worked to manually rotate the certs.]
When ever license got expires, fail to access the Rancher URL. To get the Rancher URL back, You need to renew the certificate,So the process to rotate certificates in a single-node Docker install involves the following steps.
* Obtain the Rancher container ID:
docker ps # copy the ID of the rancher container
rancher_server_id=<rancher container ID>i.e., rancher_server_id=027ebfd6
* Use the following commands to move the current certificate, this is regenerated on the next start of the container.
docker exec -ti ${rancher_server_id} mv /var/lib/rancher/management-state/tls/localhost.crt /var/lib/rancher/management-state/tls/localhost.crt-bak
docker exec -ti ${rancher_server_id} mv /var/lib/rancher/management-state/tls/localhost.key /var/lib/rancher/management-state/tls/localhost.key-bak
docker exec -ti 027ebfd6 mv /var/lib/rancher/management-state/tls/bak.token-ca.key /var/lib/rancher/management-state/tls/token-ca.key
docker exec -ti 027ebfd6 mv /var/lib/rancher/management-state/tls/bak.token-ca.crt /var/lib/rancher/management-state/tls/token-ca.crt
docker exec -ti ${rancher_server_id} mv /var/lib/rancher/management-state/tls/localhost.key /var/lib/rancher/management-state/tls/localhost.key-bak
docker restart ${rancher_server_id}
Please note, I would highly encourage taking a backup of the Rancher container if you don't have a recent backup. * https://rancher.com/docs/rancher/v2.0-v2.4/en/backups/backup/docker-backups/
Reference GitHub issue: << https://github.com/rancher/rancher/issues/26984#issue-614566390>> &&& Doc: