ONLYOFFICE does not start using latest document server docker image 7.3.x

First to mention: there are no logs nor errors when updating onlyoffice docker image from 7.2.2.56 to latest.

Latest means 7.3.x Version.
getting from here: https://hub.docker.com/r/onlyoffice/documentserver/tags

docker stats delivers a working document server
URL of docuemnt server is reachable
https://URL-OF-DOC-SERVER:443

Saving settings in Nextcloud → Admin → onlyoffice (all ok)

Opening a sheet → empty no erros, no logs, just an empty sheet and menue of document not loading (just gray fields)

Image Problem or Nextcloud AddOn Problem?

Append: downgrading to image 7.2.2.56 → all ok → worksheets loading again as expected

Is there anyone outside who has the combination NC 25.0.3 + ONLYOFFICE AddOn 7.6.8 + docker image 7.0.3.x working?

Or found a workaround maybe for a while?

No… I use NC and OO on unraid. 7.0.3.184 is not working in combination with NC 25.0.3 + 7.6.8. A rollback to OnlyOffice 7.2.2.56 helps and is functional.

I have OO & NC in docker, can confirm that I had to downgrade OO

I have no idea if the following is relevant or helps, but FWIW:

When I started to use OnlyOffice with Nextcloud, I first tried the official OnlyOffice docker image, and after becoming half bald from it (IMO that image is an utter piece of c**p, one of the worst I have ever dealt with) I found this one from OwnCloud:

It’s a much better Docker image for OnlyOffice, and I am running it just fine with Nextcloud 24 (haven’t tried Nextcloud 25 yet). Can highly recommend it.

Now, if the cause of the problem here lies in OnlyOffice itself, then this might be irrelevant, but if it has anything to do with how it is packaged or such, then trying this other image might be worth it. I have no idea, I haven’t updated the image in a while.

Thanks for your hint!

I have tried to modify my install script for this image, but after start of the docker image (i see it running with docker stats) i get a NGinx Bad Gateway 500 error.
Tried to log in to this docker image with

docker exec -ti ONLYOFFICE bash

function only for seconds before it logs me out automatically? Don’t know why.
Tried to find out what is up with the NGinx Server in the Office Container and why it don’ start.

I have jwt enabled …

my script for downloading and starting docker is as follows


#!/bin/bash
#
echo "Stoppe docker container ONLYOFFICE"
docker stop ONLYOFFICE
docker rm ONLYOFFICE
docker system prune -a -f
#
echo "Lade neuestes image herunter ..."
docker pull owncloudops/onlyoffice
echo "Starte neuen Container ONLYOFFICE; Portmapping 8443:443"
#
docker run --name=ONLYOFFICE -i -t -d -p 8443:443 --restart=always --add-host=FQDN-NAME-NEXTCLOUD:IP-NEXTCLOUD \
    -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
    -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
    -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
    -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \
    -e JWT_ENABLED='true' -e JWT_SECRET='MY-JWT-PASSWORD' owncloudops/onlyoffice
#
echo "ONLYOFFICE neu gestartet"
docker ps
echo "Sende Email >>"
/usr/bin/sendEmail -v -f MAIL-SENDER -s MY-MAILSERVER:587 -xu MAILUSER -xp MAILPASSWORD -t MAIL-RECEIPIENT -o tls=yes -u ONLYOFFICE Image update und Docker Neustart -m Der ONLYOFFICE docker container wurde mit einem neuen Image gestartet! -a /var/log/oo_update.log
echo "Starte Dienste neu"
systemctl stop php8.1-fpm && systemctl stop nginx && systemctl restart postgresql
echo "PostgreSQL erfolgreich neu gestartet"
sleep 1
systemctl start php8.1-fpm
echo "PHP 8.1 erfolgreich neu gestartet"
sleep 1
systemctl start nginx
echo "NGinx Wegserver erfolgreich neu gestartet"
exit 0

Maybe my script does not work for this owncloud image correctly, any advise?

