coolify: [Bug]: Traefik dynamic setup not working

Description

I just followed docs here and it ask me for the basic auth credentials but when I enter those it throws a 404 page. I think it is not quite getting to the service api@internal or something.

Minimal Reproduction (if possible, example repository)

Enter the following *.yml file into the Dynamic Configurations for the proxy of your server. Assuming the IP of your server is 10.0.0.37. Password is the same as the docs test test

http:
  routers:
    dashboard:
      rule: Host(`10.0.0.37.sslip.io`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
      service: api@internal
      middlewares:
        - auth
  middlewares:
    auth:
      basicAuth:
        users:
          - "test:$apr1$154ethlp$Re.R1QjCkyOyKKmgYHHYP1"

Bonus: (Not a blocker)

When entering the contents of the *.yml file the first time it throws an error about base64 encode and it enters the file as empty which then you can proceed to hit the Edit button and enter the contents of that file right there.

Exception or Error

No response

Version

v4.0.0-beta.239

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 9
  • Comments: 18 (1 by maintainers)

Most upvoted comments

I initially had the same issue of getting a 404 page when trying to access the dashboard, but I eventually got it working after doing a few things.

Firstly, my domain for the dashboard is set up in Cloudflare with strict TLS, and going to the URL showed an error page related to an invalid SSL cert. To fix it, I added the following line to the dynamic config file.

tls:
        certresolver: letsencrypt

Secondly, and this is the most important part, I ADDED A TRAILING SLASH TO MY URL. For whatever reason, it is MANDATORY. Instead of going to https://example.com/dashboard, you have to go to https://example.com/dashboard/

https://doc.traefik.io/traefik/operations/dashboard/#the-dashboard

The trailing slash / in /dashboard/ is mandatory

My dynamic configuration file is named dashboard.yaml and looks like this (edited to take out sensitive details):

http:
  routers:
    dashboard:
      rule: 'Host(`<DOMAIN>`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))'
      service: api@internal
      tls:
        certresolver: letsencrypt
      middlewares:
        - auth
  middlewares:
    auth:
      basicAuth:
        users:
          - '<USERNAME>:<GENERATED PASSWORD HASH>'

In my case, anytime I restart the proxy, I get a 404 when accessing the Coolify dashboard. The websites and the other services are working, though.

After I applied the traefik dashboard config my coolify dashboard does not work anymore so I have to resort to troubleshooting via SSH

@Trubador I ran into a similar issue before, and I think I fixed it by restarting the proxy. If you ssh into the relevant server, what do you see when you run docker ps or sudo docker ps? If the proxy is running, you should see a running container with the name coolify-proxy. If Coolify itself is running, there would also be a container with the name coolify.

CONTAINER ID   IMAGE                                              COMMAND                  CREATED       STATUS                 PORTS                                                                                                                 NAMES
6ecfa8480e8d   traefik:v2.10                                      "/entrypoint.sh --pi…"   4 weeks ago   Up 4 weeks (healthy)   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   coolify-proxy
0f4f37180bca   ghcr.io/coollabsio/coolify:4.0.0-beta.294          "/init"                  4 weeks ago   Up 4 weeks (healthy)   443/tcp, 8000/tcp, 9000/tcp, 0.0.0.0:8000->80/tcp, :::8000->80/tcp                                                    coolify

I don’t remember whether I found a way to start the proxy programmatically. I would have to look through the Coolify codebase to figure that out. However, I think I was able to start the proxy by doing the following steps:

  1. On the server that should run the Coolify Dashboard, update your firewall to allow a tcp connection to port 8000 if you haven’t already done so. https://coolify.io/docs/knowledge-base/server/firewall#self-hosted-version
  2. Access the Coolify dashboard by visiting the http version through the server IP and relevant port (i.e. http://123.456.789:8000)
  3. Go to the Servers tab
  4. Select the server that should run the proxy
  5. Press the “Start proxy” button. image

Thanks this was the same approach I eventually figured out that worked. Perhaps it might be possible to start the proxy again by listing the containers that are not running using “docker ps -a” and then starting it from there. But yeah the problem arose because I tried to restart the proxy in the hope that the traefik dashboard would work so I could gain some visibility into the networking. Perhaps there is a tool to visualize the entire docker internal networking and traefik in a dependency map?

After I applied the traefik dashboard config my coolify dashboard does not work anymore so I have to resort to troubleshooting via SSH

@Trubador I ran into a similar issue before, and I think I fixed it by restarting the proxy. If you ssh into the relevant server, what do you see when you run docker ps or sudo docker ps? If the proxy is running, you should see a running container with the name coolify-proxy. If Coolify itself is running, there would also be a container with the name coolify.

CONTAINER ID   IMAGE                                              COMMAND                  CREATED       STATUS                 PORTS                                                                                                                 NAMES
6ecfa8480e8d   traefik:v2.10                                      "/entrypoint.sh --pi…"   4 weeks ago   Up 4 weeks (healthy)   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   coolify-proxy
0f4f37180bca   ghcr.io/coollabsio/coolify:4.0.0-beta.294          "/init"                  4 weeks ago   Up 4 weeks (healthy)   443/tcp, 8000/tcp, 9000/tcp, 0.0.0.0:8000->80/tcp, :::8000->80/tcp                                                    coolify

I don’t remember whether I found a way to start the proxy programmatically. I would have to look through the Coolify codebase to figure that out. However, I think I was able to start the proxy by doing the following steps:

  1. On the server that should run the Coolify Dashboard, update your firewall to allow a tcp connection to port 8000 if you haven’t already done so. https://coolify.io/docs/knowledge-base/server/firewall#self-hosted-version
  2. Access the Coolify dashboard by visiting the http version through the server IP and relevant port (i.e. http://123.456.789:8000)
  3. Go to the Servers tab
  4. Select the server that should run the proxy
  5. Press the “Start proxy” button. image