Now that we have a way of running Docker Containers in our Proxmox environment, we can start running some fun and interesting services and apps. Whether you are running Docker via an LXC Container, or running Docker on a dedicated VM, the steps from now on will stay the same. The choice of which to use is entirely up to you, based on the differences of an LXC container and a VM in Proxmox. If you are following along with our Build Your Own Homelab series, you will know we try to make each step as easy as possible for users of any experience levels to follow along. With this in mind, we have to get a way to make Starting and Running Docker Containers easier. That is where Portainer comes in.
What is Portainer
Portainer.io is a lightweight, open-source container management platform designed to simplify the deployment, monitoring, and maintenance of containerized applications. It provides an easy-to-use web interface for managing Docker, Kubernetes, and other container environments without needing complex command-line interactions. Portainer allows users to create, configure, and monitor containers, networks, and volumes, making it ideal for both beginners and experienced developers. Whether running on a single server or in a large-scale orchestration setup, Portainer streamlines container management, helping users deploy applications efficiently and securely. So let’s get Portainer up and running in our Homelab
Step 1: Get the install script for Portainer.
First up we need to get the correct installation instructions for Portainer. Portainer runs as a Docker container, but because it will simplify the creation of Docker containers, this time will be the only time that we really need to run a Docker command in the command line. Because there are so many install options, we need to make sure to get the correct one, as well as get the latest install commands. For this, we will need to go to https://portainer.io. You will see there are quite a bit of mention of pricing and subscription models, but don’t worry, we are going to use the Community Edition (CE) which is free. From the homepage, navigate the top menu to Resources, and then under Connect, click on Install. We will be provided with the choice of installing the Business Edition (BE) or Community Cdition (CE). Select the community edition as we want the free version for our home lab.
The next page will give us the options of installing a new Portainer CE Server Installation or to Add an environment to an existing installation. We only need one server installation which we can then connect to multiple hosts running Docker to manage all of them. Seeing as we don’t have a server yet, we need to select the first option. Should we ever create more LXC containers or VM’s that run docker, we can select the second option to install the Portainer service so that we can monitor all our Docker hosts from one Portainer server location.
The next screen will prompt us which type of Docker installation we have. Select Docker Standalone.
We now need to select the operating system we are using Docker on. In our case for Proxmox (both the LXC and/or VM route) we are running Linux, so select Install Portainer CE with Docker on Linux.
Finally we get to the install instructions. It might be worthwhile reading the Introduction part of the document as it might contain information related to your install.
Step 2: Create a new Portainer Container
First, we need to access our Docker host. So we will need to access our Proxmox installation. Open your web browser and go to your Proxmox URL. Log in and once logged in, in the left navigation pane, expand Datacenter, then expand the Proxmox node running Docker and select the Docker host. Depending on if it is a VM or LXC Container, in the middle navigation pane, either select
or
. Once in the console, it is as easy as running the following commands:
docker volume create portainer_data
This will create a new volume for Docker to store data. Once the volume is created, just run
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:lts
The install will start and be fairly quick. This is one of the amazing things of Docker, it is reallyfast to get services up and running. Anyway, once the installation is complete, you will see a container id, like fa76fbcb5dde3d6765fbb98c2d3d380aae45d52982f6dc6a84283e753b4d47cb in our case. TO make sure that Portainer is running, you can run the normal Docker command to check:
docker ps
And that is all there is to it. We now have Portainer up and running that we can access at port 9443 on the IP Address of the docker host, in our screenshots it will be: 192.168.1.18:9443
Step 3: Access Portainer
The last step will be to access Portainer so that we can select a default password. It happens from time to time that Portainer will shut itself down (for security reasons) if a user takes too long to access it before a default password is set. If this is the case, just reboot your Docker LXC or VM in Proxmox, this is the quickest (expecially if you have no other containers, like we have). Once done, go to the IP address of the Docker host, on port 9443, running https, in the screenshots: https:192.168.1.18:9443. Your browser will probably give you some warning about the security certificate, we can just ignore the warnings for now. We will get a proper reserve proxy set up in our NGINX config after we also installed Watchtower.
Once on the Portainer screen, you can select a new password for the Admin user. Once logged in, you will see a notification that the local Docker envirnment has already been added. You are welcome to poke around a bit, we are going to use Portainer extensively for our future Docker Container Installs.
Conclusion
We now have a graphical way of getting Docker Containers up and running. This can be easier for most users, however, we will also have the alternative command line installs available for all our services and apps we are going to install. Portainer will make the install a lot easier and less messy for the majority of users and installs, so we have it up and running to make our future installs quicker and easier. Now we just need a way to update our Docker Containers, so let’s have a look at that next.



















