Choosing Your App Subdomain Manually

Rather than allowing Traefik to use the container name for the app's subdomain, you may want to manually choose the domain/subdomain used. Adding this additional label, you are able to manually override the default docker provider rule.

For Unraid, find the app that you would like to reverse proxy, once you are in the template, scroll to the bottom and click on the "Add another Path, Port, Variable, Label or Device". Select to add a label and fill in the fields as per the screenshot below.

  1. Make sure to set this as a Label.

  2. Copy and paste the following into the key: field, make sure to swap out app for the app name you are adding this to.

    • traefik.http.routers.app.rule
  3. To tell Traefik which subdomain to use for this app, simply add the following to this field, replacing app with the subdomain of your choice and also adding in your own domain.

    • Host(`app.YOURDOMAIN.COM`)
  4. Click add and then apply to redeploy the app with the new label added to it.

WARNING

You must replace app with the name of your application that this label is being added to otherwise Traefik will see duplicates.

PLEASE NOTE

You can add multiple of these labels at once before finally deploying your application.

Conclusion

Traefik will now use your preferred subdomain to forward all traffic on to the app correctly.

Last updated