Docker Community Forums

Share and learn in the Docker community.

Feature Request: Docker Swarm Over The Internet

(Xoron) #1


im not sure, where i would post feature requests for Docker. i am happy to remove this thread and post it somewhere more appropriate.

i am trying to connect a node to a swarm over the internet through a proxy.

i have made a post onto stack overflow, and it seems what i am trying to do may not be possible.

i have search on the internet and i am unable to find out information on what this is not possible or if i am doing something wrong.

the details of my issue are on the stackoverflow thread:

but for better indexing on this docker forums i will explain my problem below:

my problem

I am trying to add a new node into my swarm over the internet but it doesn’t seem to connect through a proxy.

I am trying to proxy using Caddy. The proxy configuration results in the same as for any other server like proxy_pass in nginx.

Caddy automatically sets up HTTPS for the subdomain and all traffic is set to be redirected from port 80 to 443. My caddy configuration is: {
    proxy / http://<docker-swarm-manager-ip>:2377 {

From the docker swarm manager, I get the join-token which gives me something like:

docker swarm join --token <some-long-hash> <docker-swarm-manager-ip>:2377

On the node I want to connect to the swarm, I have tried the command:

sudo docker swarm join --token <some-long-hash>

This gives me the error:

Error response from daemon: rpc error: code = Unavailable desc = grpc: the connection is unavailable

I then tried specifying the SSL port:

sudo docker swarm join --token <some-long-hash>

This gives me the error:

Error response from daemon: rpc error: code = FailedPrecondition desc = transport: received the unexpected content-type “text/plain; charset=utf-8”

I am new to docker swarm and I can’t find any similar setup online. Any help is appreciated.


  • I am able to ping the manager from the node successfully.
  • port 2377 is is open on the manager and the node I want to connect.