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

Add UID and GID variable

Open mgutt opened this issue 4 years ago • 4 comments
trafficstars

In Unraid its important of being able to set UID and GID to 99:100. I tried it through the following docker flag:

--user=99:100

But the NPM docker container isn't happy with it:

s6-mkdir: warning: unable to mkdir /var/run/s6: Permission denied

Some containers solve this by using additional variables: https://hub.docker.com/r/linuxserver/mariadb#:~:text=boot%20and%20setup.-,Usage,-Here%20are%20some

    environment:
      - PUID=1000
      - PGID=1000

mgutt avatar Jul 09 '21 16:07 mgutt

@mgutt did you ever find a workaround for this?

joshkay avatar Jul 19 '22 14:07 joshkay

Nope.

mgutt avatar Jul 19 '22 15:07 mgutt

I would love to have this working indeed. Also see my bug report: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2503

rogierlommers avatar Dec 24 '22 15:12 rogierlommers

Please also see this: https://github.com/jlesage/docker-nginx-proxy-manager/issues/271 I don't know what repo that is, but it does support docker --user params. Personally I prefer to use this (original) one, but I do need to save data files as my own user.

rogierlommers avatar Dec 24 '22 15:12 rogierlommers

There is a s6-applyuidgid directive to do this after init. The jslesage repo seems to be quite a bit behind, also would not recommend using another source for your reverse proxy.

Writing everything as root on the host can interfere with common backup strategies, RAID setups and remote monitoring. Would love to see this get picked up soon.

Renzo-S avatar Jan 24 '23 09:01 Renzo-S

Yes me too; I don't want to use the jslesage repo either. So for me it's a must-have. Unfortunately I don't have the time nor skills to apply it in this repo 🙁.

rogierlommers avatar Jan 24 '23 16:01 rogierlommers

Waiting for this too!

agorgl avatar Feb 02 '23 19:02 agorgl

This is working for me: https://hub.docker.com/r/jc21/nginx-proxy-manager

    environment:
      PUID: $PUID
      PGID: $PGID

192 168 86 59 2023-04-20 at 11 01 45 PM

vdrover avatar Apr 21 '23 04:04 vdrover

Sorry to re-open this thread but the issue has changed a bit... Since the environment have been added, The PUID and PGID work fine for the 2.10.2 and 2.10.3 but it is not working with the latest 2.10.4.

Has it been removed?

Moooartin avatar Sep 18 '23 10:09 Moooartin

thank you @vdrover. I can confirm this is working fine on latest and solved the bunch of errors about file permission at startup under unraid.

NeoMod avatar Oct 31 '23 10:10 NeoMod