Enabling Organizr server authentication

We can use Organizr as an authentication server, like Authelia but a little more simplistic and less features. You need to have an Organizr container setup for this to work.

Before we can enable Traefik to forward auth requests to Organizr, we need to first reverse proxy the Organizr app through Traefik. To achieve that, we will add the minimum default two labels to the Organizr template, as explained in the Proxying Your First App guide.

traefik.enable = true
traefik.http.routers.organizr.entryPoints = https

WARNING

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

To enable Traefik to forward auth requests to Organizr for an application, we just have to simply set a label for Traefik to pick up. This label will tell Traefik to use a certain middleware for the application we are adding it to.

Enable Organizr on the Application

For Unraid, find the app that you would like to protect with Organizr, 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 too.

    • traefik.http.routers.app.middlewares

  3. Tell Traefik to use the middleware called auth that we will set up in the dynamic config file by adding auth@file in this field.

  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.

Adding Organizr to your dynamic config file

We need to add the following line's to your fileConfig.yml

  middlewares:
    # Organizr server authentication
    auth:
      forwardAuth:
        address: "http://{your organizr docker name here}/api/v2/auth/1"

WARNING

You need to add your organizr docker name

Enable the redirect in Organizr

In Organizr, go to ⇾setting⇾basic⇾security and enable this

Conclusion

Traefik will now forward all traffic through Organizr to make sure that the user trying to get to your app is correctly authenticated before passing traffic on to the app. Now, when you deploy your application, you will be able to visit it by going to your domain with the app name as the subdomain (APP-NAME.DOMAIN.COM).

For more info on Organizr server authentication check >here<

Last updated