Applications | Cloud | Data Center | Docker
Portainer-CE Ubuntu
Below is a clean, reliable outline for installing Portainer Community Edition (CE) on Ubuntu using Docker. This is the standard, production-safe approach and works on Ubuntu 20.04, 22.04, and 24.04.

What you’ll install
- Docker Engine (container runtime)
- Portainer CE (web-based Docker management UI)
1. Prepare Ubuntu
Update the system and install basic prerequisites:
sudo apt update && sudo apt upgrade -y
sudo apt install -y ca-certificates curl gnupg lsb-release
(Optional but recommended)
sudo reboot
2. Install Docker Engine
Portainer runs inside Docker, so Docker must come first.
Add Docker’s official GPG key
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
Add Docker repository
echo \
"deb [arch=$(dpkg --print-architecture) \
signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
Verify Docker
docker --version
sudo systemctl status docker
3. (Recommended) Run Docker without sudo
Add your user to the docker group:
sudo usermod -aG docker $USER
newgrp docker
Verify:
docker run hello-world
4. Create Portainer Data Volume
This keeps Portainer settings safe across upgrades.
docker volume create portainer_data
5. Install Portainer CE
Pull and run the official Portainer CE container:
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
What these ports do
9443→ Portainer Web UI (HTTPS)8000→ Agent tunnel (safe to leave enabled)
6. Access Portainer
Open a browser and go to:
https://<server-ip>:9443
First-time setup:
- Create admin user/password
- Choose Local Docker
- Done — Portainer is live


7. Basic Health Checks
docker ps
docker logs portainer
You should see Portainer running and listening on 9443.
8. Updating Portainer (Later)
Portainer updates are container-based, not in-app:
docker stop portainer
docker rm portainer
docker pull portainer/portainer-ce:latest
Re-run the same docker run command — your data remains intact.
Best Practices (Quick Hits)
- ✔ Use HTTPS (9443) only
- ✔ Put Portainer behind a reverse proxy (Nginx Proxy Manager / Traefik) if exposed
- ✔ Do not delete
portainer_data - ✔ Avoid running random containers as root unless needed