In a previous post, I showed you how you can install HTPC Manager using Docker in order to aggregate your favorite services in a single web interface. Today, I will show you how you can install Portainer using Docker. Portainer is also a management user interface that allows you to easily manage your Docker host. Besides that, Portainer allows you to manage your Docker containers, images, volumes, networks and more, making the management of your Docker resources a breeze. While Kitematic for Windows, provides a Docker GUI on Windows, Portainer provides a web-interface that works on any platform.
Before you install Portainer using Docker, you can try out the public demo instance (login with the username demo and the password tryportainer) in order to check the functionality .
If you do not know what Docker is, be sure to read our What is Docker guide and comparison to VirtualBox in advance and get familiarized with the terms used. [Read: What is Usenet and why is it better than Torrents?]
Install Portainer using Docker
You can install Portainer using Docker in a new Docker container from scratch. But, ready-made containers are already available for several apps on Docker Hub. So all you need to do is pull those containers and install. If you are ready, open Docker command prompt and get ready to setup Portainer in Docker.
Recommended HTPC / Home Server Builds 2017
- Best Home Theater PC Build 2017 to do it all (Plex, Kodi, NAS, Gaming)
- Medium Budget 4K HTPC Build 2017 for Kodi, Plex and Gaming
- Cheap 4K HTPC Build for Kodi, OpenELEC, and LibreELEC 2017
- Low Power Home Server Build 2017 for Network File and Media Storage
- Best HTPC for Kodi with 4K on a Medium Budget 2017 (~$400)
- Energy efficient budget HTPC-NAS combo build 2016
1. Portainer Pull Command
To install Portainer using Docker, you will first need to grab the latest version of Portainer container from the Portainer Docker Hub. This is the official Docker image for Portainer.
docker pull portainer/portainer
Pull the ready-made Portainer docker container using the above command.
2. Set Portainer Configuration Parameters in Docker
After pulling the container with the latest version of Portainer, we need to configure the usage parameters such as download folders, port number, etc. for the service. Copy all lines in the code block below (it is one single command) and paste it into docker prompt.
sudo docker create --name=portainer \ --restart=always \ -v /home/docker/portainer/data:/data \ -v /var/run/docker.sock:/var/run/docker.sock \ -e PGID=1001 -e PUID=1001 \ -e TZ=Europe/London \ -p 9000:9000 \ portainer/portainer
While you can just copy and paste the settings mentioned above, I recommend that you understand each parameter using the description below and customize it to your liking, in order to setup Portainer in Docker. Therefore, before issuing the above docker command, change certain parameters (eg. port number, folders, etc.) to fit your situation.
sudo docker create --name=portainer \– Creates a new docker container with the name “portainer”
--restart=always \– Starts the Portainer container automatically during boot. If you don’t want the container to be started automatically, you can skip this command.
-v /home/docker/portainer/data:/data \– Specifies the location of the portainer config files. In this case, the config folder is located in /home/docker/portainer/ directory.
-v /var/run/docker.sock:/var/run/docker.sock \– Specifies the location of the Docker connection. In this case, the config folder is located in /var/run/docker.sock.
-e PGID=1001 -e PUID=1001 \– Specifies the user id in order to minimize permission issues that can arise between the host OS (Ubuntu) and the container.
-e TZ=Europe/London \– Specifies the timezone information. You can check your timezone by following this link.
-p 9000:9000 \– Specifies the ports used by portainer . In this case, the port is 9000:9000.
3. Start and Stop Portainer Container in Docker
If you used the correct parameters, you can go ahead and start the Portainer container you have just created, using the following command.
sudo docker start portainer
After starting the Portainer Docker container, you will be able to open the web interface on port 9000. In my case the ip is
Please note that before getting to the Homepage, you will be asked to setup the password for admin user. Make sure you use a strong password.
Portainer is now installed in Docker. What to do next?
Congratulations! You managed to setup Portainer in Docker successfully. Once Portainer for Docker is setup, it is extremely simple to manage your docker containers. If you want to be able to access the Portainer interface outside your home network, be sure to setup port forwarding on your router. You will have to forward the Portainer port to the local/internal IP address of the system with Docker installation.
Next you can learn how to Install RuTorrent using Docker, a uTorrent-like BitTorrent Client with improved functionality and speeds. Check back soon to learn more about Docker and how you can install various other services in Docker containers.