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).
The Portainer project
- The official Portainer site
- The Portainer source code at GitHub
- License: zlib (Community Edition) ❤️
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
Deploy Portainer
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
# podman 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:

FAQ
F/OSS Alternatives to Portainer
- Dockge with Docker
How to backUP Portainer
sudo fdisk -l #get the drive
sudo mkdir /mnt/external_500gb
sudo mount /dev/sda1 /mnt/external_500gb #mount the drive
mkdir /mnt/external_500gb/Z_SelfH_Backup/portainer_data/_data/
sudo cp -r /mnt/portainer_backup/var/lib/docker/volumes/portainer_data/_data/* /mnt/external_500gb/Z_SelfH_Backup/portainer_data/_data/
And to recover, just:
docker volume inspect portainer_data #see where the named volume is stored and use it as destination
sudo cp -r /mnt/data_ntfs_500/Z_SelfH_Backup/portainer_data/_data/* /var/lib/docker/volumes/portainer_data/_data/
Portainer CE vs Business Edition — what’s the difference?
Community Edition is free and unrestricted for personal use. Business Edition adds RBAC, audit logs, multi-cluster Kubernetes management, and external auth providers (LDAP, OAuth). For a home lab, Community Edition is more than enough. The container image is portainer/portainer-ce.
Can I use Portainer to manage remote Docker hosts?
Yes — that is one of its strongest features. Add an environment via the Portainer UI pointing at a remote host’s Docker socket (over TLS) or use the lightweight Portainer Agent on remote hosts. From a single UI you can manage stacks across every machine in your home lab.
Portainer vs Dockge — which to pick?
Dockge is a leaner, more modern stacks-only tool — perfect if all you want is to manage docker-compose files through a UI. Portainer covers more ground: containers, images, networks, volumes, registries, secrets, and remote endpoints. Pick Dockge for simplicity, Portainer for breadth.
How do I add a new service from the Portainer UI?
Go to Stacks → Add stack, paste a docker-compose snippet from any of the guides on this site (e.g. Uptime Kuma, Pi-hole, Nginx Proxy Manager), and hit Deploy. Portainer pulls the images and brings the stack up.
Does Portainer require root access?
The container needs access to the Docker socket (/var/run/docker.sock) to manage containers, which effectively grants root-equivalent control over the host. Run Portainer on a host you trust, and don’t expose its UI to the public internet without auth and HTTPS — put it behind Nginx Proxy Manager or a Cloudflare Tunnel.
Comments