Back to Portainer
Setting up Portainer
One container that then manages every other container on the machine, including itself.
- 1
Run the container
Portainer needs access to the Docker socket to manage anything else running on the host, that's what the socket mount below is for.
services: portainer: image: portainer/portainer-ce:latest container_name: portainer restart: unless-stopped ports: - "9443:9443" volumes: - /var/run/docker.sock:/var/run/docker.sock - ./data:/data - 2
Set the admin password
This is worth doing right away: Portainer requires the initial admin password to be set within a few minutes of the container's first start, and locks that step out if the window passes (fixable by restarting the container, but easy to avoid).
- 3
Browse the local environment
Reachable at port 9443, it auto-detects the local Docker engine as an environment, no separate connection setup needed for managing containers on this same machine.
Further reading
- Portainer documentation
Full setup reference, including connecting to remote Docker hosts beyond the local one covered here.