Portainer: The Best GUI for Managing Docker on Your Homelab
Install and configure Portainer CE to manage Docker containers, images, networks, and volumes through a browser-based dashboard — no command line required.
The Docker CLI is powerful, but there are times when a visual interface makes life easier — seeing all your containers at a glance, managing volumes, pulling new images, inspecting logs without memorizing flags. Portainer CE gives you all of this through a browser, and it runs as a Docker container itself.
This guide covers a clean Portainer installation, the most useful features, and how to use it alongside your existing Compose stacks.
What Portainer CE Is (and Isn’t)
Portainer CE (Community Edition) is a free, open-source Docker management interface. It runs locally and connects to your Docker daemon. You access it through a browser at https://your-server:9443.
It is not a cloud service and does not require an account. All data stays on your server.
Portainer has a paid tier (Business Edition) with additional features like edge agents and RBAC. CE is sufficient for homelab use.
Installation
Standalone (No Traefik)
If you just want Portainer accessible via its built-in port:
mkdir -p ~/services/portainer
cd ~/services/portainer
Create docker-compose.yml:
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
ports:
- "8000:8000"
- "9443:9443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
volumes:
portainer_data:
Start it:
docker compose up -d
Access Portainer at https://your-server-ip:9443. Accept the self-signed certificate warning on first visit.
Behind Traefik (Recommended)
If you have Traefik set up for automatic HTTPS, add labels to the Compose file instead:
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
labels:
- "traefik.enable=true"
- "traefik.http.routers.portainer.rule=Host(`portainer.yourdomain.com`)"
- "traefik.http.routers.portainer.entrypoints=websecure"
- "traefik.http.routers.portainer.tls.certresolver=letsencrypt"
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
networks:
- traefik-proxy
volumes:
portainer_data:
networks:
traefik-proxy:
external: true
Note: Portainer listens on port 9000 (HTTP) and 9443 (HTTPS). Behind Traefik, point to port 9000 and let Traefik handle TLS.
First-Time Setup
On first access, Portainer prompts you to create an admin password. Set a strong one — Portainer has full access to your Docker daemon.
After login, you’re presented with environment selection. Choose Docker (local) to manage the Docker daemon on the same host.
The Dashboard
The home screen shows your environments. Click the local Docker environment to enter the dashboard.
The left sidebar shows:
- Stacks — Docker Compose stacks
- Containers — all running and stopped containers
- Images — locally pulled images
- Networks — Docker networks
- Volumes — named volumes
- Configs/Secrets — Docker secrets (Swarm mode only)
Managing Compose Stacks
Portainer’s Stacks view is the most useful feature for homelab use. It shows your running Compose stacks and lets you:
- View all containers in a stack
- Stop/start/restart a whole stack at once
- Edit the Compose file in the browser
- Pull new images and redeploy
Deploying a New Stack from the UI
- Go to Stacks → Add stack
- Choose Web editor
- Paste your
docker-compose.ymlcontent - Click Deploy the stack
Portainer starts the containers and shows you the result. Useful for one-off deployments without SSH.
Importing an Existing Stack
If you started containers with docker compose up -d on the CLI, Portainer calls these “orphaned containers” — it didn’t create them, so they’re listed under Containers but not under Stacks.
To bring them under Portainer management:
- Stop the stack via CLI:
docker compose down - Create a new stack in Portainer with the same Compose content
- Deploy it
Going forward, manage it through Portainer.
Viewing Logs
Click any container name to see its details page. The Logs tab shows container logs with optional real-time following — the same as docker logs -f, but in the browser.
You can filter by keyword, download the log, and control how many lines to show.
Updating Containers
When a new image version is available:
- Go to Containers → select the container
- Click Recreate
- Check Pull latest image
- Click Recreate
Portainer stops the container, pulls the new image, and starts a fresh container with the same configuration. Your volumes (data) are preserved.
For Compose stacks, use Stacks → select stack → Pull and redeploy.
Exec Console
The Console tab on a container detail page opens an interactive terminal in the container — same as docker exec -it container-name /bin/sh.
Useful for:
- Running database migrations
- Debugging configuration inside the container
- Running one-off commands without leaving the browser
Monitoring Resource Usage
The Stats tab shows real-time CPU and memory usage for a container. Not as detailed as Grafana or cAdvisor, but sufficient for quick checks.
For a fleet-level view, the Containers list shows CPU and memory columns for all containers at once.
When to Use CLI vs Portainer
Portainer is great for:
- Viewing status at a glance
- Reading logs quickly
- Restarting stuck containers
- Updating images
The CLI is better for:
- Initial stack setup (easier to version control)
- Scripted operations and automation
- Complex networking changes
- Debugging DNS and network issues between containers
Use both. They’re not mutually exclusive, and they see the same Docker state.
Related
Docker Compose Networking: Bridge, Host, and Custom Networks Explained
Understand Docker Compose networking — how containers find each other, how to isolate services, and how to expose only what needs exposing.
Docker Compose in 20 Minutes: Your First Self-Hosted Stack
A step-by-step walkthrough of setting up Docker Compose and running your first self-hosted services. No prior Docker experience required.
Traefik + Docker Compose: Automatic HTTPS for Every Service
Set up Traefik as a reverse proxy with Docker Compose and get automatic Let's Encrypt HTTPS certificates for every service on your homelab.