Nextcloud and OnlyOffice Integration

Nextcloud and OnlyOffice Integration

Joined
Jan 4, 2014
Messages
1,644
Basil Hendroff updated Nextcloud and OnlyOffice Integration with a new update entry:

OnlyOffice Community Server removed

The OnlyOffice Document Server is the only component of the OnlyOffice Community Server that is required for Nextcloud-OnlyOffice Integration. Steps 4 to 6 of this resource have been revised to reflect this.

Update instructions will be provided in this section shortly, for those who have used to an earlier version of this resource. While this step is entirely optional, future releases of this resource may use Docker Compose for installing and automatically updating OnlyOffice Document...

Read the rest of this update entry...
 
Joined
Jan 4, 2014
Messages
1,644
Basil Hendroff updated Nextcloud and OnlyOffice Integration with a new update entry:

Introducing Docker Compose

This update brings us one step closer to automatic updating of the OnlyOffice Document Server. Docker Compose is the enabler for this.

Update instructions are provided below for those who have applied the previous update.

1. From a Ubuntu terminal window, remove the OnlyOffice Document Server container sudo docker rm -f onlyoffice-document-server.

2. Remove the OnlyOffice image. First list all images sudo docker images -a, then delete the OnlyOffice image...

Read the rest of this update entry...
 
Joined
Jan 4, 2014
Messages
1,644
Joined
Jan 4, 2014
Messages
1,644
Basil Hendroff updated Nextcloud and OnlyOffice Integration with a new update entry:

Caddy V2 and Nextcloud 19 Update

This resource has been updated to use Caddy V2 and Nextcloud 19 in the examples.

Other notable changes in this update:
  1. Caddy V2 code blocks are supplied for Nextcloud, OnlyOffice and Collabora.
  2. For Nextcloud to operate correctly behind a reverse proxy, config.php overwrite parameters may need to be modified.
  3. To free up port 80, OnlyOffice now listens on port 8880.

Read the rest of this update entry...
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
I have similar setup, I mean Nextcloud installed with danb35 script (http mode), onlyoffice in docker's container. Difference is both of them are behind Nginx reverse proxy with SSL enabled. Anyway, test instance of Nextcloud worked fine with Onlyoffice. I removed it together with all datasets, installed Nextcloud and didn't touch proxy settings. And now can't get Onlyoffice to work - I'm not able to connect Nextcloud to Onlyoffice. I receive error "Error while downloading the document file to be converted". I've checked Onlyoffice logs and it says, in general "message":"Access denied":
Code:
[2020-09-14T23:17:53.936] [ERROR] nodeJS - error downloadFile:url=https://next.xxxxx.xx/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.HO8yVThljmrKFAiXsGoWMtnWnjfNFj-idymye3GiplM;attempt=2;code:null;connect:null;(id=conv_check_1583334393_docx)
Error: Error response: statusCode:403 ;body:
{"message":"Access denied"}
    at Request._callback (/snapshot/server/build/server/Common/sources/utils.js:0:0)
    at Request.init.self.callback (/snapshot/server/build/server/Common/node_modules/request/request.js:185:22)
    at Request.emit (events.js:198:13)
    at Request.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:198:13)
    at IncomingMessage.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:286:20)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1143:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

I opened above link through proxy, accessed also jail directly, using its IP and result displayed in browser is the same: "message":"Access denied".
I've also tried enabling authorization (as per https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/153) but without luck, all the same.
What bothers me the most is why it had been working before and now, after clean reinstall, it doesn't. The same is when I try to connect to demo Onlyoffice server...
Any ideas?
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
Can you access Nextcloud at the equivalent of https://cloud.mydomain.com (see step 2 in this resource)?
Can you access OnlyOffice at the equivalent of https://office.mydomain.com (see step 5 in this resource)?
Yes, I can access both services through proxy and like I said, all worked fine in test Nextcloud and now Nextcloud works fine itself.
What I changed so far is:
keep following entry in config.php (as per https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/153 but I removed "jwt_secret" => "secret-from-local.json",)
'onlyoffice' =>
array (
'jwt_header' => 'AuthorizationJwt',
),
edited local.json in Onlyoffice, change from:
},
"inbox": {
"header": "Authorization"
},
"outbox": {
"header": "Authorization"
}
to
},
"inbox": {
"header": "AuthorizationJwt"
},
"outbox": {
"header": "AuthorizationJwt"
}
And do not type any secret/password in Onlyoffice setup page in Nextcloud. And all of sudden it has started working! But I'm not so sure for how long. Maybe within those few days Onlyoffice app was updated and that's why stopped working the same way it did 48 hrs before ;-)?
 
Joined
Jan 4, 2014
Messages
1,644
This resource gets Nextcloud and OnlyOffice (noSSL for both; the local network is considered trusted) working behind a reverse proxy, but any further hardening is considered out-of-scope and is on the onus of the individual to figure out. However, I was curious in this case as I have a password set up for the Nextcloud-Collabora Integration resource, but not the Nextcloud-OnlyOffice resource. To restrict access to the OnlyOffice Document Server, this is what I had to alter.

Step 4: OnlyOffice Docker Compose file

Code:
version: '3.3'
services:
  documentserver:
    ports:
      - '80:80'
    environment:
      - JWT_ENABLED=true
      - JWT_SECRET=abracadabra
    restart: always
    container_name: onlyoffice-document-server
    image: onlyoffice/documentserver


Step 6: Configure the OnlyOffice connector

screenshot.567.png
 
Last edited:

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
This resource gets Nextcloud and OnlyOffice working behind a reverse proxy, but any further hardening is considered out-of-scope and is on the onus of the individual to figure out. However, I was curious in this case as I have a password set up for the Nextcloud-Collabora Integration resource, but not the Nextcloud-OnlyOffice resource. To restrict access to the OnlyOffice Document Server, this is what I had to alter.

Step 4: OnlyOffice Docker Compose file

Code:
version: '3.3'
services:
  documentserver:
    ports:
      - '80:80'
    environment:
      - JWT_ENABLED=true
      - JWT_SECRET=abracadabra
    restart: always
    container_name: onlyoffice-document-server
    image: onlyoffice/documentserver


Step 6: Configure the OnlyOffice connector
Thanks, I've tried these variables, removed local.json mapping in Onlyoffice container and also there is no need to add entry in config.php. And it works...
Does it mean that latest Onlyoffice connector requires "AuthorizationJwt" header and therefore it must be enabled in Onlyoffice server along with password? If so, that's a change which gave me a headache :wink:
 
Joined
Jan 4, 2014
Messages
1,644
Does it mean that latest Onlyoffice connector requires "AuthorizationJwt" header and therefore it must be enabled in Onlyoffice server along with password?
It appears so. My understanding of the secret key is that it's a way of restricting access to the document server, so the document server has to be configured with the key.

FYI, these resources were useful in figuring out what to do.
  1. Integrating ONLYOFFICE Community Edition with NextCloud using Docker
  2. Installing Document Server for Docker on a local server
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
What could be a reason that one time documents are open in editor with "Office style" ribbon and sometimes not (there's displayed only thin bar)? There are no errors in onlyoffice container and I did try various settings in Onlyoffice app in Nextcloud...

EDIT:
It looks like that using Nextcloud admin's account lets me to enjoy full functionality of Onlyoffice and regular user doesn't see ribbon...
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644
What could be a reason that one time documents are open in editor with "Office style" ribbon and sometimes not (there's displayed only thin bar)?
The question is somewhat out of scope for this resource, which focuses on the integration aspects of Nextcloud and OnlyOffice rather than a 'how to' for OnlyOffice. Anyway, I suspect you're referring to the 'compact toolbar'. Refer to this OnlyOffice customisation link for details https://api.onlyoffice.com/editors/config/editor/customization.
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
It’s not only about editor’s view, regular user has no access to editing tools. Narrow top toolbar has only thesaurus and translations icons...
Anyway thanks, I’ll try to find help on other forums/threads.
 
Joined
Jan 4, 2014
Messages
1,644
It’s not only about editor’s view, regular user has no access to editing tools
Just to eliminate one possibility, you haven't on the off-chance restricted access to OnlyOffice have you? Check your OnlyOffice connector configuration.

screenshot.589.png
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
Just to eliminate one possibility, you haven't on the off-chance restricted access to OnlyOffice have you? Check your OnlyOffice connector configuration.

View attachment 41570
No, no; it was the very first thing I’d checked.
Since admin has access to all tools, connection is not an issue, only permissions. Either on nextcloud or onlyoffice side. I will toggle restrictions and see maybe something will get unblocked
 
Joined
Jan 4, 2014
Messages
1,644
Try clearing your browser cache as well.

EDIT: I've just confirmed it has nothing to do with the secret key. OnlyOffice works the same way for me for both standard and admin Nextcloud users.
 
Last edited:

listhor

Contributor
Joined
Mar 2, 2020
Messages
133

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
Try clearing your browser cache as well.

EDIT: I've just confirmed it has nothing to do with the secret key. OnlyOffice works the same way for me for both standard and admin Nextcloud users.
Ok, back in action - I had to tick off and on Editor customization settings...
I hope it's the last issue with Nextcloud. :wink:
 
Joined
Jan 4, 2014
Messages
1,644
It depends on whether the missing features are ones you depend on. Refer to earlier post #3. In terms of value-for-money, it's hard to look past the community editions of OnlyOffice and Collabora.
 
Top