HomeLab. Documented.


How to install Portainer (in Docker)

Goal: run Portainer CE in Docker with persistent data, then log in to the UI.

Prerequisites

Step 1 — Create a Docker volume for Portainer data

docker volume create portainer_data

Step 2 — Run Portainer CE

Portainer needs access to the Docker socket to manage the local engine.

docker run -d \
  --name portainer \
  --restart=always \
  -p 8000:8000 \
  -p 9443:9443 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:latest

Verify

docker ps --filter name=portainer
docker logs --tail 50 portainer

Step 3 — Access the web UI

Open:

Accept the certificate warning (self-signed by default).

Step 4 — First-time setup

In Portainer:

Troubleshooting

Next steps