Portainer: Manage Your Docker Containers Without Squinting at docker ps

At some point you have five containers running and `docker ps` stops being useful, it just shows you five lines of truncated IDs you have to squint at. Portainer fixes that: a web UI where you can see, start, stop, and deploy containers without touching the CLI. Your terminal habits do not go away, they just stop being mandatory.

What you get

  • Start, stop, and restart containers with a click instead of remembering the container name
  • Live logs and resource usage per container, no more docker stats in a cramped terminal window
  • Deploy an entire stack by pasting a Compose file straight into the browser
  • Pull, prune, and manage images without typing docker image prune -a and hoping you remembered the flag right

Deploy it (one command)

docker run -d -p 9000:9000 --name portainer --restart unless-stopped 
  -v /var/run/docker.sock:/var/run/docker.sock 
  -v portainer_data:/data 
  portainer/portainer-ce:latest

That socket mount is doing the heavy lifting: it’s how Portainer talks to Docker itself. It also means Portainer has full control over your containers, so this is not something you expose to the open internet without a second thought.

The first login gotcha

Open http://your-server-ip:9000 within about 5 minutes of starting the container. Portainer locks the setup screen after a short window, and if you miss it, the fix is deleting the portainer_data volume and starting over. Set your admin username and password the moment it loads, do not go make coffee first.

Deploying a stack from the UI

Go to Stacks, Add stack, and paste the same docker-compose.yaml you’d normally run with docker compose up. Portainer parses it, shows you what it’s about to create, and deploys it. No SSH session required for routine updates after that, just edit the stack in the browser and redeploy.

Volumes you create through Portainer’s UI still behave like normal Docker volumes. If you’re migrating an existing stack, point it at the same volume names and your data comes with it.

Is it worth it?

If you’re running two containers, probably not, the CLI is faster once you know it. If you’re running eight, or you want to check on your homelab from your phone without SSH, yes. It’s not replacing Compose files, it’s just giving you a second, friendlier way to use them.

Do not expose port 9000 directly to the internet

Worth stating plainly: because Portainer has full control over the Docker socket, anyone who gets into it can effectively do anything on your host. Fine on your local network behind your router’s firewall, not fine port-forwarded straight to the internet with just a password between it and anyone who finds it. If you want remote access, put it behind a reverse proxy (Nginx Proxy Manager or Caddy both work well) with HTTPS and, ideally, an extra authentication layer in front of it.

Users and access, if more than one person touches this

Portainer supports multiple users with different roles, useful the moment more than one person in the house or team needs access. Under Settings, Users, you can create accounts and assign them to Teams, then restrict which stacks or environments each team can see and modify. For a solo homelab this is overkill, but it’s the first thing worth setting up if you ever add a second admin, rather than sharing one login.

“Permission denied” connecting to the Docker socket

If Portainer’s container starts but the dashboard shows no containers or errors out on the Docker environment, the socket mount probably didn’t attach correctly. Confirm with:

docker exec portainer ls -la /var/run/docker.sock

If that file isn’t there, double-check the -v /var/run/docker.sock:/var/run/docker.sock flag was actually included when you ran the container, a surprisingly common copy-paste casualty when people trim down the run command.

Related reading

Similar Posts