Updating portainer becomes:docker compose down
docker pull portainer/portainer-ce:latest
docker compose up -d
version: '3.0'
services:
portainer:
container_name: portainer
hostname: portainer
command: --sslcert /certs/lan.fullchain --sslkey /certs/lan.key
image: portainer/portainer-ce:latest
restart: unless-stopped
network_mode: bridge
environment:
- "TZ=EST5EDT"
ports:
- 9443:9443
volumes:
- data:/data
- /certs:/certs:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
volumes:
data:
Paste the above into a docker-compose.yml file, I placed mine in a ‘portainer’ folder inside my home directory. Then just run docker compose up -d
Once it’s up and running, you have 10 or 15 minutes to browse to the login page (http://ip.address:9443 or equivalent), or you’ll have to restart it. The first visit to Portainer will have you create your admin credentials.
I use a folder on my system, /certs, which I map to /certs inside the container. You will have to modify your certificate locations in the volumes section, and the command line towards the top of the compose file. If you are not using SSL, then simply comment out or remove the command line at the top of the compose file and remove the volume mapping.