(i suppose my Environment Variables from the onlyoffice/documentserver container do not fit to the “owncloudops/onlyoffice” container mariadb … )

For a while i am back to onlyoffice/documentserver but very interested in the ownloadops image to get it working, Thanks again for help!!

Append:
it seems to be the mariadb / mysql server that does not start within the documentserver

with docker logs ONLYOFFICE i get many of those error messages:

error: operation timed out
2023-02-07 10:08:18 [INFO] [entrypoint] Preparing Onlyoffice
2023-02-07 10:08:18 [INFO] [entrypoint] Wait for database server at '127.0.0.1:3306'

or

error: operation timed out
2023-02-07 10:08:18 [INFO] [entrypoint] Preparing Onlyoffice
2023-02-07 10:08:18 [INFO] [entrypoint] Wait for database server at 'mariadb:3306'

I appended the ENVIRONMENT variables for “ONLYOFFICE_DB_…” parameters without success

Hmm, I would highly recommend using Docker Compose (v2, not v1) for orchestrating the running of your images, instead if just Docker commands and scripts.

For reference, here is the cut-out of my docker-compose.yaml for how I run my images for OnlyOffice:

services:
  redis:
    build: ./redis/docker
    restart: unless-stopped
    volumes:
      - redis_data:/data
    networks:
      - redis
    cap_drop: [ALL]
    read_only: true
    security_opt: [no-new-privileges]
    mem_limit: ${REDIS_MEMORY_LIMIT:-128m}

  mariadb:
    build: ./mariadb/docker
    restart: unless-stopped
    volumes:
      - mariadb_data:/var/lib/mysql
      - mariadb_log:/var/log/mysql
      - ./mariadb/docker/init-onlyoffice-db.sh:/docker-entrypoint-initdb.d/init-onlyoffice-db.sh:ro
    tmpfs:
      - /run/mysqld:rw,noexec,nosuid,size=128k
      - /tmp:rw,noexec,nosuid,size=10m
    networks:
      - mariadb
    cap_drop: [ALL]
    read_only: true
    security_opt: [no-new-privileges]
    mem_limit: ${MARIADB_MEMORY_LIMIT:-256m}
    environment:
      MARIADB_ROOT_PASSWORD: ${MARIADB_MASTER_PASSWORD:?Value required for MARIADB_MASTER_PASSWORD}
      MARIADB_ONLYOFFICE_USER: ${MARIADB_ONLYOFFICE_USER:-onlyoffice}
      MARIADB_ONLYOFFICE_PASSWORD: ${MARIADB_ONLYOFFICE_PASSWORD:?Value required for MARIADB_ONLYOFFICE_PASSWORD}
      MARIADB_ONLYOFFICE_DB: ${MARIADB_ONLYOFFICE_DB:-onlyoffice}

  rabbitmq:
    build: ./rabbitmq/docker
    restart: unless-stopped
    volumes:
      - rabbitmq_data:/var/lib/rabbitmq
      - rabbitmq_log:/var/log/rabbitmq
    networks:
      - rabbitmq
    cap_drop: [ALL]
    read_only: true
    security_opt: [no-new-privileges]
    mem_limit: ${RABBITMQ_MEMORY_LIMIT:-256m}

  onlyoffice:
    image: owncloudops/onlyoffice:7.1.1-4
    restart: unless-stopped
    depends_on:
      - mariadb
      - redis
      - rabbitmq
    volumes:
      - onlyoffice_data:/var/lib/onlyoffice
      - onlyoffice_nginx_log:/var/log/nginx
      - /etc/onlyoffice/documentserver  # Required by entrypoint script :(
      - /var/lib/nginx  # Required by nginx.
      - /tmp  # In order to support a larger size that doesn't have to remain in host's memory.
      - /run  # Required by nginx running unprivileged (since we can't set a mode on the tmpfs, although this is fixed in newer Docker Compose versions so with a new enough version of that we can replace this with a tmpfs instead).
    networks:
      - onlyoffice
      - mariadb
      - redis
      - rabbitmq
      - proxy
    cap_drop: [ALL]
    read_only: true
    security_opt: [no-new-privileges]
    mem_limit: ${ONLYOFFICE_MEMORY_LIMIT:-1024m}
    environment:
      ONLYOFFICE_DB_HOST: mariadb
      ONLYOFFICE_DB_USER: ${MARIADB_ONLYOFFICE_USER:-onlyoffice}
      ONLYOFFICE_DB_PASSWORD: ${MARIADB_ONLYOFFICE_PASSWORD:?Value required for MARIADB_ONLYOFFICE_PASSWORD}
      ONLYOFFICE_DB_NAME: ${MARIADB_ONLYOFFICE_DB:-onlyoffice}
      ONLYOFFICE_REDIS_HOST: redis
      ONLYOFFICE_AMQP_HOST: rabbitmq
      ONLYOFFICE_JWT_ENABLED: true
      ONLYOFFICE_JWT_SECRET: ${ONLYOFFICE_JWT_SECRET:?Value required for ONLYOFFICE_JWT_SECRET}
      ONLYOFFICE_JWT_HEADER: Authorization
      ONLYOFFICE_JWT_IN_BODY: true
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.onlyoffice.rule=Host(`${ONLYOFFICE_HOSTNAME:?Value required for ONLYOFFICE_HOSTNAME}`)'
      - 'traefik.http.routers.onlyoffice.entrypoints=web-secure'
      - 'traefik.http.routers.onlyoffice.tls.certresolver=letsencrypt-production'
      - 'traefik.http.routers.onlyoffice.middlewares=headers-onlyoffice'
      - "traefik.http.middlewares.headers-onlyoffice.headers.customRequestHeaders.X-Forwarded-Proto=https"  # https://github.com/ONLYOFFICE/DocumentServer/issues/920#issuecomment-740630811

