Skip to main content

Portainer

Portainer is a web interface for managing a Docker host. I recommend to enable swarm mode on the host. Portainer offers its business edition for free for up to three nodes. After the deployment, you need to enter the license key in Portainer's web interface.

You can connect to Portainer through SSH: ssh -L 9000:localhost:9000 yourserver.example.com

To start the setup, save the stack file to portainer.yml, then run this on the server:

docker swarm init

docker stack deploy --compose-file portainer.yml portainer
portainer.yml
version: '3.2'

services:
portainer:
image: portainer/portainer-ee:latest
ports:
- '9000:9000'
volumes:
- portainer_data:/data
- /var/run/docker.sock:/var/run/docker.sock
deploy:
labels:
shepherd_autoupdate:

volumes:
portainer_data: