From f33de18b3bdc4cef3474a6e7640ec4b2bfa9ec2b Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Fri, 16 Aug 2019 09:44:13 +0200 Subject: [PATCH] add OnlyOffice Signed-off-by: tobiasKaminsky --- developer_manual/how_to/index.rst | 52 ++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/developer_manual/how_to/index.rst b/developer_manual/how_to/index.rst index 7cfcd0d67..2f4ff8afb 100644 --- a/developer_manual/how_to/index.rst +++ b/developer_manual/how_to/index.rst @@ -49,4 +49,54 @@ Collabora without SSL - with this approach you can also use it with mobile clients 4) troubleshoot - http://172.17.0.2:9980/hosting/capabilities should give you: - {"convert-to":{"available":false},"hasMobileSupport":true,"hasTemplateSaveAs":true,"productName":"Collabora Online Development Edition"} \ No newline at end of file + {"convert-to":{"available":false},"hasMobileSupport":true,"hasTemplateSaveAs":true,"productName":"Collabora Online Development Edition"} + +OnlyOffice +------ + +1) Create self signed cert, should be on a permanent path:: + + mkdir -p /tmp/oo/certs + cd /tmp/oo/certs + openssl genrsa -out onlyoffice.key 4096 + openssl req -new -key onlyoffice.key -out onlyoffice.csr + openssl x509 -req -days 3650 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt + openssl dhparam -out dhparam.pem 4096 + chmod 400 onlyoffice.key + chmod 400 onlyoffice.crt + chmod 400 onlyoffice.csr + chmod 400 dhparam.pem + +2) Start docker, important: do not use certs folder, but parent folder: +docker run --name=ONLYOFFICEDOCKER -i -t -d -p 4433:443 -e JWT_ENABLED='true' -e JWT_SECRET='secret' --restart=always -v /tmp/oo/:/var/www/onlyoffice/Data onlyoffice/documentserver + +3) go into docker: +- docker exec -it /bin/bash ONLYOFFICEDOCKER +- apt-get update +- apt-get install vim -y +- vim ./etc/onlyoffice/documentserver/default.json + - change rejectUnauthorized to false +- vim /etc/onlyoffice/documentserver/local.json + - change token -> inbox -> header to "AuthorizationJWT" + - change token -> outbox -> header to "AuthorizationJWT" +- edit config.php of NC server: + - add:: + + 'onlyoffice' => + array ( + 'verify_peer_off' => true, + 'jwt_secret' => 'secret', + 'jwt_header' => 'AuthorizationJWT' + ), + +- test with local ip: https://localhost:4433 + - accept cert warning + - verify that "Document Server is running" is shown + +- on Nextcloud + - download & enable OnlyOffice app + - configure: + - Document Editing Service address: https://localhost:4433/ + - Secret key : secret (as above) + - Document Editing Service address for internal requests from the server: https://localhost:4433/ + - Server address for internal requests from the Document Editing Service: http://192.168.1.95/nc16/ (needs to be real IP address, as localhost points to docker)