[GH-ISSUE #190] Templates are not working out of the box: 404 not found #7291

Open
opened 2026-05-21 22:27:29 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @bst27 on GitHub (Jun 9, 2025).
Original GitHub issue: https://github.com/Dokploy/templates/issues/190

To Reproduce

  1. Create a project and then select "Create Service" -> "Template"
  2. Select "Uptime Kuma" template
  3. Open the created service and click "deploy" to start the service
  4. Open the "Domains" tab and click on the URL to open the service website
  5. You will ge a 404 not found error

Current vs. Expected behavior

I noticed that the provider raw template shows the following:

version: "3.8"
services:
  uptime-kuma:
    image: louislam/uptime-kuma:1.23.15
    restart: always
    volumes:
      - uptime-kuma-data:/app/data

volumes:
  uptime-kuma-data:

So for my understanding this is missing the connection to the dokploy network as described there:
Docker Compose with Dokploy

So if I change the template code as follows before deploying it works immediately:

version: "3.8"
services:
  uptime-kuma:
    image: louislam/uptime-kuma:1.23.15
    restart: always
    volumes:
      - uptime-kuma-data:/app/data
    networks:
      - dokploy-network

volumes:
  uptime-kuma-data:

networks:
  dokploy-network:
    external: true

But shouldn't this work out of the box when selecting a template? At least that is what I was expecting as a new user which used a template to try things out.

Provide environment information

Dokploy version: v0.22.7

Which area(s) are affected? (Select all that apply)

Docker Compose

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

No response

Will you send a PR to fix it?

Maybe, need help

Originally created by @bst27 on GitHub (Jun 9, 2025). Original GitHub issue: https://github.com/Dokploy/templates/issues/190 ### To Reproduce 1. Create a project and then select "Create Service" -> "Template" 2. Select "Uptime Kuma" template 3. Open the created service and click "deploy" to start the service 4. Open the "Domains" tab and click on the URL to open the service website 5. You will ge a 404 not found error ### Current vs. Expected behavior I noticed that the provider raw template shows the following: ``` version: "3.8" services: uptime-kuma: image: louislam/uptime-kuma:1.23.15 restart: always volumes: - uptime-kuma-data:/app/data volumes: uptime-kuma-data: ``` So for my understanding this is missing the connection to the dokploy network as described there: [Docker Compose with Dokploy](https://docs.dokploy.com/docs/core/docker-compose/example) So if I change the template code as follows before deploying it works immediately: ``` version: "3.8" services: uptime-kuma: image: louislam/uptime-kuma:1.23.15 restart: always volumes: - uptime-kuma-data:/app/data networks: - dokploy-network volumes: uptime-kuma-data: networks: dokploy-network: external: true ``` But shouldn't this work out of the box when selecting a template? At least that is what I was expecting as a new user which used a template to try things out. ### Provide environment information ```bash Dokploy version: v0.22.7 ``` ### Which area(s) are affected? (Select all that apply) Docker Compose ### Are you deploying the applications where Dokploy is installed or on a remote server? Same server where Dokploy is installed ### Additional context _No response_ ### Will you send a PR to fix it? Maybe, need help
Author
Owner

@nktnet1 commented on GitHub (Jun 10, 2025):

You may want to report this on the templates repository

404 suggests that traefik is not routing traffic to your container, often because of failing healthcheck.

Have you checked the logs of the uptime kuma container?

<!-- gh-comment-id:2993834464 --> @nktnet1 commented on GitHub (Jun 10, 2025): You may want to report this on the templates repository - https://github.com/Dokploy/templates/issues 404 suggests that traefik is not routing traffic to your container, often because of failing healthcheck. Have you checked the logs of the uptime kuma container?
Author
Owner

@Siumauricio commented on GitHub (Jun 22, 2025):

For the templates it is not necessary to add dokploy-network because we internally handle an isolation you can read more here https://docs.dokploy.com/docs/core/docker-compose/utilities#isolated-deployments, the templates should work without configuration.

Image

Image

Image

This should be enough to access to the service, also make sure to have IP assigned, you can verify by going to Web Server -> Server -> Update Server IP ( make sure you have the IP of your server) if you doesn't have IP assigned the generated domains for all the templates you create will not work, so make sure you have the IP Assigned

Anyway, let's transfer this to the template repository.

<!-- gh-comment-id:2993834465 --> @Siumauricio commented on GitHub (Jun 22, 2025): For the templates it is not necessary to add dokploy-network because we internally handle an isolation you can read more here https://docs.dokploy.com/docs/core/docker-compose/utilities#isolated-deployments, the templates should work without configuration. ![Image](https://github.com/user-attachments/assets/db9cbe43-bf9b-4d1f-8a2b-85a16b77d7d2) ![Image](https://github.com/user-attachments/assets/92df69a9-a1eb-4b74-8c27-bcff0ce4f191) ![Image](https://github.com/user-attachments/assets/62de5468-9cf8-4257-9128-476d6906ee1a) This should be enough to access to the service, also make sure to have IP assigned, you can verify by going to Web Server -> Server -> Update Server IP ( make sure you have the IP of your server) if you doesn't have IP assigned the generated domains for all the templates you create will not work, so make sure you have the IP Assigned Anyway, let's transfer this to the template repository.
Author
Owner

@deanbirnie commented on GitHub (Sep 22, 2025):

I'm having the same issue, I deployed a very static template (SPDF), set the domain and then tried navigating to it. I have tried some other stacks with the same issues but I though those were due to errors in my templates. Now I'm starting to think it's an issue with traefik in Dokploy. My NextJS site works as expected but I've not managed to get a docker template properly deployed.

Image Image Image
<!-- gh-comment-id:3317485991 --> @deanbirnie commented on GitHub (Sep 22, 2025): I'm having the same issue, I deployed a very static template (SPDF), set the domain and then tried navigating to it. I have tried some other stacks with the same issues but I though those were due to errors in my templates. Now I'm starting to think it's an issue with traefik in Dokploy. My NextJS site works as expected but I've not managed to get a docker template properly deployed. <img width="1572" height="935" alt="Image" src="https://github.com/user-attachments/assets/badb6834-8ec6-4108-a25b-ef9274e535fa" /> <img width="1555" height="918" alt="Image" src="https://github.com/user-attachments/assets/7e39fde8-505d-4aa8-be36-0efe147a7307" /> <img width="1830" height="979" alt="Image" src="https://github.com/user-attachments/assets/aac1cbad-c6f7-4d3a-887a-c5ca761d457f" />
Author
Owner

@nktnet1 commented on GitHub (Sep 22, 2025):

@deanbirnie are you using a wildcard domain setup?

If not, did you add the DNS record (e.g. an A-type record on Cloudflare) first, BEFORE deploying?

<!-- gh-comment-id:3317789181 --> @nktnet1 commented on GitHub (Sep 22, 2025): @deanbirnie are you using a wildcard domain setup? If not, did you add the DNS record (e.g. an A-type record on Cloudflare) first, BEFORE deploying?
Author
Owner

@deanbirnie commented on GitHub (Sep 22, 2025):

@deanbirnie are you using a wildcard domain setup?

If not, did you add the DNS record (e.g. an A-type record on Cloudflare) first, BEFORE deploying?

No, I tested by first adding an A record and configuring the domain in the Dokploy UI but that didn't work. So I went back and generated a new traefik.me address in the domain menu and tried again. Both resulted in a 404.

In both cases, I clicked on the validate DNS button and both were validated fine.

Image

You're welcome to try the address in the image, I'll remove it later.

<!-- gh-comment-id:3318042879 --> @deanbirnie commented on GitHub (Sep 22, 2025): > [@deanbirnie](https://github.com/deanbirnie) are you using a wildcard domain setup? > > If not, did you add the DNS record (e.g. an A-type record on Cloudflare) first, BEFORE deploying? No, I tested by first adding an A record and configuring the domain in the Dokploy UI but that didn't work. So I went back and generated a new traefik.me address in the domain menu and tried again. Both resulted in a 404. In both cases, I clicked on the validate DNS button and both were validated fine. <img width="572" height="796" alt="Image" src="https://github.com/user-attachments/assets/5470b3dc-f654-44f2-a8d8-9cedbc79dcd4" /> You're welcome to try the address in the image, I'll remove it later.
Author
Owner

@nktnet1 commented on GitHub (Sep 22, 2025):

@deanbirnie you're using Traefik's HTTP address - in which case, you shouldn't enable HTTPS and Let's Encrypt.

Only enable it if you're using a custom domain, unless you've followed the instructions here:

to set up HTTPS specifically for Traefik.

<!-- gh-comment-id:3318188421 --> @nktnet1 commented on GitHub (Sep 22, 2025): @deanbirnie you're using Traefik's HTTP address - in which case, you shouldn't enable HTTPS and Let's Encrypt. Only enable it if you're using a custom domain, unless you've followed the instructions here: - https://docs.dokploy.com/docs/core/certificates#traefikme-https-setup to set up HTTPS specifically for Traefik.
Author
Owner

@deanbirnie commented on GitHub (Sep 22, 2025):

@deanbirnie you're using Traefik's HTTP address - in which case, you shouldn't enable HTTPS and Let's Encrypt.

Only enable it if you're using a custom domain, unless you've followed the instructions here:

* https://docs.dokploy.com/docs/core/certificates#traefikme-https-setup

to set up HTTPS specifically for Traefik.

Ok fair enough, thank you!

However, I get the same error when I use app.myaddress.tld for example where there is an A record pointing to the IP of my Dokploy server.

<!-- gh-comment-id:3318278027 --> @deanbirnie commented on GitHub (Sep 22, 2025): > [@deanbirnie](https://github.com/deanbirnie) you're using Traefik's HTTP address - in which case, you shouldn't enable HTTPS and Let's Encrypt. > > Only enable it if you're using a custom domain, unless you've followed the instructions here: > > * https://docs.dokploy.com/docs/core/certificates#traefikme-https-setup > > > to set up HTTPS specifically for Traefik. Ok fair enough, thank you! However, I get the same error when I use app.myaddress.tld for example where there is an A record pointing to the IP of my Dokploy server.
Author
Owner

@nktnet1 commented on GitHub (Sep 22, 2025):

Are you using Cloudflare for DNS or some other provider?

What happens when you do an nslookup on your domain?

If cloudflare, did you configure SSL as per the docs? https://docs.dokploy.com/docs/core/domains/cloudflare

There's not a lot of information to go off of, but these are the common ones.

<!-- gh-comment-id:3318419709 --> @nktnet1 commented on GitHub (Sep 22, 2025): Are you using Cloudflare for DNS or some other provider? What happens when you do an `nslookup` on your domain? If cloudflare, did you configure SSL as per the docs? https://docs.dokploy.com/docs/core/domains/cloudflare There's not a lot of information to go off of, but these are the common ones.
Author
Owner

@deanbirnie commented on GitHub (Sep 22, 2025):

Thank you, like I said, I have a working project hosting a NextJS site using the same domain, same setup, but for some reason can't get these docker apps to work. I'll keep playing with it I guess...

I'm using Cloudflare, no issues with my domain, I'm able to find the correct resources based on my various sub-domains, including the one for the NextJS app mentioned above which has an A record pointed at the Dokploy server. When I set the domain to app.domain.tld (example) and click on validate DNS, it comes back "Behind Cloudflare".

I'm going to try Full (strict) on another domain and see if that makes a difference because my primary domain is configured as Full for specific reasons so it's not 100% according to the docs. But in my mind the cert shouldn't cause a 404, that's a routing issue. Happy to be wrong, will test.

<!-- gh-comment-id:3318582311 --> @deanbirnie commented on GitHub (Sep 22, 2025): Thank you, like I said, I have a working project hosting a NextJS site using the same domain, same setup, but for some reason can't get these docker apps to work. I'll keep playing with it I guess... I'm using Cloudflare, no issues with my domain, I'm able to find the correct resources based on my various sub-domains, including the one for the NextJS app mentioned above which has an A record pointed at the Dokploy server. When I set the domain to app.domain.tld (example) and click on validate DNS, it comes back "Behind Cloudflare". I'm going to try Full (strict) on another domain and see if that makes a difference because my primary domain is configured as Full for specific reasons so it's not 100% according to the docs. But in my mind the cert shouldn't cause a 404, that's a routing issue. Happy to be wrong, will test.
Author
Owner

@nktnet1 commented on GitHub (Sep 22, 2025):

I recommend trying a minimal template like IT Tools - just make sure to add the domain on Cloudflare first before adding the same domain on Dokploy and deploying your docker template.

404 could also be caused by failing Healthchecks if configured, since Traefik will not route traffic to unhealthy containers.

<!-- gh-comment-id:3318630772 --> @nktnet1 commented on GitHub (Sep 22, 2025): I recommend trying a minimal template like IT Tools - just make sure to add the domain on Cloudflare first before adding the same domain on Dokploy and deploying your docker template. 404 could also be caused by failing Healthchecks if configured, since Traefik will not route traffic to unhealthy containers.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#7291