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.

8 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

  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

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.