Installing Portainer: Your Docker Control Center

Portainer in Proxmox LXC!

Harish Thangadurai
5 min readNov 26, 2023

In our previous exploration, we delved into the step-by-step process of installing docker and docker-compose in a Proxmox LXC that we created.

In this article, let’s spotlight Portainer — an exceptional tool designed for easier management of docker containers. This will be the first service that we will be deploying in our Home Lab.

Portainer is an open-source management tool for containerized applications. It provides a user-friendly web interface that simplifies the deployment, management, and monitoring of Docker containers.

Usually, when we use docker, we would use the terminal to type in the docker commands and manage our containers. Portainer provides a GUI in which we can manage our containers easily and effectively without depending on the command line.

Portainer itself runs as a docker container and provides a Web UI for us to manage our containers, images, volumes, networks, and more without the need for complex command-line commands. Users can easily deploy, start, stop, and manage docker containers through the Portainer interface.

Overall, Portainer provides a GUI for docker and docker-compose to make containerized applications more easily accessible. It will be more helpful for users who may not be familiar with the docker commands.

Steps to install Portainer:

  • First, we need to log in to the LXC which we created earlier in our Home Lab. We can log in either via SSH or using the Proxmox Console.
  • After logging in, now we need to create a docker volume which the portainer will use to store its database.
sudo docker volume create portainer_data
  • Now we can download and install the portainer server.
sudo 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

Note: By default, Portainer generates and uses a self-signed SSL certificate to secure port 9443 and runs on the same port. If we need to run it on HTTP instead of HTTPS then we need to add port 9000 in our command.

  • We have now successfully installed Portainer. We can check the same by running the below command.
sudo docker ps

We can see that the portainer has been successfully installed and the container has started running.

Configuring Portainer:

  • We can log in to our portainer using the IP of the LXC followed the port 9443 (HTTPS) or 9000 (HTTP). The format would be IP:9443
  • The browser would throw a certificate warning as we are accessing the portainer using the HTTPS and the portainer uses a self-signed certificate by default. We can accept the risk and continue as it is not an issue or a security concern.
  • We can type in our username and password for our portainer instance and create the first administrator user. Upon creating the user we will be greeted with the below screen after successfully logging in with the newly created user.
  • We can select the first option here so that we will be able to connect to the docker instance which is currently running on the LXC locally where the current portainer instance is also running.
  • Now we can see the local docker instance. We can click on it to view it in detail.
  • We can notice here that there are 2 images and 2 corresponding containers. 1 container is running and 1 is stopped. Also, there are 3 networks and 1 volume.
  • Upon clicking the respective options we can see the images, containers, volumes, or networks in detail. I’ll click on the containers here to view it in detail
  • Here we can see that the first container is the hello-world container that we ran just after we installed docker and docker-compose to check if docker is working as expected.
  • The second container that is running is the actual portainer instance that we just installed and are currently using.

Here we can manage our containers easily. We can see the logs of all the containers easily and can also start, stop, remove, restart, or even add new containers.

In this article, we have explored an intro about Portainer and have successfully deployed the same in our Home Lab. Using Portainer we can now easily manage and deploy all our services in our Home Lab.

In the next article, we will be delving into other services that we will be deploying further in our Home Lab. Stay tuned for more detailed instructions on expanding our Home Labbing capabilities.

Happy Homelabbing!!!

--

--

Harish Thangadurai

👨‍💻 Software Engineer | 🌍Tech Explorer | 🧠 Lifelong Learner