Deploying Onlyoffice Docs on Openshift

Hello community,

I am trying to deploy an ONLYOFFICE DocumentServer instance connected to my existing internal PostgreSQL, Redis, and RabbitMQ services.

When using Docker directly, this setup works fine with a simple docker run command. For example:

docker run -it -d -p 8080:80 \
  -e DB_TYPE=postgres \
  -e DB_HOST=10.123.1.121 \
  -e DB_PORT=5432 \
  -e DB_NAME=onlyoffice \
  -e DB_USER=onlyoffice \
  -e DB_PWD=onlyoffice \
  -e AMQP_URI=amqp://onlyoffice:onlyoffice@10.123.1.122:5672/onlyoffice \
  -e REDIS_SERVER_HOST=10.123.1.123 \
  onlyoffice/documentserver:latest

The container starts successfully and connects to PostgreSQL, RabbitMQ, and Redis without problems.

However, when I try to redeploy the same setup on OpenShift, using the same environment variables, I can see in the logs that PostgreSQL, RabbitMQ, and Redis connections succeed — but the container throws many permission denied errors (EACCES) when trying to write or chown files in directories like /etc/onlyoffice, /var/www/onlyoffice, /var/lib/onlyoffice, /var/log, etc.

It looks like the official ONLYOFFICE image assumes the container runs as root, but OpenShift enforces a restricted SCC where containers run as a random non-root UID. Because of this, the startup scripts fail to adjust file ownership or create keys/config files, and the application never finishes initialization.

:point_right: My questions are:

  1. Is there an official way (or recommended practice) to run ONLYOFFICE DocumentServer on OpenShift with a restricted SCC?
  2. Do I need to build a custom image that prepares writable directories for arbitrary UIDs?
  3. Or is there already a community/official OpenShift-compatible image?

I have attached the error logs for reference (showing permission errors on startup).

Any guidance or examples from the community would be greatly appreciated :pray:

Thanks in advance!

chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/177': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/178': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/179': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/180': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/181': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/182': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/183': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/184': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/185': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/186': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/187': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/188': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/189': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/190': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/191': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/192': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/193': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/194': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/195': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/196': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/197': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/198': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/199': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/200': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/201': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/202': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/203': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/204': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/205': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/206': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/207': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/208': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/209': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/210': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/211': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/212': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/213': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/214': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/215': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/216': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts/217': Operation not permitted
chown: changing ownership of '/var/www/onlyoffice/documentserver/fonts': Operation not permitted
/usr/bin/documentserver-flush-cache.sh: 27: cannot create /etc/nginx/includes/ds-cache.conf: Permission denied
chown: changing ownership of '/var/www/onlyoffice/documentserver/web-apps/apps/api/documents/api.js': Operation not permitted
Installing plugins, please wait...Done
* Reloading nginx configuration nginx
...fail!
JWT is enabled by default. A random secret is generated automatically. Run the command "docker exec onlyoffice-5 sudo documentserver-jwt-status.sh" to get information about JWT.

Hello @gerhard.sitorus,
The onlyoffice/documentserver image is not intended to be deployed in OpenShift environment. We have special images for that, but they are available only for a commercial use.

Hello, thank you for the clarification about OpenShift.

I would like to ask another question: how about Kubernetes in general?

Is the community onlyoffice/documentserver image also not intended to be deployed on a standard Kubernetes cluster (with typical non-root containers)?

Or is it officially supported to run on Kubernetes, while OpenShift specifically requires the commercial image?

This information will help me decide whether I can proceed with a vanilla Kubernetes deployment, or if I should plan for the commercial version.

Thanks again for your guidance.

@gerhard.sitorus,
Yes, the same goes for the Kubernetes installations. Only commercial images (onlyoffice/docs-converter-xx, onlyoffice/docs-docservice-xx) can be used.