Portainer Docker Guide
Why do you need Portainer
It will make your life easier when managing containers through an UI instead of the CLI.
And yes, Containers are a great way to start your SelfHosting Journey (Trust me you need them).
Portainer - Docker container
Not surprisingly, we can install Portainer with a Docker Container.
So we will install Docker and Portainer with CLI and then forget about it from that point, deploying new services with docker-compose files in the stack.
Docker - First steps
One recurrent topic that has to be addressed in the first place is to setup Docker in our machine.
Basically you will need to perform this in Linux (There is an equivalent for Windows or mac)
apt-get update && sudo apt-get upgrade && curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh && docker version
SelfHosting Portainer with Docker
We will be using one single command:
sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
Now you will be able to access Portainer interface on the port 9000 of your machine and manage containers from the UI. Also you will be able to deloy new ones with Stacks (using docker-compose on the interface).
This will be the user Setup page:
And then you can manage your containers with UI: