For the complete documentation index, see llms.txt. This page is also available as Markdown.

Deploy Portainer via docker swarm

Installation Guide

  1. Copy the portainer stack on the master node

curl -L https://downloads.portainer.io/portainer-ee-agent-stack.yml -o portainer-agent-stack.yml

2. Modify the portainer-agent-stack.yml file with the community edition & remove versions

# By default
  portainer:
    image: portainer/portainer-ee:<version>
	
# Modify to:
  portainer:
    image: portainer/portainer-ce

Note:

If you have already deployed this it will deploy the EE Database edition that is not compatible with CE

  • You will have to delete the portainer data:

By Default:

/var/lib/docker/volumes/portainer_data

To avoid this issue modify the volume to be in current working directory in portainer-agent-stack.yml

volumes:
      - ./portainer_data:/data

3. Deploy the stack

By Default this will install the portainer agent on all the subnodes and should be available on port 9000

4. Secure with SSL

  • Create overlay network

  • Generate Certificate

  • Create Secrets for Key and CRT

  • Modify Swarm file

Example:

  • Run deployment again

Resources:

Last updated