When you are using a Nginx server, you need to do a small modification to your existing configuration. For the Collabora Online app to work, you have to add a ‘richdocumentscode/proxy’ entry point as an allowed location to the config in the webroot of your nginx installation. From the documentation at Nextcloud:
location ~ ^\/nextcloud\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy)\.php(?:$|\/) {
If you experience any problems, of have any questions, please do contact us.
26 Responses
I have changed the line in the config file from:
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
to
location ~ ^\/nextcloud\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy)\.php(?:$|\/) {
Rebooted the server then re-enabled the built-in CODE in settings where it then says ‘ Collabora Online server is reachable.’ But I am unable to open any documents. It just throws up the error Collabora could not be reached, try again later
Hi Luke San,
Can you pls go to the forum? I think searching/asking there is a better place:
https://forum.collaboraonline.com/
Cor
Hi Luke San
We are sorry about this; but trying to improve the experience there.
Usually the non-working Built-in CODE server is down to one of these:
* not installed fontconfig
* missing FUSE support
What is the server you are running? Can you try to install fontconfig
& fuse, and restart nginx?
Since you are running nginx, it would be also good to restart php-fpm.
Please let us know if it helped! The thread where this is being
discussed is here:
https://github.com/CollaboraOnline/richdocumentscode/issues/26
Thank you for the quick reply,
I have checked and both fontconfig and fuse are installed.
Im running on Ubuntu 18.04 Server following the C Reiger install over a year ago.
CODE server says its connected but just unable to load when i try
C. Rieger recently updated his guide: https://www.c-rieger.de/nextcloud-installationsanleitung/
so you will need do insert:
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?.php)(\/.*|)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
include php_optimization.conf;
}
into your /ets/nginx/conf.d/nextcloud.conf
In my case help this:
location ~ ^(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy)\.php(?:$|\/) {
Good to read – thnx!
I’m a bit confused about which file to change here.. Could you please point me in the right direction? I’m running Unraid 6.8.3 with Nextcloud 19 in a docker container (linuxserver/nextcloud package). NginxProxyManager (again Docker) is on reverse proxy duties and MariaDB (as a Docker container as well) is the database backend.
So which config file should I look at and where to find it?
All the best
Hi,
You cannot use this functionality, because the linuxserver/nextcloud comes from linuxserver.io which is based on Alpine. Alpine is unsupported, because it uses musl libc instead of glibc, and AppImage does not support muls libc yet:
https://github.com/AppImage/AppImageKit/issues/1015
Your only possibility is to deploy the proper CODE in one more docker:
https://www.collaboraoffice.com/code/
HTH!
Anyone know the answer?
^^ ?
I am getting:
-bash: syntax error near unexpected token `(‘
Ubuntu 20.04, Nextcloud 20
Hi Azat,
Sorry for the late handling of your comment..!
If _if_ the problem still exists, pls send a mail with as much as info as possible to hello @
Thanks & again my appoligies,
Cor
Hi, I setup nextcloud 19.0.4 and latest richdocumentscode_arm64 (6.x).
In nextcloud Collabora Online setting:
Could not establish connection to the Collabora Online server. This might be due to a missing configuration of your web server. For more information, please visit: Connecting Collabora Online Single Click with Nginx
Use the built-in CODE – Collabora Online Development Edition
the Collabora_Online.AppImage can be start manually. there is nothing related log in nginx/error.log
In case you use the ARM64 CODE at System like Raspi, you need to use the following line for nginx:
location ~ ^\/(?:index|apc|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy|.+\/richdocumentscode_arm64\/proxy|)\.php(?:$|\/) {
The original works only with the x86 CODE as it seems, just to save you some time in the future.
PUSH 🙂 THAT solved my problem
I am using a shared web-hoster service and have no access to /ets/nginx/conf.d
How can I make the Collabora CODE Server work?
For now, I tried it on fresh CentOS8 install, with fresh Nextcloud 20.0.4 install with Nginx, Collabora Online with integrated CODE Server, and it does NOT work. I tried everything suggested in this thread, no change at all. Not even an error message in the logs, nothing. It just says could not connect to Collabora online server and a link to this page. That’s all.
The next side-effect is, that Nextcloud UI gets extremely slow, every click takes about 2-5min. to process. Working with it is impossible. Disabling the Collabora App in Nextcloud makes the server blasing fast again.
Any useful ideas anyone?!
I’ve tried everything I could think of to get this to work. I meet all the requirements but do not know where to put this line of code. Here is the nginx file below
https://pastebin.com/aNtqP3g4
Hi Paul,
Since some time we have a forum for questions and remarks.
Please be so kind to ask here https://forum.collaboraonline.com/
Cor
Hi
I’m using Nextcloud on an Ubuntu VServer with Plesk and nginx but I don’t know where to add the richdocumentscode/proxy’ entry point.
Hope you can help me explaining where to add this snippet.
Tried to reinstall collaboraoffice and the built-in coe server, but it still doesn’t work.
Thank you and greetings
Phil
Hi Phil,
Can you pls search/ask on our forum? That’s a better place.
https://forum.collaboraonline.com/
greetings,
Cor
For all the people who got also redirect to this topic (by clicking on the link in their Nextcloud installation), see: https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx-root.conf.sample
That solved my problem!
(ubuntu server 20.04, raspberry pi4, nginx, mysql, php7.4, nextcloud23.03, redis-server)
If you run richdoumentscode on ARM64 (richdoumentscode_arm64 package), you have to change richdocumentscode\/proxy to richdocumentscode_arm64\/proxy in NGINX settings.
My working example:
location ~ \.php(?:$|/) {
# Required for legacy support
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|oc[ms]\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode_arm64\/proxy) /index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_max_temp_file_size 0;
}
“[…] you have to change richdocumentscode\/proxy to richdocumentscode_arm64\/proxy in NGINX settings.”
Thank you so much! After years of struggling with getting this to work, this small little invaluable hint got it working for me! Finally!