Once your homelab grows past a handful of containers, managing everything from docker ps and scattered compose files starts to feel like flying blind. You forget which host runs what, you SSH into three machines just to restart a stack, and showing a friend “your server” means pasting terminal output. Portainer Community Edition fixes exactly this: a free, self-hosted web UI that manages your Docker hosts, containers, images, volumes, and networks from one dashboard.
In this guide you will deploy Portainer CE 2.45 LTS with Docker Compose, complete the first-time setup, connect additional Docker hosts, put the UI behind HTTPS with a reverse proxy, and back up the Portainer data volume so a host failure does not lock you out of your own infrastructure. The install takes about 15 minutes on any host that already runs Docker. If containers are new to you, read our Docker basics guide first.
What is Portainer CE?
Portainer Community Edition is a lightweight, open-source container management interface. You run it as a single Docker container on a host, it talks to that host’s Docker socket, and it exposes a web UI on port 9443 where you can start, stop, inspect, update, and redeploy containers, browse images and volumes, view logs, open a console inside a running container, and deploy whole stacks from compose files — all without touching the terminal.
Version 2.45 is the current LTS line (2.45.3, released October 2026), and the official install uses the :lts image tag so you track long-term-support releases instead of bleeding-edge short-term builds. Portainer CE covers Docker standalone, Docker Swarm, Podman, and Kubernetes environments, plus an Edge Agent mode for remote sites. Portainer Business Edition adds RBAC, GitOps, SSO, audit logging, and commercial support for production use — this guide covers only the free Community Edition, which is explicitly aimed at homelabs, learning, and personal projects.
It complements rather than replaces other tools in this series: a PaaS like Dokploy deploys apps from git, a monitor like Uptime Kuma watches that they stay up, and Portainer sits in the middle as the day-to-day control panel for the containers themselves.
What you need
- A Linux host with Docker Engine installed and running. The official docs recommend following the Docker install instructions directly and advise against snap-based Docker on Ubuntu, which causes compatibility issues.
- Sudo access on that host.
- Ports 9443 (web UI over HTTPS) and optionally 8000 (Edge Agent tunnel) available. Port 9000 is legacy HTTP and only needed for old setups.
- About 15 minutes.
The install assumes you access Docker through the Unix socket (/var/run/docker.sock) and run Docker as root. Rootless Docker works with extra configuration covered in the official requirements page.
Step 1: Deploy Portainer with Docker Compose
The official deployment offers both docker run and Compose paths. Compose is the better homelab choice because the stack file is self-documenting and trivially redeployable. This is the official compose file from the Portainer docs (image pinned to the :lts tag, data in a named volume, UI on 9443, Edge tunnel on 8000):
services:
portainer:
container_name: portainer
image: portainer/portainer-ce:lts
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
ports:
- 9443:9443
- 8000:8000
volumes:
portainer_data:
name: portainer_data
networks:
default:
name: portainer_network
Save it as portainer-compose.yaml and bring it up:
docker compose -f portainer-compose.yaml up -d
docker ps
You should see the portainer container up within seconds. If you never plan to use Edge Agents for remote sites, you can drop the 8000:8000 port mapping — everything else in this guide works without it.
A security note worth taking seriously: this compose file mounts the Docker socket into the container. That is how Portainer controls the host, and it is also why anyone with admin access to Portainer effectively has root on the host. Keep the admin password strong, do not expose port 9443 to the internet without a reverse proxy and authentication in front, and see our homelab security rules for the broader hardening checklist.
Step 2: Complete the first-time setup
Open https://<host-ip>:9443 in a browser (replace with your host’s IP or hostname). Portainer serves a self-signed certificate by default, so your browser will show a warning on first visit — expected, and you can install your own certificate later either during setup or from the Portainer UI settings.
On the initial setup page you create the admin user. Note the current behavior from the official docs: new Portainer instances may require a setup token to complete first-time configuration, a measure against automated deployments being hijacked before the admin account exists. The setup page explains how to retrieve or skip it with a startup flag; on a normal manual install you will simply create the username and password inline.
Pick a long, unique admin password and store it in your password manager. If you already self-host one, our Vaultwarden guide covers exactly that. After setup, the dashboard shows your local Docker environment with container, image, volume, and network counts.
Step 3: Manage containers from the UI
Click into the local environment and explore. The views you will use daily:
- Containers: list, start, stop, restart, remove, inspect, view logs, attach a console, and check resource stats. Each container’s detail page shows the exact
docker runequivalent, which is a great way to learn Docker flags by clicking around. - Stacks: paste or upload a compose file and deploy it as a named stack. Portainer stores the compose text, so you can edit and redeploy a stack from the UI instead of SSH-ing to edit files. This is how many homelab operators eventually manage all their services.
- Images: list, pull, and prune unused images to reclaim disk.
- Volumes and Networks: inspect what is actually consuming disk and which networks containers share when debugging connectivity.
The built-in console (click a running container, then Console) opens a shell inside the container from the browser — handy for quick checks without SSH. Paired with a reverse proxy below, this becomes your server control panel from anywhere.
Step 4: Connect more Docker hosts
One Portainer server can manage many Docker hosts. The standard pattern is the Portainer Agent: a tiny container you run on each additional host, which the server then talks to over the network.
On each extra host, deploy the agent:
docker volume create portainer_agent_data
docker run -d \
-p 9001:9001 \
--name portainer_agent \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_agent_data:/data \
portainer/agent:lts
Then in the Portainer UI go to Environments, Add environment, choose the Agent type, and enter the agent host and port. The new host appears alongside local in the environment switcher. Keep agent traffic on your LAN or a private overlay like Tailscale — never expose agent port 9001 to the public internet, since it grants full Docker control to whoever reaches it.
Edge Agents (port 8000) solve the reverse case — hosts behind NAT that cannot accept inbound connections phone home to the server instead. For a typical home network with a flat LAN or Tailscale mesh, the standard agent above is all you need.
Step 5: Put Portainer behind HTTPS with a reverse proxy
The self-signed certificate on port 9443 is fine on a LAN but ugly and warning-prone. The clean fix is a reverse proxy that terminates real TLS and forwards to Portainer internally. If you already run one, add a host like portainer.yourdomain.com pointing at the Portainer container. Our Caddy reverse proxy guide walks through automatic HTTPS with exactly this pattern and takes about ten minutes if you do not have a proxy yet.
Two details specific to Portainer: forward to the HTTPS backend port 9443 (or keep it simple and map an internal HTTP path — Portainer documents reverse-proxy setups in its advanced topics), and make sure websocket upgrades pass through, because the console and stats views stream over websockets and break behind naive proxy defaults. Caddy handles this automatically; with Nginx add the standard Upgrade and Connection headers.
After the proxy is live, close or firewall port 9443 from the LAN so the proxy is the only entry point, and consider adding the proxy host to your Uptime Kuma checks so you notice outages before you need the dashboard most.
Step 6: Back up Portainer’s data
All of Portainer’s state — users, environments, stack definitions, settings — lives in the portainer_data volume mounted at /data in the container. Lose that volume and you lose your whole management layer (your actual workloads keep running, but you must set everything up again). Backing it up is one command:
docker run --rm \
-v portainer_data:/data:ro \
-v "$(pwd)":/backup \
alpine tar czf /backup/portainer-backup-$(date +%F).tar.gz -C /data .
Store the archive off-host following the same 3-2-1 discipline as the rest of your homelab — our restic backup guide slots in here directly. To restore, recreate the volume and extract the archive into it before starting the container. Test the restore once on a spare directory so you trust it before you need it.
Portainer also documents database encryption for the /data contents; enable it from Settings if your host disk is shared or unencrypted.
Updating Portainer
Because the compose file pins :lts, updating is a pull and a recreate:
docker compose -f portainer-compose.yaml pull
docker compose -f portainer-compose.yaml up -d
Check the release notes before major jumps (2.39 LTS to 2.45 LTS, for example) since major lines can change requirements. The data volume persists across recreates, so the update keeps all users, environments, and stacks.
Troubleshooting quick hits
- Blank page or connection refused on 9443: the container may still be starting, or another service owns the port. Check
docker logs portainerandss -lntup | grep 9443. - Cannot log in after reinstall: a fresh container against an old
portainer_datavolume keeps the old admin password. Either reuse the old credentials or reset the admin password per the official docs. - Agent shows down: verify port 9001 is reachable from the server host and that both run compatible LTS releases.
- Console disconnects behind a proxy: missing websocket upgrade headers — see Step 5.
- Docker socket permission errors: confirm Docker runs as root and the socket path mount is exactly
/var/run/docker.sock:/var/run/docker.sock.
FAQ
Is Portainer CE really free?
Yes. Community Edition is free with no node limits for homelabs, personal projects, and learning. Portainer Business Edition is the paid tier with RBAC, SSO, GitOps, audit, and support for production use. CE receives no SLA or guaranteed support — you self-support via GitHub issues and community chat.
Does Portainer replace docker compose files?
No — it manages them. Stacks deployed through Portainer are still compose definitions; the UI just stores, renders, and redeploys them. You can export any stack back to a file at any time, so there is no lock-in.
Can Portainer manage a Raspberry Pi?
Yes. The server and agent both run on ARM, and many operators run Portainer on a Pi alongside services like Nextcloud. Keep an eye on memory on 1–2 GB models when the dashboard streams stats.
How is Portainer different from Dokploy or CasaOS?
Portainer is a container control panel: it manages whatever you deploy. Dokploy is a PaaS that deploys apps from git with databases and domains wired up. CasaOS-style dashboards are app stores for one-click installs. They overlap at the edges but solve different problems — Portainer pairs well with any of them.
Should I expose Portainer to the internet?
Avoid it if you can. Prefer VPN or Tailscale access, or at minimum a reverse proxy with strong TLS plus an extra auth layer. An exposed Docker management UI is one of the highest-value targets on a homelab network.
Next steps
Deploy the compose file, finish setup, and connect any extra hosts this weekend — that alone replaces most of your routine SSH sessions. Then put the UI behind your reverse proxy and schedule the volume backup alongside your existing jobs. With Portainer as the control plane, a PaaS for deployments, and Uptime Kuma watching the results, your homelab finally has the same three-layer shape professional platforms use: deploy, manage, monitor.