[GH-ISSUE #708] Feature request: Allow setting of UID and GID #317

Open
opened 2026-02-26 10:31:51 +03:00 by kerem · 2 comments
Owner

Originally created by @alexanderwiller on GitHub (Feb 2, 2024).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/708

Feature request

Allow setting of UID and GID used by the container.

By implementing this, when bind mounts are used, users are not forced to allocate the containers fixed UID/GIDs to Onlyoffice on the host system as well.

What is the current behavior?

UID 109 and GID 111 are used by the container and cannot be changed easily.

What is the expected behavior?

UID and GID can be set to custom values, e.g. by environment variables PUID and PGID, e.g. as with linuxserver.io images: https://github.com/linuxserver/docker-mariadb?tab=readme-ov-file#docker-compose-recommended-click-here-for-more-info

See also: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/40#issuecomment-295776609

DocumentServer Docker tag:
latest, but all versions should be affected.

Host Operating System:
Ubuntu 22.04 LTS

Originally created by @alexanderwiller on GitHub (Feb 2, 2024). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/708 **Feature request** Allow setting of UID and GID used by the container. By implementing this, when bind mounts are used, users are not forced to allocate the containers fixed UID/GIDs to Onlyoffice on the host system as well. **What is the current behavior?** UID 109 and GID 111 are used by the container and cannot be changed easily. **What is the expected behavior?** UID and GID can be set to custom values, e.g. by environment variables PUID and PGID, e.g. as with linuxserver.io images: https://github.com/linuxserver/docker-mariadb?tab=readme-ov-file#docker-compose-recommended-click-here-for-more-info See also: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/40#issuecomment-295776609 **DocumentServer Docker tag:** `latest`, but all versions should be affected. **Host Operating System:** Ubuntu 22.04 LTS
Author
Owner

@alexanderwiller commented on GitHub (Feb 2, 2024):

After further investigation, I see that a number of users and groups are present in the DocumentServer container:

redis:x:106:108::/var/lib/redis:/usr/sbin/nologin
postgres:x:107:109:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
rabbitmq:x:108:110:RabbitMQ messaging server,,,:/var/lib/rabbitmq:/usr/sbin/nologin

This makes me wonder, is it practical to allow setting all these IDs to custom values by means of some mechanism (e.g said env variables), or should I just use docker volumes that at least provide some level of UID/GID isolation, given that the files are not accessible by the host directly?

No matter what, I think it would be beneficial to allow mapping all services inside of the container to UIDs and GIDs that are not in use on the host by any other service.

<!-- gh-comment-id:1923548806 --> @alexanderwiller commented on GitHub (Feb 2, 2024): After further investigation, I see that a number of users and groups are present in the DocumentServer container: ``` redis:x:106:108::/var/lib/redis:/usr/sbin/nologin postgres:x:107:109:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash rabbitmq:x:108:110:RabbitMQ messaging server,,,:/var/lib/rabbitmq:/usr/sbin/nologin ``` This makes me wonder, is it practical to allow setting all these IDs to custom values by means of some mechanism (e.g said env variables), or should I just use docker volumes that at least provide some level of UID/GID isolation, given that the files are not accessible by the host directly? No matter what, I think it would be beneficial to allow mapping all services inside of the container to UIDs and GIDs that are not in use on the host by any other service.
Author
Owner

@igwyd commented on GitHub (Feb 16, 2024):

Hello @alexanderwiller, sorry for the late reply. Thank for detaled report, I created ticket #66520 with your proposal.

<!-- gh-comment-id:1947812030 --> @igwyd commented on GitHub (Feb 16, 2024): Hello @alexanderwiller, sorry for the late reply. Thank for detaled report, I created ticket #66520 with your proposal.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#317
No description provided.