Protect WebUI access

Hi,

I can’t managed to have nextcloud working behind traefik + authelia
It’s not about login to nextcloud via authelia and openid

But to authorize access to the webui only after a succesful authentication on authelia
Then authelia will redirect the user on the nextcloud login page
And then, the user would still have to authenticate on his nextcloud account

Is there a way to achieve that ?

For the moment, I have 2FA with duo to log in my nextcloud working fine
But it’s really about the webui not accessible by only typing nextcloud.mydomain.com on the url bar

Thank you for your help and avices :slight_smile:

Hi,

I never worked with traefik or authelia but I’m pretty sure, what you want is not directly related to nextcloud.
What you need is a reverse proxy that will verify if your user was authenticated by traefik + authelia and then will forward the client request to nextcloud.mydomain.com.

The architecture is documented here : https://www.authelia.com/overview/prologue/architecture/

As you can see on the Sequence Diagram, first the user tries to connect to nextcloud.mydomain.com but is redirected to authelia by traefik (your reverse proxy). And then authelia redirects the user to nextcloud.mydomain.com which is behind traefik.

I did not read this page entirely but the example seems to be exactly your situation: https://www.authelia.com/integration/proxies/traefik/#configuration.

Hi ligal,

I thank you for your reply and your links :grin: :grin: