How to install RancherOS and Rancher (server)

This article will show you how to get started with Rancher and start it using RancherOS.

I’m going to assume you have a nice Macbook with VirtualBox and Docker Machine installed.

Step 1: Create a RancherOS machine

As described on the RancherOS Quick Start Guide you can use the following command to make docker-machine spin up a VirtualBox machine running RancherOS.

docker-machine create -d virtualbox --virtualbox-boot2docker-url rancheros

The last rancheros part is the machine name we’re using in this example.

Next, running docker-machine ls should give something like:

$ docker-machine ls
NAME        ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
rancheros   -        virtualbox   Running   tcp://           v1.12.1

You should be able to ssh into this machine using docker-machine ssh rancheros.

Step 2: Launch a Rancher server

Now we want to launch Rancher on this new RancherOS server. We do this by starting a Docker container of the rancher/server image.

$ docker-machine ssh rancheros
[[email protected] ~]$ sudo docker run -d --restart=always -p 8080:8080 rancher/server

Pointing your browser to port 8080 on the IP shown in the docker-machine ls command (in our case should give you the nice GUI. Or use the docker-machine ip command to find out your rancheros virtual machine IP.

$ docker-machine ip rancheros
$ open

NOTE: If Rancher server does not seem to start you might need to increase the VM memory size.