You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allows Vaultwarden to run as a different user after finishing up preliminary operations in the script(s)
For example I use it with this script to change the directory permissions and runtime user:
/etc/vaultwarden.sh
#!/bin/sh
# Set up user group
PGID="${PGID:-1000}"
addgroup --gid "$PGID" vaultwarden
# Set up user
PUID="${PUID:-1000}"
# --gecos is deprecated in Debian
# https://manpages.debian.org/bookworm/adduser/adduser.8.en.html#comment
ADDUSER="adduser --no-create-home --disabled-password --uid $PUID --ingroup vaultwarden"
. /etc/os-release
case "$ID" in
alpine) $ADDUSER --gecos "" vaultwarden
;;
*) $ADDUSER --comment "" vaultwarden
;;
esac
# Set up directory permissions
chown -R "$PUID":"$PGID" /data
exec gosu "$PUID":"$PGID" /vaultwarden "${@}"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For example I use it with this script to change the directory permissions and runtime user:
/etc/vaultwarden.sh
And here's the code for the change:
dfunkt@99c7465
Beta Was this translation helpful? Give feedback.
All reactions