Custom Domain for Dokploy Control Panel
Hi, guys.
Instead of using IP:3000, is it possible to map that to a domain (example.com) somehow using the built-in Traefik?
31 Replies
That’s what the traefik is for 😄 you can add domains in the domain tabs of services
Yup. Head over to
Web Server
under settings. There you can set the domain for Dokploy itselfThis is it, thank you so much @Henrik @DJKnaeckebrot

Out of curiosity, do you know how to use the built-in traefik to set up reverse proxy for already existed applications on the server? (that wasn't spinned through Dokploy). Do I have to go to Traefik File System and make files?
I have not have had use for that functionality so I have not tried it with Traefik. However, I have had to access host application from Docker before and managed to do it, so I know it's possible. I'm sure this is done before by other people, but it's more of a Traefik issue than a Dokploy issue. Check out their routing documentation.
Funnily enough, I just met on this issue an hour ago because Azure had a massive issue in my region and I plan on setting up Traefik to do this kind of routing. I'll let you know my findings, but it'll probably not be today
Ok. I appreciate any help you can find on this. My use case is extremely niche, so I any info can help tremendously. If I can figure this out, then I will be able to do the reverse proxy on both the Dokploy server and the servers that server manages.
Let's say I have Server (S) that has Dokploy. S also has a Remote Server (R). Now, since Dokploy is already using 80 & 443 to route traffics on both S & R, how do I even implement a reverse proxy on server R, from server S?
What I have attempted so far is this (everything is done on S):
- I created an Application on R, literally just pull an image of Alpine, nothing else.
- In the Advanced tab, I modified the Traefik config to do the reverse proxy, for example:
I build the empty container, and just hope that Traefik would work. Well, it does, but unreliably. I don't know how to debug it because sometimes it just says "404 page not found" even though other domains in the same rule works. Imagine app.example.com works but anotherapp.example.com doesn't. And I already made sure that the domains actually resolve to the app on http://192.168.8.8:8080.
Another approach I've tried is to create a Docker app. Then pull... Alpine. Then add
- labels
to add more rules, but this just doesn't work at all.
I'm looking forward to hearing anything you might have for this.Hehehehe. I managed to route to localhost. The python server is running on the HOST, and is the on the same machine as Dokploy


Ok so that's one thing down. How did you do that?
And can it be extended to the remote server too?
I'll try
Define remote. I managed to reach another server, but I used its public IP

And the redirect to https did not work
I do not have servers on the same NAT that I can play around with atm
Imagine you have a main Dokploy server managing a remote server. Now, how do you do reverse proxy on that remote server since Dokploy also uses Traefik on the remote server?
Ok. So Dokploy is installed on both servers. The application you try to reach is on the host of the Remote server?
Dokploy is install on one server S. Then from that one server, you know how you can add more remote server R and manage them from S? That's what I did. On S, I added a few servers. Now my question is how do I even reverse proxy on those remote servers.
What Dokploy does is that it SSH into the remotes server to set up the server to be manageable by the original S server. It also deploys Traefik to the remote servers, that takes over port 80 and 443, hence, the need to do reverse proxy on the remote server.
Aha. What you describe sounds a lot like docker swarm. I would advise you to try to switch to a cluster architecture instead
I somehow I'm under the impression that Dokploy can do this. Will Dokploy be able to operate with Dockerswarm?
Yup. It's running with a swarm network
If the service you want to reach from your primary service is on a secondary service also running dokploy you want to add it as a node i the cluster and not as a remote server. It's possible to keep it as a remote server, but that kind of defeats the purpose of the swarm capabilities of Dokploy.

OMG thank you for this. So correct me if I'm wrong:
Remote Servers means Dokploy runs everything through SSH on the remote server.
Cluster/Swarm means each server has their own Dokploy, and just become nodes of the same swarm.
Am I right?
What would be the advantage of swarm over remote servers?
Remote server is: "I want to control a separate server without having to deal with
server1.domain.tld
and server2.domain.tld
." But other than that, they have nothing to do with each other. They have their own services and does not care what the other one does.
Cluster is: I want many servers to work together. Usually you have a few manager and many worker nodes. The managers makes sure that if a program or server dies, the processes starts up again on another worker node that is alive. Every message goes through a manager before it gets routed to a worker, which sound like what you want to achieveLike this. If you need to achieve uptime if a manager dies, you'll have to set up another load balancer in front of Dokploy. Usually at the DNS step of packet routing. That is a more complicated topic I will not delve into deeper at this point. Good luck

I understand now. Thank you so much for the very throrough explanation.
My last question: So if I get rid of remote servers and use Swarm only, all I need to do is to deploy the apps to the current server (Manager), right? And I can't force where the containers will be running from (either on the Manager or one of the Workers), because that will be taken care of by Dokploy. Everything else will work the same. The additional Worker Nodes are just scaling factors for when the main server isn't running well for some reason?
Even better, you can control where you want the app to live. Well almost, you can decide if it's going to exists on a manager or a worker
You write the compose (actually called stack now) a bit different.
Here you see that with a constraint you can specify that the service is not going to be on a manager. This is equivilant to
node.role == worker

As you can see on the image, it's important to specify that it's going to be a stack and not compose. Templates are compose by default, I think, not sure, but then you can just copy the content to a docker stack and set the restriction manually
You can also specify the service has to live on that node, but I think we're are going a bit too complicated for your original question 😄
Yeah. I think we are going off track but I learned so much and thank you for that! I really enjoy the conversation. I wish Dokploy docs are a little more thorough.
So for the original question, I already found a solution. In order to do Reverse Proxy on any of the servers, we can just:
1. Create an empty Application, Provider Docker, pull the image alpine:latest (smallest).
2. Go to Domains, get a generated Traefik Domain (this is required so the Treafik config file is generated in the Advanced tab).
3. Edit the Traefik file to do the reverse proxy for you (Advanced > Traefik). Something like:
4. Deploy the app.
Now traffic from
app.example.com
should be routed to 192.168.0.11:8080
.I have not tested LAN routing yet. Only localhost and public domain, but yes, in theory
But you should try out swarm if you have multiple servers. It's a good learning experience. From my experience on job interview, it blows their mind away when I show my network topology of services.
Definitely! I am destroying my existing services as we talk so I can move to Swarm. My homelab has about 20 services. This should be a fun experience!!
Do you know if Dokploy will manage the volume backup in the Worker Nodes too, or do I have to back them up separately?
¯\_(ツ)_/¯
i deal with that in a more custom/complicated way
I also think databases will be deployed on the manager, but don't quote me on that
what's the different between remote servers and Cluster?
this is a cluster (swarm) and a remote server is another independent Dokploy instance you're able to control from the same UI. The latter won't share the same virtual network, but the commands for what to do is sent through ssh.