In this tutorial, we will show you how to install Rancher on Ubuntu 16.04 LTS. For those of you who didn’t know, The rancher is an open-source program that helps you to run the containers in production. The rancher is based on Docker, which means it’s possible to run it on a dedicated box, KVM machine, or perhaps on an LXC container. Rancher provides a huge library of applications that are installed in a few clicks and also supports docker pictures from Dockerhub.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Rancher’s private container on a Ubuntu 16.04 (Xenial Xerus) server.
- A server running one of the following operating systems: Ubuntu 16.04 (Xenial Xerus)
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- An active internet connection.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Rancher on Ubuntu 16.04 LTS
Step 1. First, make sure that all your system packages are up-to-date by running the following
apt-get commands in the terminal.
sudo apt-get update sudo apt-get upgrade
Step 2. Installing Docker.
Before we install the Rancher server, we have to install the docker machine. If you do not have docker installed, you can follow our guide here.
Step 3. Installing Rancher.
On the Linux machine with Docker installed, the command to start a single instance of Rancher is simple:
docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable
Step 4. Accessing Rancher Web UI.
Rancher will be available on HTTP port 8080 by default. Open your favorite browser and navigate to
http://your-server-ip:8080 and complete the required steps to finish the installation.
*Rancher doesn’t configure access control by default, so it is important to set this up immediately, otherwise the UI and API can be accessed by anyone who has your IP.
Congratulations! You have successfully installed Rancher. Thanks for using this tutorial for installing the latest stable version of the Rancher private container on the Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Rancher website.