NC23: How to enable Nextcloud Office

To be honest - after the performance issues with 22.2.1 and now this not working upgrade - maybe its better to reduce the interval of new releases and better spend more time to test it.

7 Likes

For everyone that doesnā€™t want to bother with ā€œbrokenā€ updates anymore: you should give GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance. a try :wink:

Unfortunately it was only advertising. Office for the Nextcloud works the same as before. Either with the Collabora Docker. Or with the Collabora Online - Built-in CODE Server. This app for the Collabora built in code server is probably not working at the moment. So many are probably disappointed. Just like me.

1 Like

Are you sure? It is beta and it says

This is beta software and not production ready. But feel free to use it at your own risk!

1 Like

Seems you are right.

In fact, it is interesting to note that I havce been using external Collabora (CODE) (builtin not installed). After upgrade to NC 23, it works as before but as abvertised, the visuals are better and the external Collabora surprisedly declares itself as ā€œNextCloud Officeā€ when click about.

Upgraded to the newly dropped version of CODE 21.11.4 and Nextcloud Office still doesnā€™t work. Still having the issue where Office documents download instead of opening.

Hereā€™s a guide to get it working - PSA: How to get collabora working on nextcloud 23!

Thanks for this, but my Nextcloud has several hundred GB of data spread across multiple accounts. Iā€™m definitely not in a position to do a clean install on a whim.

You should test new releases then on a seperate test instance before you upgrade your production instance. I only have a small instance for me and my girlfriend, but I always test new releases in a seperate VM with a seperate Nextcloud Installation.

In general, my experience with Nextcloud over the last years has shown, that it is not a good idea to upgrade on day 1 to a new Nextcloud release, especially if you use a lot of apps. There are always a few apps not ready on release day. So either set up a test instance or wait until at least the first point release if you want to be sure that everything is working after a major upgrade. And yes I agree that Nextcloud should only release new versions when at least all core apps are working, but unfortunately my experience has shown that this is almost never the caseā€¦

Now, If you already updated your production instance to Nextcloud 23, you have imho two options: Wait for an update of the Built-In Collabora Server or use the official Collabora Docker image instead. With the Docker image everything is working as advertised, including the new Nextcloud Office interface.

3 Likes

It would be very nice if they would tell us if the build in code server will work again in the future. Or that you have to switch to the Docker Code

I think it was never intended not to work. :wink:

Screenshot_20211204-185115

Here it is, using external collabora instance in kubernetes. I am so suprised that it advertised itself as nextcloud office. It seems that the visual effects enhancements are due to NC codes, not collabora.

Be frank, I never had good experience using built-in onlyoffice or collabora: canā€™t install, or too slow. External services are always better, even u have only one bare metal server. According to my experience, the office function never malfunction after NC upgrade, if hosting it externally.

1 Like

Thanks for this, this worked for me as well. My Collabora intsance is within my cloud server so I just took the internal code block and inserted it into my Nextcloud.conf

Worked a treat

Unfortunately not viable for me because it cant be used behind a reverse proxy.

You should test new releases then on a seperate test instance before you upgrade your production instance. I only have a small instance for me and my girlfriend, but I always test new releases in a seperate VM with a seperate Nextcloud Installation.

Thatā€™s fair enough! Iā€™m still pretty new to Nextcloud so Iā€™ve been trying to keep my instance up to date but I shouldā€™ve probably waited a bit longer.

Having Collabora working isnā€™t super critical so I guess Iā€™ll just wait it out.

Yes, thatā€™s right but you might investigate yourself how it could made work behind reverse proxies. If you open a PR with that we might consider it then :slight_smile:

The problem with ā€œwaiting it outā€ is that it can take months to be fixed if not years.

The developers havenā€™t even addressed the issue yet. Not a peep from them. :slight_smile:

Once I install the Collabora Online App, it completely bricks my Nextcloud instance.

When trying to access my Nextcloud it loads forever until eventually a 504 error shows up, rendering the Nextcloud completely unusable.

I have to manually delete the richdocuments folder from the app directory to resolve the problem.

Used Versions:
Nextcloud 23.0.0.10
Ubuntu 18.04.5
PHP 8.0.13
Collabora Online 5.0.0

I think the problem might be infinite redirects, this is what I could find in the servers apache logs. It goes on like this for a while.

Imgur

Until eventually this comes

Imgur

Yeah, the built-in CODE server totally bricked my NC and half of the other things running on my server. Had to disable it from the command line, then remove it.

Here is what I did to get Nextcloud Office working:

1. Install CODE from Package

cd /usr/share/keyrings
sudo wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg

Create this file:

sudo nano /etc/apt/sources.list.d/collaboraonline.sources

Paste this into the file for Ubuntu 18+ and save the file:

Types: deb
URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-ubuntu1804
Suites: ./
Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg

Update and install:

sudo apt update && sudo apt install coolwsd code-brand

Update Collabora Configuration

sudo coolconfig set ssl.enable false
sudo coolconfig set ssl.termination true
sudo coolconfig set storage.wopi.host nextcloud.example.com
sudo coolconfig set-admin-password
sudo systemctl restart coolwsd

2. Create an NGINX Reverse Proxy Virtual Host

Notice, I removed the ā€œhttpsā€ and replaced it with ā€œhttpā€ in all of the proxy_pass lines. This part is what left me scratching my head for a while. Iā€™m not sure why the Collabora site lists those lines with https. We are doing https at the webserver level.

server {
 listen       443 ssl;
 server_name  collaboraonline.example.com;

 ssl_certificate /path/to/certificate;
 ssl_certificate_key /path/to/key;

 # static files
 location ^~ /browser {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Host $http_host;
 }

 # WOPI discovery URL
 location ^~ /hosting/discovery {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Host $http_host;
 }

 # Capabilities
 location ^~ /hosting/capabilities {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Host $http_host;
 }

 # main websocket
 location ~ ^/cool/(.*)/ws$ {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }

 # download, presentation and image upload
 location ~ ^/(c|l)ool {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Host $http_host;
 }

 # Admin Console websocket
 location ^~ /cool/adminws {
   proxy_pass http://127.0.0.1:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }
}

Restart NGINX.

3. Update Nextcloud Settings

Go to the Office section of Nextcloud settings and put your https://collaboraonline.example.com site into ā€œUse your own serverā€ and save.

3 Likes

I had also the problem after the upgrade to NC 23.
I followed the instructions from @nickt, made little changes to the nginx configuration (my nginx is separate server) and put the adress of this proxy into the office section from nextcloud.
Now all works fine.
thanks nickt

Iā€™m not sure itā€™s worth all of the trouble to install. After getting it installed and tested, Iā€™m going to pass for now and stick with OnlyOffice for production stuff. Iā€™m seeing general slowness and some wonky things happening with rendering documents. Plus, mobile is a less than ideal UX. Hopefully NC Office can get closer to OnlyOffice one day. OnlyOffice just feels so much more native and fast.

3 Likes

I briefly skimmed this thread and Iā€™m aware there are a bunch of different setups being discussed.

Iā€™m using self Hosted Nextcloud 23.0.0 with self hosted Collabora using docker image 21.11.0.5.1 that sits behind a traefik reverse proxy. Iā€™m aware many people donā€™t want to use the docker image, however in this case the solution just works. I upgraded nextcloud to 23.0.0 and the self hosted Collabora and Only-Office instance work. This may be an alternative for some if you donā€™t want to setup your own loolswsd server yourself (which Iā€™ve done in the past). No changes needed to be made to my nginx/Nextcloud config to make this work.