networks:
  redis:
  mariadb:
  rabbitmq:
  onlyoffice:
  proxy:
    external: true

volumes:
  redis_data:
  mariadb_data:
  mariadb_log:
  rabbitmq_data:
  rabbitmq_log:
  onlyoffice_data:
  onlyoffice_nginx_log:

As you can see I am using Traefik (which provides the network named proxy) as a reverse proxy for the HTTP(S) but you can just ignore that if you don’t want it.

Thanks for this cut-out …

One question

have you set a service for “redis” because when i try to start with docker compose up i get the message

service "onlyoffice" depends on undefined service redis: invalid compose project

Sorry, I missed including the redis service, network and volume. I added them in the paste in my previous post.

Ah great thanks.
I have to append also redis in networks and volumes section

After that i started docker compose up and got this

[+] Building 0.0s (0/0)                                                                                                                                                                          
unable to prepare context: path "./mariadb/docker" not found

I am really not familiar with docker compose and i don’t know if i had to modify more in the owncloudops/onlyoffice image?

The things I copied were the cut-out from my Docker Compose file. It wasn’t meant to be a 100% copy-pastable example (although it’s probably 99%).

You still need to replace the build: ./mariadb/docker with an image directive if you want to use the MariaDB image directly, or supply your Dockerfile if you want to use that.

You can replace the build line for mariadb with image: mariadb:10.9.3, the one for redis with image: redis:7.0.4-alpine and the one for rabbitmq with image: rabbitmq:3.10.7-alpine. The only things I did in my custom Dockerfiles for those services were to disable the root login and also make each of them run as their own unprivileged user (mysql:mysql, redis:redis and rabbitmq:rabbitmq respectively).

PS: You can always swing by the #docker channel on libera.chat if you get stuck on something Docker related :slight_smile:

i have used the image directive but now i still have the prob that the mariadb server timed out in the OO image

[+] Running 3/2
 ⠿ Container onlyoffice-redis-1    Running                                                                                                                                                  0.0s
 ⠿ Container onlyoffice-mariadb-1  Recreated                                                                                                                                                8.7s
 ⠿ Container ONLYOFFICE            Recreated                                                                                                                                                0.0s
