Install Portainer CE on Docker

We use the Community Edition (CE). Docs: Portainer CE on Docker (Linux).

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

Use the tag the docs recommend (lts, or pin a version such as 2.22.0).

Port 8000 is only needed for Edge agents; drop it if you don't use them.

Open https://SERVER_IP:9443 and create the admin user. Do it within a few minutes: for security Portainer stops the setup after a timeout. If that happens, sudo docker restart portainer.

Written by Daniel Ruiz Peláez, Systems & Infrastructure Engineer (Linux, VMware, Proxmox, Active Directory, networking and security). These are notes from real problems I have solved.

← Back to all posts