Skip to content
VDS · Docker and containers

Portainer: containers through the browser

How to install a web container management panel, why it’s convenient, and why you shouldn’t expose it to the internet without protection.

Updated August 23, 2026

Portainer is a web interface for Docker: a list of containers, logs, a console into a container, volumes, networks, and Compose stacks. It's handy when you don't want to SSH in every time just to “see what crashed”.

Installation

docker volume create portainer_data
docker run -d \
  --name portainer \
  --restart unless-stopped \
  -p 127.0.0.1:9443:9443 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:2.21.4

The port is bound to the local interface. You can open the panel through an SSH tunnel:

ssh -L 9443:127.0.0.1:9443 root@<machine-address>

Then open https://localhost:9443 in your browser. The certificate is self-signed, so the browser will warn you — that's normal when accessing it through a tunnel.

The first administrator is created by whoever opens the panel first. If you've exposed the port to the internet and gone off to have tea, the administrator won't be you. Portainer closes registration a few minutes after startup, but you shouldn't rely on that — create the account right away.

Why this is dangerous and what to do

The panel mounts /var/run/docker.sock. Access to this socket is equivalent to root on the machine: through it, you can start a container with the host root mounted. Hence the rules:

  • Don't expose the port to the internet. Either use an SSH tunnel or a web server with a certificate and two-factor authentication.
  • Make the administrator password long and unique, not the same as the machine's root password.
  • Give individual people separate accounts with limited rights, not a shared login.
  • If you rarely need the panel, keep the container stopped and start it when necessary: docker start portainer.

What's convenient about it

  • Logs with search and highlighting — faster than docker logs in an 80×24 text console.
  • A console into the container right in the browser.
  • Stacks — paste the contents of compose.yaml, click deploy. Good for one-off services, but for permanent ones it's better to keep the file on disk under version control: a stack created in the panel is easy to lose when you reinstall.
  • Volumes and images — you can see what takes up how much space; it helps when troubleshooting running out of space.

What you shouldn't do in it

  • Keep the only copy of your service definitions in it. compose.yaml files in a directory on disk will outlive the panel.
  • Update containers with the “recreate” button without understanding what will happen to the volumes. See updating containers.
  • Treat it as a replacement for monitoring. Portainer shows the current state, not history, and doesn't send alerts — for that you need Uptime Kuma.

Resources

The container uses about 100 MB of memory and runs on any tier. Data is stored in the portainer_data volume: accounts, settings, stacks. Include it in your backup or be prepared to set up the panel again.

Common mistakes

  • Forgetting that the panel manages only this machine. It can manage a second machine too, but that requires an agent on it and an open port between them.
  • Using the latest tag for the panel itself. A major update changes the data format. Pin the version.
  • Deleting an “unused” volume through cleanup. Portainer does warn you, but people click the button without reading. Volumes with databases look unused while the container is stopped — see volumes.