OnlyOffice compiled with Mobile Edit Back

@Nemskiller

Good work!

I see thereā€™s been quite a bit of progress on the open-sourcing of things.

Good afternoon. There is an interesting error. If the Docker is located on the server with nextcloud, the password is accepted. If on a separate host with nginx ssl, when trying to set a password, it writes ā€œError while downloading the document file to be convertedā€, if without a password, then ā€œInvalid tokenā€. Nginx settings for your instructions.

@EvKo I just made testing for your case.
I donā€™t have any problem.
My nextcloud server is NC 18.0.5 with nginx 1.19 and valid ssl certs
My OnlyOffice is on another wan with my docker version and nginx 1.19 with valid ssl cert.
Contact me by MP i will give you an onlyoffice url with password to test

Edit : The nginx conf file was wrongly configured.

How can I restart server safely disconnecting all users from documents?
sudo docker exec ā€œCONTAINERā€ documentserver-prepare4shutdown.sh - dont work

I donā€™t have access for the moment at my computer.
You could do a
docker exec -it CONTENER_ID /bin/bash and look where is the script and launch it to see if you have problems

Maybe i will have to add it by hand :raised_hand_with_fingers_splayed:t2:. But thank you for this option, i will look at it to implement that on the next update

I have priv certificate and everything is cool, but how to start a docker with Https, e.g. port 921? . I tried

docker run -i -t -d -p 921: 443 --restart = always
-v / app / onlyoffice / DocumentServer / data: / var / www / onlyoffice / Data nemskiller007 / officeunleashed

/app/onlyoffice/DocumentServer/data/certs < - I put the certificate here
But I think something is wrong: /

Donā€™t use OnlyOffice with selfcert or certs inside the docker containers.
Configure your Nginx or Apache to proxy it.
It is better to handle ssl certs with certbot for Nginx (or Apache) than to configure the Docker Container of OnlyOffice.

In local the proxy will talk with onlyoffice container in http mode without cert. and for the client all will be in https mode.

I understand, I understand logical :slight_smile:
But I wanted to know if you gave it to your docker?
If so, how to run it?
Is there no such option and itā€™s over :slight_smile:

Alright,
i just updated my Docker Image on Docker HUB.
You can now use this command to shutdown the internal functions of OnlyOffice before restarting your Docker Container.
docker exec ā€œCONTAINERā€ documentserver-prepare4shutdown.sh
works now.

1 Like

Hi,
Thanks for this. Any thoughts on how to add plugins like Zotero. I followed the instructions in https://github.com/ONLYOFFICE/plugin-zotero listed using method 1. Placed the plugin src folder in /out/linuxā€¦/sdkjs-plugins/ but the plugin does not appear.

@Nemskiller,
Thanks a lot for your job :slight_smile:
one question, is it possible to have only document server with the fix ? and use seperate containers for rabbitmq, database ?
I donā€™t know if it is linked but your image (including all services) consume arround 4% CPU, 300mb of RAM.
When the official onlyoffice document_server use arround 0.3% of CPU and 700mb of RAM + rabbitmq 0.45% of CPU and 110mb of RAM + postgre 0.02% of CPU and 15 mb of RAM

Do you have any idea on why this difference between the 2 ? mostly on CPU and RAM ?

I managed to download the docker container worked just fine, but I would like your help on how to point my nextcloud to this installation.
I have 2 containers running on the same machine, 1 is the nextcloud that already points to a pre-installed onlyoffice pointing to https://meu-dominio.com.br/onlyoffice-documentserver/.
This onlyoffice container is configured on port 0.0.0.0:53443 443 / tcp.
I would like your help to make changes to your docker image so that it has the same settings.
I would run your image on the same server as the image from the previous onlyoffice keeping the same note in the nextcloud.

You will have to dive inside your pre-installed onlyoffice docker container and extract the conf file (the one i spoke about changing the passcode)
You will have also to take off your cert and put them inside my container.

Itā€™s kind of bad using OnlyOffice Docker container in HTTPS Mode (443) on every update you have to fight a little bit on configuring it.
You should configure your Apache or Nginx Proxy using HTTPS in the front side and Ā« proxy Ā» the packets to your container in HTTP (80), like i do in this HOW TO.

@Nemskiller,
sorry for my ignorance, but i donā€™t know much about where these files are.
could you tell me where to find the mentioned conf file?
this would be the nginx conf file located in the /etc/nginx/nginx.conf directory
and the certificate files are what are in the / var / www / onlyoffice / Data / certs folder?
from already thank you

Hello Nemskiller,

Thank you for spending the time on creating this and sharing it with the community, it works perfectly in my environment!

I wanted to avoid worrying about manual edits for the JWT secret so I made my own fork of the container (not shared publicly at this time) with the below section added to the top of the entrypoint.sh file. Its a quick hack, and there is probably a better way to achieve this but it works for making it a drop-in replacement for people using JWT_ENABLED and JWT_SECRET variables (note: if there are other variables, it doesnā€™t consider them at this time, but support could be added in a similar way). Anyway, figured I would share it back in case anyone finds it useful, feel free to include it in the image or use the idea and implement it in a better way. Alternatively, you can completely ignore this if you think it is a bad idea.

Another thing to note, I also changed the last line of entrypoint.sh from ā€œbashā€ to ā€œtail -f /dev/nullā€ as my container would exit after this script completed. Could be something specific to my environment.

if [ "$JWT_ENABLED" = true ]; then
        sed -i /out/linux_64/onlyoffice/documentserver/server/Common/config/default.json -e "s/{\"string\": \"secret\",/{\"string\": \"$JWT_SECRET\",/g"
        sed -i /out/linux_64/onlyoffice/documentserver/server/Common/config/default.json -e 's/"browser": false,/"browser": true,/g'
        sed -i /out/linux_64/onlyoffice/documentserver/server/Common/config/default.json -e 's/"inbox": false,/"inbox": true,/g'
        sed -i /out/linux_64/onlyoffice/documentserver/server/Common/config/default.json -e 's/"outbox": false/"outbox": true/g'
fi
1 Like

Thanks for your work man. Could you contact me https://t.me/H05ted have some questions. Thanks.

sorry for my ignorance, but i donā€™t know much about where these files are.
could you tell me where to find the mentioned conf file?
this would be the nginx conf file located in the /etc/nginx/nginx.conf directory
and the certificate files are what are in the / var / www / onlyoffice / Data / certs folder?
from already thank you

when trying to access the server through http: // my-ip / 8000 the following message appears
502 Bad Gateway
what can i do to fix this error?

Iā€™m getting this error when trying to start the image, any idea?

ERROR:  database "onlyoffice" already exists
ERROR:  role "onlyoffice" already exists
GRANT
CREATE TABLE
psql:/out/linux_64/onlyoffice/documentserver/server/schema/postgresql/createdb.sql:20: NOTICE:  relation "doc_changes" already exists, skipping
CREATE TABLE
psql:/out/linux_64/onlyoffice/documentserver/server/schema/postgresql/createdb.sql:36: NOTICE:  relation "task_result" already exists, skipping
CREATE FUNCTION
mkdir: cannot create directory 'fonts': File exists

@cowbe0x004 This errors are normal because the Container have already created those files.

I am sorry for the others but i am in vacations and i donā€™t have my computer. I canā€™t test and upgrade the container at the moment.

OnlyOffice released v5.6.0. This will be my first job when i will come back. Around the 20th of August

1 Like