Friday, June 14, 2024

How To Install Portainer on Docker (Linux and Windows) + Tutorial Video


Hi sobat Kekasi, now we will learn How To Install Portainer on Docker. The Docker that sobat Kekasi installed already on Linux Operation System as well as Microsoft Windows. For sobat Kekasi who want to install Docker on Linux Centos can follow the tutorial How to Install Docker on Centos Using Repository because it is more easy and simple.

Before we go to the tutorial, we need to discuss a little bit about Portainer and why we use portainer

What Is Portainer?

Portainer is a light application, cross-platform, and UI open source for Docker management. Portainer giving detailed description about Docker and allow you to manage containers, docker image, network and each container volumes by a simple dashboard web.

Why We Use Portainer on Docker?

  1. Easy to use. Using portainer can make docker management more easier, because portainer giving such a detailed description about docker and allow you to manage containers, images, network, and volumes
  2. Easy to installed, because we already had the docker so doing the installation become easier. We just need to download portainer using docker with order “pull” on docker itself. We don’t need much times to do the installation on portainer
  3. Portainer made for docker. Portainer has been built to run on docker machines, so it can run anywhere the docker runs. It’s compatible with docker for Linux and docker for Windows.
  4. Adjustments to docker portainer versions have been designed to support everything features that docker’s API has to offer. The API docker would expand and propose a new feature, and portainer would adjust

How To Install Portainer on Docker (Linux)

Portainer is made by two elements which is Portainer Server and Portainer Agent. This two elements runs as a light docker container on docker’s machines. This document will help you to install portainer server container on your Linux environment. To add the new Linux environment to the portainer server installation, you need to:

  • The newest version of Docker is installed and working
  • Access sudo on the machine which will host your portable server
  • By default, Portainer server will expose UI by port 9443 and expose TCP tunnel server by port 8000. It is optional and only necessary if you are planning to use the edge computing feature with edge agent

The install guidelines also make the following assumptions about your environment:

  • You access the docker through a Unix socket, or you can also be connected through TCP
  • SELinux is disabled on the machines running the docker. If you need SELinux, you should continue flag-privileged to docker while deploy portainer
  • Docker runs as root. Portainer with Docker without root have some limitations, and need additional configuration.

So now we will start the tutorial How To Install Portainer on Docker Linux. Follow the step by step below:

Make sure docker is running, or else type order:

[root@localhost ~]#  sudo systemctl start docker

First, create a volume that portainer servers would use to store the database

[root@localhost ~]# docker volume create portainer_data
[root@localhost ~]#

Then, download and install portainer server container:

[root@localhost ~]# docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v
/var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

Portainer server has been installed. You can check to see if the portainer server container has started with running orders:

[root@localhost ~]# docker ps
CONTAINER ID   IMAGE                           COMMAND        CREATED              STATUS              PORTS                                                                                            NAMES
e8b6cec21061   portainer/portainer-ce:latest   "/portainer"   About a minute ago   Up About a minute>8000/tcp, :::8000->8000/tcp,>9443/tcp, :::9443->9443/tcp, 9000/tcp   portainer
[root@localhost ~]# 

Now after the installation is completed, you can enter to your instans portainer server by open the web browser and go to:


Change the localhost with IP address or relevant FQDN if needed, and adjust the port if you change before. For more information, pleas see Youtube channel by Kekasi Gen. Video YouTube How to Install Portainer on Docker Linux Enviroment

Tutorial Video

Watch on YouTube

Leave a Reply