Unable to connect to services deployed on Remote Servers

Hello! I am running into a network issue when trying to launch services from my dokploy instance. I am using the multiple server approach and it seems like Traefik isn't able to route to the network generated for the service? I was able to solve this...partially. I redeployed the apps on the dokploy web server instead of my remote one and it still failed so i tried "rolling" the traefik.me domain a couple times and I got a warning that I need to update my web server's IP. Adding the server IP to my web server config fixed the locally deployed ones but the remote servers still fails. Trying to figure out how i can fix this. VPS: Linode OS: Ubuntu 24.04 Dokploy: v0.20.8 Dokploy is deployed on a custom subdomain. I am able to access the remote server terminal via ssh from dokploy. Container is healthy and no traefik logs.
34 Replies
Henrik
Henrik2mo ago
The remote server has its own Traefik and IP instance. Are you routing to it’s IP directly?
ummahrican
ummahricanOP2mo ago
I don't see a traefik instance running on the remote. I setup the Remote server with the external IP
ummahrican
ummahricanOP2mo ago
No description
ummahrican
ummahricanOP2mo ago
do i need to make a dynamic config for the server's traefik file system? something like this? http: routers: catchall-traefik-me: rule: HostRegexp({subdomain:.+}.traefik.me) entryPoints: - web service: dokploy-service-app services: dokploy-service-app: loadBalancer: servers: - url: http://dokploy:3000 passHostHeader: true ? root@dashboard:/etc/dokploy/traefik/dynamic# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0bbbcc242a88 metabase/metabase:v0.50.8 "/app/run_metabase.sh" 3 minutes ago Up 3 minutes (healthy) 3000/tcp observability-metabase-24b7ah-metabase-1 7f3cfb1fcf66 postgres:14 "docker-entrypoint.s…" 3 hours ago Up 3 hours 5432/tcp observability-metabase-24b7ah-postgres-1 root@dashboard:/etc/dokploy/traefik/dynamic# I also changed my dokploy.yml on my main instance to the following: http: routers: dokploy-router-app: rule: Host(<MY_CUSTOM_DOMAIN>) && PathPrefix(/) service: dokploy-service-app entryPoints: - web - websecure tls: certResolver: letsencrypt services: dokploy-service-app: loadBalancer: servers: - url: http://dokploy:3000 passHostHeader: true I'm new to traefik so im not sure this is correct
Henrik
Henrik2mo ago
Did you click Setup Server?
No description
ummahrican
ummahricanOP2mo ago
yup yup
Henrik
Henrik2mo ago
And the Validate tab gives you all green?
ummahrican
ummahricanOP2mo ago
No description
Henrik
Henrik2mo ago
If you have a domain, does the A record of the service you try to deploy point to the remote server?
ummahrican
ummahricanOP2mo ago
i do have a domain for the dokploy but not for the remote server. should i set it up? like a wildcard for traefik.me through cloudflare?
Henrik
Henrik2mo ago
Set an A record for like remote.example.tld pointing to the remote and check if you can reach it there. The same domain has to be assigned in the domain tab of the service of course
ummahrican
ummahricanOP2mo ago
gotcha gotcha so i can't just use the traefik.me if dokploy is already configured with an A record?
Henrik
Henrik2mo ago
You can probably use a traefik.me domain. Just make sure the IP in the domain is the IP of the remote server and not the IP of the Dokploy server. The routing does not go through Dokploy, but straight to the remote server
ummahrican
ummahricanOP2mo ago
I'll give that a try then!
Henrik
Henrik2mo ago
Make sure the remote server also does not have port 80 and 443 open in the firewall
ummahrican
ummahricanOP2mo ago
does not?? i did open them
Henrik
Henrik2mo ago
Does
ummahrican
ummahricanOP2mo ago
ah gotcha 😅 just making sure
Henrik
Henrik2mo ago
Wrote it a bit too fast there 😅
ummahrican
ummahricanOP2mo ago
lol no worries! i had real fear. I was like how does traefik work. its real internet magic so i added the a record and digging the domain shows the proper IP but still seeing the issue
ummahrican
ummahricanOP2mo ago
No description
Henrik
Henrik2mo ago
There is no need for a record on cloudflare when using traefik.me domains. The IP of the server is present in the URL
ummahrican
ummahricanOP2mo ago
mmm they match so im not sure
Henrik
Henrik2mo ago
Does your Dokploy instance also use IPv6 address?
ummahrican
ummahricanOP2mo ago
it technically does but im not using it
Henrik
Henrik2mo ago
I couldn't find any traefik docs about IPv6 routing, and I also think Docker does not have it enabled by default
ummahrican
ummahricanOP2mo ago
yea i was just using ipv4
Henrik
Henrik2mo ago
Try IPv4 on the remote
ummahrican
ummahricanOP2mo ago
i am using ipv4?
Henrik
Henrik2mo ago
24b7ah-654ec8-69-164-205-11 part of your URL you sent is your VPS IPv6 address
ummahrican
ummahricanOP2mo ago
ahh gotcha. that is two hashes generated from dokploy (in isolated mode) followed by the ipv4 address. I'll remove the hashes http://observability-metabase-69-164-205-11.traefik.me/ should there be a traefik container on my remote server? i don't see one
Henrik
Henrik2mo ago
Yes it should have one Maybe you’ll have to set it up again
ummahrican
ummahricanOP2mo ago
i was able to resolve this by selecting the server and enabling the traefik dashboard. I think dokploy realized there was no traefik container on the remote server and spun one up. weird. I am able to route traffic to my remote server now! Thanks for all the help
Henrik
Henrik2mo ago
It seems like you were unlucky with the setup of the remote server at last. Just unlucky I guess

Did you find this page helpful?