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.
http://[server-ip]:9000Install 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.
/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
- Open
http://localhost:9000 - Create your admin username and password (you have 5 minutes — Portainer times out for security)
- Select Get Started to manage the local Docker environment
- The dashboard shows container count, image count, volume count, and resource overview
What You Can Do in Portainer
| Feature | What It Replaces |
|---|---|
| Container list with start/stop/restart | docker ps, docker stop/start |
| Live container logs | docker logs -f container |
| Container console (exec) | docker exec -it container bash |
| Container resource stats | docker stats |
| Deploy a Compose stack | docker compose up |
| Image management, pull, delete | docker pull, docker rmi |
| Volume browser | docker volume ls, docker volume inspect |
| Network management | docker network ls/create |
Deploying a Stack (Compose in Portainer)
- Go to Stacks → Add stack
- Give the stack a name
- Paste or upload your
docker-compose.ymlcontent - Set any environment variables the stack needs
- 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
| Problem | Fix |
|---|---|
| First-visit timeout — forced to recreate | Delete container and volume, reinstall: docker rm portainer && docker volume rm portainer_data |
| Port 9000 conflict | Change host port: -p 9001:9000 |
| Can't reach from another device on network | Use the server's LAN IP instead of localhost: http://192.168.x.x:9000 |
| Containers not showing | Verify the Docker socket mount is correct for your OS (Linux: /var/run/docker.sock) |