Install Rancher with Docker

What is Rancher ?

Rancher Labs is a software company working on operating-system-level virtualization tools, more commonly known as Linux Containers. Founded in 2014, Rancher Labs introduced two main tools: Rancher, a container management platform for Docker container systems, and RancherOS, a Linux operating system distribution simplified to host containers. [1]

What is kubernetes ?

Kubernetes (commonly stylized as k8s) is an open-source container-orchestration system for automating application deployment, scaling, and management. It was originally designed by Google, and is now maintained by the Cloud Native Computing Foundation. It aims to provide a "platform for automating deployment, scaling, and operations of application containers across clusters of hosts".
It works with a range of container tools, including Docker. Many cloud services offer a Kubernetes-based platform or infrastructure as a service (PaaS or IaaS) on which Kubernetes can be deployed as a platform-providing service. Many vendors also provide their own branded Kubernetes distributions. [2]

This article describes how to install a Rancher server with docker in a host machine (virtual or physical).


Before starting you need to have Docker installed on your host machine. Take a look at this article to see how to install Docker Community Edition.


Initialize the $RANCHER_DATA container volume name.
$ RANCHER_DATA="homelab-rancher-data"

Create the volume that will be mounted by the Rancher container to hold the server data.
$ sudo docker volume create --name $RANCHER_DATA

Start the rancher server container with the created volume, and expose the http/https ports.
$ sudo docker run -d --restart=unless-stopped -v $RANCHER_DATA:/var/lib/rancher --name=homelab-rancher -p 80:80 -p 443:443 rancher/rancher

Test the connection

First, make sure that your firewall (if you have one in your network) authorize the ports 80 and 443 with tcp protocol.
Open this link in your browser : https://your-host-ip

Here we go, your rancher server is installed, change your admin password and enjoy !

  • [1]
  • [2]


Posts les plus consultés de ce blog

How to increase Pods limit per worker node in Kubernetes

Knative vs OpenFaaS: What are the differences?

How to Create a personal cloud at home using Openstack