Can't generate Let's Encrypt

I have successful created the projects > services > added domain. I have enabled the HTTPS provision + Let's encrypt, but I couldn't get the proper SSL cert/ Checking traefik log, I got this image, which is weird. Can you please point me out what I'm doing wrong?
No description
18 Replies
andrew.tr
andrew.trOP6mo ago
To debug, I tried to run without HTTPS, that mean I just add the domain only. And after trying to access, it still saying 404. http://cms.codihaus.com
andrew.tr
andrew.trOP6mo ago
I also enabled the traefik dashboard (for both main server and app server). I have 2 server: 192.168.3.3 (dokploy-main) > deploy cms.codihaus.com on 192.168.3.4 (dokploy-app) On app server, I can see we have rule for cms.codihaus.com (without SSL). But when I access to http://cms.codihaus.com it's showing 404? It should be showing
No description
andrew.tr
andrew.trOP6mo ago
My setup: Internet > router forward to 192.168.3.3 (dokploy-main) > config domain for application - which is running on 192.168.3.4 I just tried, look like it's not working as I expected. if app running on IP .4, and you NAT port 80/443 to .3, it will not recognize the app and return 404 what I was thinking that dokploy would have centralized traefikm which will receive from .3 and detect hostname, then forward to .4 or so. @Siumauricio can you please take a look on this matter? Because we have multiple of websites on multiple server
Siumauricio
Siumauricio6mo ago
if you want this you should use cluster instead of multiple servers but you will have a single entrypoint of failure I would like to help you, but I am not very familiar with these setups!
andrew.tr
andrew.trOP6mo ago
may I know more about "but you will have a single entrypoint of failure"
Siumauricio
Siumauricio6mo ago
We use docker swarm in dokploy, we have two features Cluster and Multi server The cluster are a thing based purely on docker swarm, if your main server are down all your workers and everything will not being accessible The multi servers are basically isolated servers from the main server, where you can deploy applications and if your main server are down your application will still alive because is isolated
Siumauricio
Siumauricio6mo ago
Cluster (Advanced)
Learn how to set up and manage a cluster in Dokploy with docker swarm.
andrew.tr
andrew.trOP6mo ago
yeah, that's what I'm trying to avoid.
Siumauricio
Siumauricio6mo ago
yeah, so then go to multi server setup with multi server, every server has it own traefik instance
andrew.tr
andrew.trOP6mo ago
if multi-server setup, i will face the problem I listed above. because traffic to IP .240 (public IP) would be forwared to .3 (internal) via NAT. can we have anyway to config traefik to detect hostname and forward to .4 instead of .3
Siumauricio
Siumauricio6mo ago
I am not sure about that Maybe, if you look in the documentation you will probably find something similar or ask chatgpt, honestly I have never worked that way
andrew.tr
andrew.trOP6mo ago
thank you much! when you're still around here, can you please guide me a bit? how can I create custom route from traefik config yml on UI or from terminal?
andrew.tr
andrew.trOP6mo ago
i can see you have http here for dokploy, can I add multiple blocks there?
No description
Siumauricio
Siumauricio6mo ago
You can do trought the UI
andrew.tr
andrew.trOP6mo ago
it worked @Siumauricio basically, on the dokploy.yml of .3, I will add another router to app service with IP:Port so I think we can add this as a feature somehow. I'm happy to contribute (sponsored feature or my team member can do the feature)
andrew.tr
andrew.trOP6mo ago
@Siumauricio here's the update: - I added a router and corresponding on dokploy.yml (.3) - On .4 still have traefik and it will forward to corresponding service there - So, it worked as we expected. Problem: Let's encrypt SSL
No description
Siumauricio
Siumauricio6mo ago
Nice!
andrew.tr
andrew.trOP6mo ago
For Let's Encrypt, can you please help me a bit? I think this is the last part already If I add routers for cms.codihaus.com on .3 manually like this, how can I provision the SSL for it? From my understanding, we already forward all traffic to .4 so why does the traefik still saying couldn't provision SSL for it?
2024-11-06T04:08:16Z ERR Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [cms.codihaus.com]: error: one or more domains had a problem:\n[cms.codihaus.com] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: 103.143.142.240: Invalid response from http://cms.codihaus.com/.well-known/acme-challenge/zEXPvMxhELpdwszhb9FIUd24Nvw1Om2qJXiBS2IjJBk: 404\n" ACME CA=https://acme-v02.api.letsencrypt.org/directory acmeCA=https://acme-v02.api.letsencrypt.org/directory domains=["cms.codihaus.com"] providerName=letsencrypt.acme routerName=codihauswebsite-directus-98c103-12-websecure@docker rule=Host(`cms.codihaus.com`)
2024-11-06T04:08:16Z ERR Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [cms.codihaus.com]: error: one or more domains had a problem:\n[cms.codihaus.com] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: 103.143.142.240: Invalid response from http://cms.codihaus.com/.well-known/acme-challenge/zEXPvMxhELpdwszhb9FIUd24Nvw1Om2qJXiBS2IjJBk: 404\n" ACME CA=https://acme-v02.api.letsencrypt.org/directory acmeCA=https://acme-v02.api.letsencrypt.org/directory domains=["cms.codihaus.com"] providerName=letsencrypt.acme routerName=codihauswebsite-directus-98c103-12-websecure@docker rule=Host(`cms.codihaus.com`)
Both .3 and .4 has traefik that take care of SSL generation. On .3 we only forward all traefik to .4, so why it couldn't generate SSL for that domain Do you have any guess for this part @Siumauricio ? This is the last part I think

Did you find this page helpful?