Attaching to ONLYOFFICE, onlyoffice-mariadb-1, onlyoffice-rabbitmq-1, onlyoffice-redis-1
onlyoffice-mariadb-1   | 2023-02-07 15:56:53 [INFO] [entrypoint] Preparing Onlyoffice
onlyoffice-mariadb-1   | 2023-02-07 15:56:53 [INFO] [entrypoint] Wait for database server at 'mariadb:3306'
ONLYOFFICE             | 2023-02-07 15:56:54 [INFO] [entrypoint] Preparing Onlyoffice
ONLYOFFICE             | 2023-02-07 15:56:54 [INFO] [entrypoint] Wait for database server at 'mariadb:3306'
onlyoffice-rabbitmq-1  | error: operation timed out
onlyoffice-rabbitmq-1 exited with code 0
onlyoffice-rabbitmq-1  | 2023-02-07 15:57:04 [INFO] [entrypoint] Wait for database server at 'mariadb:3306'
onlyoffice-redis-1     | error: operation timed out
onlyoffice-redis-1 exited with code 0
onlyoffice-redis-1     | 2023-02-07 15:57:05 [INFO] [entrypoint] Wait for database server at 'mariadb:3306'
onlyoffice-mariadb-1   | error: operation timed out
onlyoffice-mariadb-1 exited with code 0
onlyoffice-mariadb-1   | 2023-02-07 15:57:09 [INFO] [entrypoint] Preparing Onlyoffice
onlyoffice-mariadb-1   | 2023-02-07 15:57:09 [INFO] [entrypoint] Wait for database server at 'mariadb:3306'
ONLYOFFICE             | error: operation timed out
ONLYOFFICE exited with code 0
ONLYOFFICE             | 2023-02-07 15:57:10 [INFO] [entrypoint] Wait for database server at 'mariadb:3306'
onlyoffice-rabbitmq-1  | error: operation timed out
onlyoffice-rabbitmq-1 exited with code 0
onlyoffice-rabbitmq-1  | 2023-02-07 15:57:20 [INFO] [entrypoint] Wait for database server at 'mariadb:3306'
onlyoffice-redis-1     | error: operation timed out
onlyoffice-redis-1 exited with code 0
onlyoffice-mariadb-1   | error: operation timed out
onlyoffice-mariadb-1 exited with code 0
onlyoffice-mariadb-1   | 2023-02-07 15:57:24 [INFO] [entrypoint] Preparing Onlyoffice
onlyoffice-mariadb-1   | 2023-02-07 15:57:24 [INFO] [entrypoint] Wait for database server at 'mariadb:3306'
ONLYOFFICE             | error: operation timed out

Hm, did you create an .env file containing all the environment variables that are referenced in the compose file?

After many tries and some coffees :smile: :upside_down_face:

it seems as if i were close to the luck …

first i misstake that i need a DB Conf file in a dir that i use in the compose.yaml.
→ so i created a init-onlyoffice-db.sh file with the mariadb parameters

→ the reason why the DB could not start.

OK after having this i used for all images the same source => owncloudops/onlyoffice (for redis, mariadb, onlyoffice …)

starting my docker compose up -d delivers

docker compose up -d
[+] Running 8/8
 ⠿ Network onlyoffice_redis       Created                                                                                                                                                 0.0s
 ⠿ Network onlyoffice_rabbitmq    Created                                                                                                                                                 0.1s
 ⠿ Network onlyoffice_onlyoffice  Created                                                                                                                                                 0.1s
 ⠿ Network onlyoffice_mariadb     Created                                                                                                                                                 0.1s
 ⠿ Container MariaDB              Started                                                                                                                                                 0.7s
 ⠿ Container REDIS                Started                                                                                                                                                 0.7s
 ⠿ Container RabbitMQ             Started                                                                                                                                                 0.6s
 ⠿ Container ONLYOFFICE           Started                                                                                                                                                 1.2s

