Install Rancher OS – The Container Operating System

Chưa phân loại
Rancher OS is a container operating system. It is used to build a very lightweight Docker host that can run on very low spec hardware. It’s does not need much memory to run. Docker is preinstalled and preconfigured on Rancher OS. So, you don’t have to do anything other than installing Rancher OS on your machine. You can get started with Docker fast with Rancher OS.

In this article, I will show you how to install Rancher OS on your computer. I will be using a VMware virtual machine to show you how to install Rancher OS on your hard drive. But you can easily install it Bare-Metal (on real computers) with just a few changes that I think you will be able to figure out on your own. So, let’s get started.

System Requirements:

To install Rancher OS, you should have,

  • Working internet connection.
  • A computer or Virtual Machine with at least 2GB of RAM for installing Rancher OS.

Downloading Rancher OS:

You can download an ISO installer image of Rancher OS from the official GitHub repository of Rancher OS. To download the Racher OS ISO image, go to the official GitHub repository of Rancher OS at and navigate to the Latest release section.
Now, click on the rancheros.iso link as marked in the screenshot below.

Your browser may prompt you to save the Rancher OS ISO image. Click on Save File.

Your browser should start downloading Rancher OS ISO image.

Making Bootable USB of Rancher OS:

If you’re running Windows, then you can use Rufus to create a bootable USB thumb drive of Rancher OS. Rufus can be downloaded from the official website of Rufus at

It’s out of the scope of this article to show you how to make a bootable USB of Rancher OS using Rufus. But, you should be able to do it on your own. If you need any help, then you can read the following article at where I demonstrated the process of making a bootable USB thumb drive using Rufus.

  • Install Elementary OS 5 Juno (

If you’re using Linux, then you can use the dd command to make a bootable USB of Rancher OS as follows:

$ sudo dd if=~/Downloads/rancheros.iso of=/dev/sdX bs=1M

NOTE: Here, sdX is the USB thumb drive. You can find out what it is with the lsblk command.

Generating SSH Public and Private Keys:

Before you install Rancher OS on your computer or virtual machine, you have to generate SSH public and private key pairs on your computer from where you are planning to access Rancher OS. Because, by default, Rancher OS won’t let you login using password.

On Linux, you can generate SSH public and private key pairs with the following command:

$ ssh-keygen

Now, press <Enter> to continue.

Then, Press <Enter>.

Press <Enter> again.

SSH public and private key pairs should be generated.

If you’re using Windows, then you can also use GitBash (can be downloaded for free from to generate public and private SSH keys the same way.

You can use PuTTY to generate public and private key pairs on Windows. But it is out of the scope of this article to show you how.

Creating cloud-config.yml Configuration File:

Now, you have to create a cloud-config.yml configuration file. In this file, you have to add your public SSH key and the necessary details for configuring network on Rancher OS.

The format of the cloud-config.yml file is as follows. Make sure to change the configuration file depending on your specific setup.

dhcp: false
<Replace this with the contents of the `cat ~/.ssh/` command>

The output of the `cat ~/.ssh/` command in my case is as follows:

So, the final cloud-config.yml file in my case looks like this.

Booting Rancher OS from the ISO image:

Now, attach the ISO image on your virtual machine or insert the USB thumb drive on your computer and select it from the BIOS of your computer. Once you see the following window, press <Enter>.

As you can see, Rancher OS is booting.

After a while, you should be logged into Rancher OS as you can see in the screenshot below.

Installing Rancher OS on Hard Drive:

First, setup a password on Racher OS installer with the following command:

$ sudo passwd rancher

Now, type in a password and press <Enter>. The password doesn’t have to be secure as it’s an installer.

Now, retype the password and press <Enter>.

The password should be set.

Now, find out the IP address of the Rancher OS installer with the following command:

$ ip a

As you can see, the IP address in my case is It should be different in your case. Make sure you replace it with yours from now on.

Now, SFTP into your Rancher OS installer with the following command:

$ sftp rancher@

Now, type in yes and press <Enter>.

Now, type in the password that you just set and press <Enter>.

Now, you’re ready to transfer cloud-config.yml file to your Rancher OS installer from your computer.

As you can see, the cloud-config.yml file is available in the HOME directory of my computer.

To send it on the Rancher OS installer, just type in the following command:

sftp> put cloud-config.yml

Now, exit out of the SFTP session with the following command:

sftp> exit

Now, from the Rancher OS installer console, run the following command to install Rancher OS on your hard drive:

$ sudo ros install -c cloud-config.yml -d /dev/sda

Now, press y and then press <Enter>.

Rancher OS should be installed on your hard drive. Once it’s done, press y and then press <Enter> to reboot.

As you can see, Rancher OS booted from the hard drive and the network interface is configured correctly.

Now, you can SSH into Rancher OS as follows:

$ ssh rancher@

As you can see, I am connected and it didn’t prompt me for a password.

All the Docker commands are available on Rancher OS by default.

If you want to SSH into Rancher OS from any computer on your network, just setup a password with the following command as before:

$ sudo passwd rancher

Now, you should be able to SSH into your Rancher OS machine using user rancher and your password.

So, that’s how you install Rancher OS on your computer. Thanks for reading this article.

Sandclock IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, Sandclock IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to use Nmap automator

This tutorial focuses on NmapAutomator, a Linux shell script which automates Nmap scanning tasks.  NmapAutomator is an...

Install FreeBSD in VirtualBox

FreeBSD is probably one of the strongest competitors of Linux in the open source world. It powers Netflix, it is used by...

Install Slackware Linux Distribution

“Slackware Linux is the most ancient living Linux distribution, considered the first choice for real, or for old school,...
Bài Viết

Bài Viết Mới Cập Nhật

Hướng dẫn chuyển đổi windows server windows evaluation to standard và active windows server 2008 + 2012 + 2016 + 2019

How to Update Ubuntu Linux

Squid Proxy Manager cài đặt và quản lý Proxy Squid tự động trên ubuntu

Hướng dẫn cài đặt Apache CloudStack

Hướng dẫn ký file PDF bằng chữ ký số (chữ ký điện tử) và sửa lỗi mới nhất 2021 foxit reader