{"id":3213,"date":"2018-04-03T14:29:17","date_gmt":"2018-04-03T10:29:17","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/debian-rancher-docker-container-manager\/"},"modified":"2018-04-03T14:29:17","modified_gmt":"2018-04-03T10:29:17","slug":"how-to-install-rancher-docker-container-manager-on-debian","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-rancher-docker-container-manager-on-debian\/","title":{"rendered":"How to Install Rancher Docker Container Manager on Debian"},"content":{"rendered":"<p>Rancher is a free and open source project that provides a management platform for Docker containers. Rancher allows us to operate Docker in production at large scale. Rancher comes with modular infrastructure services such as multi-host networking, global and local load balancing, monitoring, recovering and volume snapshots.<\/p>\n<p>In this tutorial, we will learn how to install Rancher on Debian 9.<\/p>\n<h2 id=\"requirements\">Requirements<\/h2>\n<ul>\n<li>A server running Debian 9.<\/li>\n<li>A non-root user with sudo privileges.<\/li>\n<\/ul>\n<h2 id=\"getting-started\">Getting Started<\/h2>\n<p>Before starting, it is recommended to update your APT repository to the latest version. You can do this with the following command.<\/p>\n<p class=\"command\">sudo apt-get update -y<br \/>sudo apt-get upgrade -y<\/p>\n<p>Next, restart the system to apply all the changes. Next, install required packages with the following command:<\/p>\n<p class=\"command\">sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y<\/p>\n<p>Once all the required packages are installed, you can proceed to the next step.<\/p>\n<h2 id=\"install-docker\">Install Docker<\/h2>\n<p>Rancher is based on Docker, so you will need to install Docker to your system. By default, the latest version of the Docker is not available in Debian 9 repository. So you will need to add the Docker repository to your system.<\/p>\n<p>First, download and add the GPG key using the following command:<\/p>\n<p class=\"command\">curl -fsSL https:\/\/download.docker.com\/linux\/debian\/gpg | sudo apt-key add &#8211;<\/p>\n<p>Next, add the Docker repository using the following command:<\/p>\n<p class=\"command\">echo &#8220;deb [arch=amd64] https:\/\/download.docker.com\/linux\/debian $(lsb_release -cs) stable&#8221; | sudo tee -a \/etc\/apt\/sources.list.d\/docker.list<\/p>\n<p>Next, update the apt database with the following command:<\/p>\n<p class=\"command\">sudo apt-get update -y<\/p>\n<p>Finally, install Docker by running the following command:<\/p>\n<p class=\"command\">sudo apt-get install docker-ce -y<\/p>\n<p>Once the Docker is installed, you can verify it with the following command:<\/p>\n<h2 id=\"install-rancher\">Install Rancher<\/h2>\n<p>Docker is now up and running, it&#8217;s time to install Rancher.<\/p>\n<p>You can launch Rancher server with the following command:<\/p>\n<p class=\"command\">sudo docker run -d &#8211;restart=unless-stopped -p 8080:8080 rancher\/server:stable<\/p>\n<p>The above command will take a couple of minutes for Rancher server to start up. Once the Rancher image is downloaded and started successfully, you should see the following output:<\/p>\n<pre>stable: Pulling from rancher\/server&#13;\nbae382666908: Pull complete &#13;\n29ede3c02ff2: Pull complete &#13;\nda4e69f33106: Pull complete &#13;\n8d43e5f5d27f: Pull complete &#13;\nb0de1abb17d6: Pull complete &#13;\n422f47db4517: Pull complete &#13;\n79d37de643ce: Pull complete &#13;\n69d13e08a4fe: Pull complete &#13;\n2ddfd3c6a2b7: Pull complete &#13;\nbc433fed3823: Pull complete &#13;\nb82e188df556: Pull complete &#13;\ndae2802428a4: Pull complete &#13;\na6247572ea3c: Pull complete &#13;\n884c916ebae4: Pull complete &#13;\n85517c9c5365: Pull complete &#13;\n02dded9fe690: Pull complete &#13;\nfd9f433c3bc6: Pull complete &#13;\n44d91b3fea45: Pull complete &#13;\n0d463387dfeb: Pull complete &#13;\n60753c4d26f0: Pull complete &#13;\na003892966fe: Pull complete &#13;\nDigest: sha256:42441f0128fae4d72d51f92de2049392427d462356282a46f28434332967c7e4&#13;\nStatus: Downloaded newer image for rancher\/server:stable&#13;\ndd9b5fcfb019d233e8e269756c6cc790d8196c6e1711135a3a8fcb351e56cdd9&#13;\n<\/pre>\n<p>Now, open your web browser and type the URL <strong>http:\/\/your-server-ip:8080<\/strong>, you will be redirected to the Rancher admin page as shown below:<\/p>\n<p><a class=\"fancybox\" id=\"img-Page1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_rancher_on_debian_9\/big\/Page1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-rancher-docker-container-manager-on-debian.png\" alt=\"Open Rancher admin page\" width=\"550\" height=\"283\" title=\"\"><\/a><\/p>\n<p>Rancher doesn&#8217;t configure access control by default. To configure Access control, go to the ADMIN tab and click on the Access Control, you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Page2_1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_rancher_on_debian_9\/big\/Page2_1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-rancher-docker-container-manager-on-debian-1.png\" alt=\"Configure Rancher access control\" width=\"550\" height=\"201\" title=\"\"><\/a><\/p>\n<p><a class=\"fancybox\" id=\"img-Page2_2\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_rancher_on_debian_9\/big\/Page2_2.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-rancher-docker-container-manager-on-debian-2.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p>Here, click on the <strong>LOCAL<\/strong>, provide your Admin username and password, then click on the <strong>Enable Local Auth<\/strong> button, you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Page3\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_rancher_on_debian_9\/big\/Page3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-rancher-docker-container-manager-on-debian-3.png\" alt=\"Enable local auth in Rancher\" width=\"550\" height=\"284\" title=\"\"><\/a><\/p>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Rancher is a free and open source project that provides a management platform for Docker containers. Rancher allows us to operate Docker in production at large scale. Rancher comes with modular infrastructure services such as multi-host networking, global and local load balancing, monitoring, recovering and volume snapshots. In this tutorial, we will learn how to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-3213","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=3213"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3213\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=3213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=3213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=3213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}