{"id":3180,"date":"2020-04-04T14:15:53","date_gmt":"2020-04-04T19:15:53","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3180"},"modified":"2020-04-04T14:22:36","modified_gmt":"2020-04-04T19:22:36","slug":"installing-unifi-controller-in-docker-container","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/installing-unifi-controller-in-docker-container\/","title":{"rendered":"Installing UniFi controller in Docker Container"},"content":{"rendered":"\n<p>Instructions followed from <a href=\"https:\/\/miketabor.com\/running-ubiquiti-unifi-controller-in-docker-on-synology-nas\/\">here<\/a>.  Some changes were made<br>Commands work on Ubuntu 16.04<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install Docker<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install -y docker docker.io\nsystemctl enable docker\nsystemctl start docker<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install UniFi<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo docker pull jacobalberty\/unifi:latest<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Setup Docker Image<\/h2>\n\n\n\n<p>The following command sets up a container which we can later manipulate to start and stop the &#8220;service&#8221;<br>You can specify where you want the UniFi files to reside if desired.  <br><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo docker run -d --init --restart=unless-stopped --name=unifi-controller --net=host --volume=\/docker\/unifi:\/var\/lib\/unifi -p 8080:8080\/tcp -p 8081:8081\/tcp -p 8443:8443\/tcp -p 8843:8843\/tcp -p 8880:8880\/tcp -p 8883:8883\/tcp -p 3478:3478\/udp jacobalberty\/unifi:latest<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Docker commands<\/strong><\/h2>\n\n\n\n<p>List docker containers<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo docker container list\n367c7a1465ec        jacobalberty\/unifi:latest   \"\/usr\/loca\/bin\/dock\u2026\" 15 minutes ago      Up 14 minutes (healthy) unifi-controller<\/pre>\n\n\n\n<p>List docker images on system<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo docker images<br>jacobalberty\/unifi   latest              baebbe301633        9 days ago          711MB<\/pre>\n\n\n\n<p>Stop container.  Also stops the UniFi service.  Change the ID to your container ID.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo docker stop 367c7a1465ec<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Other notes<\/h2>\n\n\n\n<p>When setting up the Docker image, the directory specified was &#8220;\/docker\/unifi&#8221; so all the UniFi files are in there and it looks like if you manipulate the files, it makes the changes fine.  At least for setting up the SSL certificates.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Instructions followed from here. Some changes were madeCommands work on Ubuntu 16.04 Install Docker sudo apt install -y docker docker.io systemctl enable docker systemctl start docker Install UniFi sudo docker pull jacobalberty\/unifi:latest Setup Docker Image The following command sets up &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/installing-unifi-controller-in-docker-container\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129],"tags":[246,417,131,132,188],"class_list":["post-3180","post","type-post","status-publish","format-standard","hentry","category-ubiquiti","tag-docker","tag-install","tag-ubiquiti-2","tag-ubnt","tag-unifi"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3180"}],"version-history":[{"count":6,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3180\/revisions"}],"predecessor-version":[{"id":3192,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3180\/revisions\/3192"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}