Portainer — Docker Web UI

Portainer is a container management UI that runs inside Docker and manages Docker from a browser. Instead of memorizing docker run flags, docker ps -a, and docker inspect output, Portainer gives you a visual interface for everything: start/stop containers, view logs, check resource usage, manage volumes and networks, deploy Compose stacks, and pull images. The Community Edition (CE) is free and covers everything a home server or development machine needs.

Portainer itself runs in a container and listens on port 9000 (HTTP) or 9443 (HTTPS). You access it from a browser on the same machine or from anywhere on your network.

Portainer UI: localhost:9000

Install Portainer CE

# Create persistent data volume
docker volume create portainer_data

# Install Portainer Community Edition
docker run -d \
  --name portainer \
  --restart=always \
  -p 8000:8000 \
  -p 9443:9443 \
  -p 9000:9000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:latest

Open http://localhost:9000 — create an admin account within 5 minutes or Portainer locks down for security.

The Docker socket mount (/var/run/docker.sock) is what gives Portainer control over Docker. It has full Docker access — on a production server, restrict who can reach Portainer's port.

First Setup

  1. Open http://localhost:9000
  2. Create your admin username and password (you have 5 minutes — Portainer times out for security)
  3. Select Get Started to manage the local Docker environment
  4. The dashboard shows container count, image count, volume count, and resource overview

What You Can Do in Portainer

FeatureWhat It Replaces
Container list with start/stop/restartdocker ps, docker stop/start
Live container logsdocker logs -f container
Container console (exec)docker exec -it container bash
Container resource statsdocker stats
Deploy a Compose stackdocker compose up
Image management, pull, deletedocker pull, docker rmi
Volume browserdocker volume ls, docker volume inspect
Network managementdocker network ls/create

Deploying a Stack (Compose in Portainer)

  1. Go to Stacks → Add stack
  2. Give the stack a name
  3. Paste or upload your docker-compose.yml content
  4. Set any environment variables the stack needs
  5. Click Deploy the stack

Portainer tracks the stack and shows all its containers grouped together. Update a stack by editing its Compose file and clicking Update the stack.

Updating Portainer Itself

# Pull the latest image
docker pull portainer/portainer-ce:latest

# Stop and remove the old container (data volume persists)
docker stop portainer && docker rm portainer

# Recreate with the same run command as the install step
docker run -d --name portainer --restart=always \
  -p 8000:8000 -p 9443:9443 -p 9000:9000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:latest

Troubleshooting

ProblemFix
First-visit timeout — forced to recreateDelete container and volume, reinstall: docker rm portainer && docker volume rm portainer_data
Port 9000 conflictChange host port: -p 9001:9000
Can't reach from another device on networkUse the server's LAN IP instead of localhost: http://192.168.x.x:9000
Containers not showingVerify the Docker socket mount is correct for your OS (Linux: /var/run/docker.sock)