YES! But never the less my document-server is not running

502 Bad Gateway

so i tried to find a way into the ONLYOFFICE docker (it logs me out after seconds)

with following command i where logged in permanently

docker run -it --entrypoint=/bin/bash ONLYOFFICE

while ONLYOFFICE is the container name of the onlyoffice docker.

After nginx -t i saw the error message

nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] socket() [::]:8080 failed (97: Address family not supported by protocol)
nginx: configuration file /etc/nginx/nginx.conf test failed

The line producing the error comes from the /etc/nginx/vhost.conf

server {
    listen 0.0.0.0:8080;
    listen [::]:8080 default_server;
    server_tokens off;

Now my Question: How can i edit this to the following

server {
listen 0.0.0.0:8080;
#listen [::]:8080 default_server;
server_tokens off;

With su i don’t have any password
nano is unknown

So which superuser is allowed / which editor to be need?

I have an IPv4 only so i don’t need IPv6 for now.

Copying is no solution because …

docker cp /tmp/vhost.conf ONLYOFFICE:/etc/nginx/
Preparing to copy…
Copying to container - 3.072kB
Successfully copied 3.072kB to ONLYOFFICE:/etc/nginx/
Error response from daemon: container rootfs is marked read-only

OK problems goes on …

i set a volume with ./PATH-TO-LOCAL-NGINX-DIR:/etc/nginx in my docker compose yaml.
Locally i edited the vhost.conf and nginx -t is now successful.

Never the less i get 502 Bad Gateway error and don’t know why.

Sorry for not getting back earlier, been (and still am) busy. Sorry you are having problems.

I changed my onlyoffice image from owncloudops/onlyoffice:7.1.1-4 to owncloudops/onlyoffice:7.3.0-2, and while I did have to remove a specific anonymous volume (the one for /etc/onlyoffice/documentserver in the compose file) in order for this volume (or rather, it’s replacement volume) to be repopulated with new files from the image, it started fine after that. I have tested it with my Nextcloud (image nextcloud:24.0.9-fpm-alpine) and can edit a test .docx file just fine.

Maybe this is a problem in NC25? Maybe at some point I can update to NC25 and see if it breaks for me too, can’t do that now though.

Thanks for reply. I am pretty sure that i still have not configured everything properly. I had several probs for getting the mariadb server running - a prerequisite for owncloudops to function.

After oo was running i was able to log in with
docker exec -it ONLYOFFICE /bin/bash

permanently. I saw that the owncloudops onlyoffice docker instance seems not to be able to be connected via SSL but instead port 8080 (http only).

In my scenario i will not change the way i connect my OO server → 8443:443 via https://…
My Let’s Encrypt Certs are offered to the docker instance via volumes.

Next NC 25.0.4 is coming near (Due date 16. Feb. 2023) so i will give this a try again.
:slightly_smiling_face:

I will stay tuned with trying to get the owncloudops version running, but i think the whole nginx.conf has to be rewritten to get SSL connections working.

Meanwhile the 7.3.2.8 is out of onlyoffice/documentserver and it is running under NC 25.0.3 as well.
My script updated OO Server and it is working again.

The new onlyoffice websocket bit requires a change in nginx configuration: ONLYOFFICE 7.3 websocket path changed - #11 by Carl - Docs - ONLYOFFICE

I never did an upgrade of NC24 to NC25 with this setup, instead I reinstalled it all (for other reasons than having problems).

I can report that using the owncloudops/onlyoffice:7.3.3-1 Docker image along with Nextcloud 25.0.5.1 and the ONLYOFFICE 7.8.0 app works just fine.

@chrissi55 Where are you at now, do you have it working?

as you can see some posts above, i wrote that the 7.2.xx already was good.

Now i use the 7.3.3.x as well - what is new - first time the plugin installer seems to work.
So DeepL, ChatGPT, and so on can be installed in this docker image - for me the first time that it work. All other versions before only showed a blanc screen, when opening the plugin installer…