docker-nginx-proxy-manager icon indicating copy to clipboard operation
docker-nginx-proxy-manager copied to clipboard

How to add Snippets for Authelia like official Docs said

Open masterwishx opened this issue 2 years ago • 10 comments

used IBRACORP guide for Authelia + NPM +Cloudflare , but in Official Docs of Authelia snippets used ,is it possible to add snippets here ? https://www.authelia.com/integration/proxies/nginx-proxy-manager/

masterwishx avatar Jan 21 '23 07:01 masterwishx

If I understand your question correctly, you want to know if this container can work with Authelia ? So to answer is yes, this should work.

jlesage avatar Feb 27 '23 03:02 jlesage

So to answer is yes, this should work.

Sorry if not explained correctly, it's working with Authelia by guide. But from official way of Authelia is to use snippets. So the question is: How to add snippets to NPM correctly?

masterwishx avatar Feb 27 '23 07:02 masterwishx

Can you precise which part of the guide you are talking about ?

From https://www.authelia.com/integration/proxies/nginx-proxy-manager/, it is mentioned that the snippets configuration files are mapped to the container like this:

    volumes:
      - ${PWD}/data/nginx/snippets:/config/nginx/snippets:ro

Then, they are used by adding a custom configuration to NPM:

location / {
    include /snippets/proxy.conf;
    proxy_pass $forward_scheme://$server:$port;
}

You can do the same thing with this container.

jlesage avatar Feb 27 '23 12:02 jlesage

I didn't find snippets dir in container exist. But if you say I can use here they example , I will try to make it. Thanks

masterwishx avatar Feb 27 '23 16:02 masterwishx

It is the volume configuration that will add it.

    volumes:
      - ${PWD}/data/nginx/snippets:/config/nginx/snippets:ro

jlesage avatar Feb 27 '23 16:02 jlesage

im using Unraid, so it should be ,i think:

/mnt/user/appdata/NginxProxyManager/nginx/snippets : /config/nginx/snippets:ro

masterwishx avatar Feb 27 '23 17:02 masterwishx

If your snippets are already under /mnt/user/appdata/NginxProxyManager/nginx/snippets, then you don't need to add another volume mapping.

jlesage avatar Feb 28 '23 01:02 jlesage

No I don't have it. I meaned to create volume like this

masterwishx avatar Feb 28 '23 11:02 masterwishx

So where do you plan to store your snippets on the unRAID ?

Storing them under /mnt/user/appdata/NginxProxyManager/nginx/snippets seems to be the easiest way.

jlesage avatar Feb 28 '23 12:02 jlesage

Storing them under /mnt/user/appdata/NginxProxyManager/nginx/snippets seems to be the easiest way

Yes, here. Thanks

masterwishx avatar Feb 28 '23 16:02 masterwishx