hoping that this forum is still alive.
My setup is similar to
shown on https://itnext.io/administering-two-or-more-docker-swarm-clusters-with-portainerio-682d01a92b25
but portainer will run on remote host managing other remote hosts on which only single containers are running.
All hosts have a reverse proxy in place
What is the setup to do so as https://thibmaek.com/post/monitoring-docker-hosts-with-portainer says the agent can only be used for swarms?
I think portainer agent can only be automatically pushed to all your hosts if you have swarm. If you want to just go to a docker native installation and install portainer-agent, you might be able to connect to it.
But, portainer agent might be specific to swarm installs. If you can open a secure tunnel from your portainer instance to the docker socket, you can use portainer to control that host.
You can also just run portainer on the system you want to control and connect it to /var/run/docker.sock
thx for the reply.
It is not a swarm, it is docker native installation, I updated the drawing (there was a type=
seems so, according to
The Portainer UI will tell you to copy/paste
curl -L https://downloads.portainer.io/agent-stack.yml -o agent-stack.yml && docker stack deploy --compose-file=agent-stack.yml portainer-agent into the host you want to forward, but this only works for Docker Swarm nodes and did not work in my simple case.
would it still work if I open a secure tunnel to each host?
Is that more or less the procedure described by
Instead I had to do something way simpler: add the portainer/agent service to your Docker Compose stack on the host you want to manage, reup the stack with
docker-compose up -d and then in the manager host, just connect to the WAN IP which has port 9001 forwarded in Portainer.