Update the repositories sudo apt-get update Install prereqs sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common Add the GPG Key curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - Check the fingerprint of the key sudo apt-key fingerprint 0EBFCD88 Add the stable repository sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" Install Docker and Docker Compose sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose Check installed version sudo docker version Create Docker Swarm From the first node (AKA: Manager node) run the following command: docker swarm init --advertise-addr docker swarm join --token Install Portainer mkdir -p /opt/portainer && cd /opt/portainer curl -L https://downloads.portainer.io/portainer-agent-stack.yml -o portainer-agent-stack.yml docker stack deploy --compose-file=portainer-agent-stack.yml portainer