<p>I have restarted the rancher host a few times while configuring rancher.</p>

<p>Nothing was lost, even though containers had been started and stopped several times during these reboots.</p>

<p>I had to stop and run the container again to set a specific IP for the UI, so I could use the other IP addresses available in the host as HostPorts for containers.</p>

<p>This is the command I had to execute again:</p>

<pre><code>docker run -d --restart=unless-stopped -p 1.2.3.4:80:80 -p 1.2.3.4:443:443 rancher/rancher
</code></pre>

<p>After running this, rancher started up as a clean installation, asking me for password, to setup a cluster, and do everything from scratch, even though I see a lot of containers running.</p>

<p>I tried rerunning the command that rancher showed on the first installation (including the old token and ca-checksum). Still nothing.</p>

<p>Why is this happening? Is there a way to restore the data, or should I do the configuration and container creation again?</p>

<p>What is the proper way of cleaning up, if I need to start from scratch? docker rm all containers and do the setup again?</p>

<p><strong>UPDATE</strong></p>

<p>I just found some information from another member in a related question, because this problem happened following a suggestion from another user.</p>

<p>Apparently there is an upgrade process that needs to be followed, but I am missing what needs to be done exactly. I can see my old, stopped container here: <a href="https://snag.gy/h2sSpH.jpg" rel="nofollow noreferrer">https://snag.gy/h2sSpH.jpg</a></p>

<p>I believe I need to do something with that container so the new rancher container becomes online with the previous data.</p>

<p>Should I be running this?</p>

<p><code>docker run -d --volumes-from stoic_newton --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:latest</code></p>

Miguel Mesquita Alfaiate
<p>Ok, I can confirm that this process works.</p>

<p>I have followed the guide here: <a href="https://rancher.com/docs/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/#completing-the-upgrade" rel="nofollow noreferrer">https://rancher.com/docs/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/#completing-the-upgrade</a></p>

<p>I just add to stop the new rancher container which was lacking the data, copy if from the original docker container to create a backup, and then restart the new container with the volumes from the data container which was created in the process.</p>

<p>I could probably have launched the new rancher container with the volumes from the old rancher container, but I preferred playing it safe and following every step of the guide, and as a plus I ended up with a backup :)</p>
