Multi server
Hi, I have a question, I would love to add multiple servers for my dokploy instance, what is the best way to have multiple servers for reduncency and underlying child servers for running the containers, and would i use the multi server feature or docker swarm? Would love to get some insights into this.
8 Replies
You goal is a bit unclear. What do you want to achieve with multiple servers?
@Henrik Thanks for the anwser, sorry for the unclear goal. My goal is to achieve a system where i can scale and have redundancy, i don't want all of my services to be down if one of my instances fails. I was hoping to be able to achieve this by using dokploy. Does this make it a bit more clear? I have also added an image of an idea I had, don't know if this is possible but my idea scenario.

I have been tinkering with something similar myself and there are a few problem to solve. What you're drawing up there is a docker swarm setup which Dokploy supports. Now to the problems:
- Docker swarm does not migrate volumes
- If Dokploy server crashes and the UI along with its Postgres database moves, what happens to the data? Related to point one
- Traefik community edition does not share ACME and cannot share ACME. That is in the enterprise version. Should every master has it's own ACME. Does that play well?
- What should load balance to the cluster? If nothing, then why multiple masters? That is something Dokploy does not, and cannot, set up for you.
These are some of the problems I am trying to solve at the moment
High availability (HA) is a hard problem to solve. There so many moving parts, and there really isn't a one size fits all solution out there I'm afraid.
A path I am currently trying out is having the whole cluster part set up as remote servers which will allow Dokploy to crash without moving itself. This requires manually changing the setup script. A godsend that Siumauricio had thought of that and it is possible. That allows you to set up the remote as a part of the remote swarm.
I tried to ask about the same problem here, but as you can see; there isn't any replies to it.
@Henrik Thanks for the reply, I see indeed that you didn't get may replies, for the problems, i would use a load balancer from a cloud provider (AWS, Hetzner) but as you said this might not be the best approach, what you are doing with moving the entire cluster to a remote server sounds like it could be a good first step. The database would be a big problem. What do you have to change in this script? Or is this something you are still working on?
Still working on, and whatever script I will end up using will end up being quite custom for my situation and may not solve your problems. For relevant docker volumes, I am looking into setting up a NFS server.
A load balancer provided by a cloud provider also usually handle SSL termination for you. So that means you can turn off https for you domains inside Dokploy, but you'll need to handle routing at another layer. It gets complicated quite fast 🙃
Ah yes I see, thanks for all the information, really helpfull.
@ me If you figure out a solution. I'm interested to see different multi-server/loadbalanced solutions
I will, thx for sharing your insights, if i come up with something, i will let you know