Hey folks!
I know there are several threads related to bind mounts to unprivileged containers. I think I got on how to do it, but I do not know where to start in my case.
I've set up nextcloud, using tteks (rip!) script for alpine. The basic stuff is set up after some tweaking, but now I need two bind mounts. One should be the nextcloud data directory, the other is access to my media.
Within the container, I run nextcloud with
1.) nextcloud data directory
I guess, I would need to create a nextcloud user on the host. As a next step, I would change the uid within to container to the uid of 'nextcloud' on the host? If so, I would align the container www-data gid to the one of the host.
2.) media directory
On my proxmox host, the media files are owned by root:media. I guess I should create a media group in the nextcloud container, map the group in the same manner as I will map the www-data group and add nextcloud user to the group?
I know there are several threads related to bind mounts to unprivileged containers. I think I got on how to do it, but I do not know where to start in my case.
I've set up nextcloud, using tteks (rip!) script for alpine. The basic stuff is set up after some tweaking, but now I need two bind mounts. One should be the nextcloud data directory, the other is access to my media.
Within the container, I run nextcloud with
- user nextcloud
- uid 104
- group www-data
- gid 82
- uid 104 is taken
- postfix user
- nextcloud user is not (yet) existing
- gid 82 is not taken
- www-data has gid 33
1.) nextcloud data directory
I guess, I would need to create a nextcloud user on the host. As a next step, I would change the uid within to container to the uid of 'nextcloud' on the host? If so, I would align the container www-data gid to the one of the host.
- In this case, how would the lxc.idmap config and the /etc/sub{u,g}id need to be set?
- Is there a safe way to change the ids?
2.) media directory
On my proxmox host, the media files are owned by root:media. I guess I should create a media group in the nextcloud container, map the group in the same manner as I will map the www-data group and add nextcloud user to the group?
Last edited: