Connecting Collabora Online built-in CODE Server with Nginx

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, pls do contact us.

19 thoughts on “Connecting Collabora Online built-in CODE Server with Nginx

  1. 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(?:$|/) {


    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

  2. 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:

    1. 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

      1. C. Rieger recently updated his guide:
        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

    2. In my case help this:
      location ~ ^(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy)\.php(?:$|\/) {

  3. 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

  4. I am getting:
    -bash: syntax error near unexpected token `(‘
    Ubuntu 20.04, Nextcloud 20

    1. 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,


  5. 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

  6. 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.

  7. 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?

  8. 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?!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.