Router not showing up using Consul+Nomad


I'm trying to route to the Nomad Web UI using Traefik. I use the consulCatalog for service discovery. Traefik is enabled for the Nomad service by adding a tag to /etc/nomad.d/nomad.hcl configuration:

consul {
  tags = [

This will make the nomad and nomad-client services appear on the Traefik dashboard. I now tried to add a router in the static configuration toml, which is part of the Nomad job configuration, but it does not appear on the dashboard and I don't see any error messages within the server logs.

This is my traefik.toml:

    address = ":80"
    address = ":443"

  dashboard = true

  email = "..."
  storage = "/acme/acme.json"

    provider = "acme-dns"

  entryPoints = ["https"]
  rule = "Host(``)"
  service = "nomad-client@consulcatalog"

    certResolver = "tls-resolver"

      main = ""
      sans = ["*"]

  prefix = "traefik"
  exposedByDefault = false

    address = ""
    scheme = "http"

      insecureSkipVerify = true

I first thought the consulCatalog might overwrite the configuration for the router, but even after I changed the name to nomad-ui it did not appear. Something I also tried (which works for the Traefik dashboard itself and a few other services) is to add tags to the Nomad configuration to configure the router, but that leads to duplicate router definitions as the tags are added to both services (nomad and nomad-client).

Any ideas on how I could fix this? My main goal is to use the SSL certificate for the Nomad UI and use it on a subdomain. Does Traefik even support mixing static and dynamic routers?

Got it! I removed the router definition from the traefik.toml and moved it to the tags of the Nomad job instead. This way Consul will pick it up and send it to Traefik. Here is the service stanza of my Traefik job:

service {
  name = "traefik"

  tags = [
    # Traefik dashboard router

    # Nomad UI router
    "traefik.http.routers.nomad-ui.service=nomad-client@consulcatalog", # <<<<<<<<<<<<<<<<<<

    # global redirection: http to https

    # global redirection: https (www.) to https

    # middleware: http(s)://(www.) to  https://