[GH-ISSUE #70] Collabora #68

Closed
opened 2026-02-26 05:34:05 +03:00 by kerem · 13 comments
Owner

Originally created by @wuast94 on GitHub (Feb 17, 2019).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/70

Is it possible to setup this ? i found some config files für nginx but dont know how to port this.
for Example:

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

    ssl_certificate /path/to/certficate;
    ssl_certificate_key /path/to/key;
    
    # static files
    location ^~ /loleaflet {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

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

   # main websocket
   location ~ ^/lool/(.*)/ws$ {
       proxy_pass https://localhost: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 ~ ^/lool {
       proxy_pass https://localhost:9980;
       proxy_set_header Host $http_host;
   }
   
   # Admin Console websocket
   location ^~ /lool/adminws {
       proxy_pass https://localhost:9980;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "Upgrade";
       proxy_set_header Host $http_host;
       proxy_read_timeout 36000s;
   }
}
Originally created by @wuast94 on GitHub (Feb 17, 2019). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/70 Is it possible to setup this ? i found some config files für nginx but dont know how to port this. for Example: ``` server { listen 443 ssl; server_name office.example.com; ssl_certificate /path/to/certficate; ssl_certificate_key /path/to/key; # static files location ^~ /loleaflet { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # WOPI discovery URL location ^~ /hosting/discovery { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # main websocket location ~ ^/lool/(.*)/ws$ { proxy_pass https://localhost: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 ~ ^/lool { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # Admin Console websocket location ^~ /lool/adminws { proxy_pass https://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } } ```
kerem 2026-02-26 05:34:05 +03:00
Author
Owner

@jc21 commented on GitHub (Feb 18, 2019):

Sure can. I didn't see a default /' location there so I did a google and other commabora examples have one.

  1. Create your new Proxy Host, specify https protocol and the server host/ip and port 9980. Also enable Websockets Support.
  2. On the SSL tab select a new certificate, enable HTTP/2.
  3. On the Advanced tab, enter:
# static files
location ^~ /loleaflet {
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
}

# WOPI discovery URL
location ^~ /hosting/discovery {
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
}

# main websocket
location ~ ^/lool/(.*)/ws$ {
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  proxy_http_version 1.1;
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
  proxy_read_timeout 36000s;
}

# download, presentation and image upload
location ~ ^/lool {
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
}

# Admin Console websocket
location ^~ /lool/adminws {
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  proxy_http_version 1.1;
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
  proxy_read_timeout 36000s;
}
  1. Save and test.
<!-- gh-comment-id:464531079 --> @jc21 commented on GitHub (Feb 18, 2019): Sure can. I didn't see a default `/'` location there so I did a google and other commabora examples have one. 1. Create your new Proxy Host, specify `https` protocol and the server host/ip and port `9980`. Also enable Websockets Support. 2. On the SSL tab select a new certificate, enable `HTTP/2`. 3. On the Advanced tab, enter: ``` # static files location ^~ /loleaflet { proxy_pass $forward_scheme://$server:$port; proxy_set_header Host $http_host; } # WOPI discovery URL location ^~ /hosting/discovery { proxy_pass $forward_scheme://$server:$port; proxy_set_header Host $http_host; } # main websocket location ~ ^/lool/(.*)/ws$ { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_http_version 1.1; proxy_pass $forward_scheme://$server:$port; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } # download, presentation and image upload location ~ ^/lool { proxy_pass $forward_scheme://$server:$port; proxy_set_header Host $http_host; } # Admin Console websocket location ^~ /lool/adminws { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_http_version 1.1; proxy_pass $forward_scheme://$server:$port; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } ``` 4. Save and test.
Author
Owner

@wuast94 commented on GitHub (Feb 18, 2019):

worked perfectly :) so thank for that.

would it be an idea to add "presets" for most common services ? so you can add a preset that fills out as many as possible.

<!-- gh-comment-id:464549750 --> @wuast94 commented on GitHub (Feb 18, 2019): worked perfectly :) so thank for that. would it be an idea to add "presets" for most common services ? so you can add a preset that fills out as many as possible.
Author
Owner

@jc21 commented on GitHub (Feb 18, 2019):

Nice idea. Feel free to create a new issue for that :)

Glad it works for you!

<!-- gh-comment-id:464550062 --> @jc21 commented on GitHub (Feb 18, 2019): Nice idea. Feel free to create a new issue for that :) Glad it works for you!
Author
Owner

@Tucubanito07 commented on GitHub (Dec 8, 2020):

worked perfectly :) so thank for that.

would it be an idea to add "presets" for most common services ? so you can add a preset that fills out as many as possible.

Hey could you share how you got it to work? How did you set yours up please? I had mine working before and now it does not work. Any input is greatly appreciated. Is there a config file in nextcloud i have to put that domain of the collabora?

<!-- gh-comment-id:740905055 --> @Tucubanito07 commented on GitHub (Dec 8, 2020): > worked perfectly :) so thank for that. > > would it be an idea to add "presets" for most common services ? so you can add a preset that fills out as many as possible. Hey could you share how you got it to work? How did you set yours up please? I had mine working before and now it does not work. Any input is greatly appreciated. Is there a config file in nextcloud i have to put that domain of the collabora?
Author
Owner

@mwip commented on GitHub (Apr 2, 2021):

On a related note, what would the advanced section be like when using the nextcloud built-in CODE collabora editor?
https://www.collaboraoffice.com/online/connecting-collabora-online-built-in-code-server-with-nginx/

They refer to the following lines in the NC nginx config:

    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;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $path_info;
        fastcgi_param HTTPS on;
        # Avoid sending the security headers twice
        fastcgi_param modHeadersAvailable true;
        # Enable pretty urls
        fastcgi_param front_controller_active true;
        fastcgi_pass php-handler;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
    }

If this makes any difference: I am using NPM to reverse-proxy into a nextcloudpi installation, which itself uses apache (https://ownyourbits.com/2017/06/12/why-nextcloudpi-uses-apache-and-not-nginx/).

<!-- gh-comment-id:812583666 --> @mwip commented on GitHub (Apr 2, 2021): On a related note, what would the advanced section be like when using the nextcloud built-in CODE collabora editor? https://www.collaboraoffice.com/online/connecting-collabora-online-built-in-code-server-with-nginx/ They refer to the following lines in the NC nginx config: ``` 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; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $path_info; fastcgi_param HTTPS on; # Avoid sending the security headers twice fastcgi_param modHeadersAvailable true; # Enable pretty urls fastcgi_param front_controller_active true; fastcgi_pass php-handler; fastcgi_intercept_errors on; fastcgi_request_buffering off; } ``` If this makes any difference: I am using NPM to reverse-proxy into a nextcloudpi installation, which itself uses apache (https://ownyourbits.com/2017/06/12/why-nextcloudpi-uses-apache-and-not-nginx/).
Author
Owner

@mitohund commented on GitHub (Jun 11, 2022):

So it turns out the Collabora team has changed some folders and names and the nginx config from above does not seem to work anymore. After puzzling together the info from various forums, I came up with a working config. However, since I don't really understand what I'm doing, somebody more knowledgeable than me should maybe verify this info. I am, however, quite happy that Collabora / Nextcloud Office is again working for me.

You may also have to clear your browser cache for this to work.

# static files
location ^~ /browser {
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
}

# WOPI discovery URL
location ^~ /hosting/discovery {
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
}

# Capabilities
location ^~ /hosting/capabilities {
  proxy_pass $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;

 }
# main websocket
location ~ ^/cool/(.*)/ws$ {
  proxy_pass $forward_scheme://$server:$port;
  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 $forward_scheme://$server:$port;
  proxy_set_header Host $http_host;
}

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

Some more info here:
https://help.nextcloud.com/t/updated-collabora-nextcloud-and-now-get-404/129873/2
https://help.nextcloud.com/t/nextcloud-office-document-loading-failed-this-request-has-been-blocked-the-content-must-be-served-over-https/130439/3
https://sdk.collaboraonline.com/docs/installation/Proxy_settings.html#reverse-proxy-with-nginx-webserver

<!-- gh-comment-id:1152995529 --> @mitohund commented on GitHub (Jun 11, 2022): So it turns out the Collabora team has changed some folders and names and the nginx config from above does not seem to work anymore. After puzzling together the info from various forums, I came up with a working config. However, since I don't really _understand_ what I'm doing, somebody more knowledgeable than me should maybe verify this info. I am, however, quite happy that Collabora / Nextcloud Office is again working for me. You may also have to clear your browser cache for this to work. ``` # static files location ^~ /browser { proxy_pass $forward_scheme://$server:$port; proxy_set_header Host $http_host; } # WOPI discovery URL location ^~ /hosting/discovery { proxy_pass $forward_scheme://$server:$port; proxy_set_header Host $http_host; } # Capabilities location ^~ /hosting/capabilities { proxy_pass $forward_scheme://$server:$port; proxy_set_header Host $http_host; } # main websocket location ~ ^/cool/(.*)/ws$ { proxy_pass $forward_scheme://$server:$port; 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 $forward_scheme://$server:$port; proxy_set_header Host $http_host; } # Admin Console websocket location ^~ /cool/adminws { proxy_pass $forward_scheme://$server:$port; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } ``` Some more info here: https://help.nextcloud.com/t/updated-collabora-nextcloud-and-now-get-404/129873/2 https://help.nextcloud.com/t/nextcloud-office-document-loading-failed-this-request-has-been-blocked-the-content-must-be-served-over-https/130439/3 https://sdk.collaboraonline.com/docs/installation/Proxy_settings.html#reverse-proxy-with-nginx-webserver
Author
Owner

@DCCInterstellar commented on GitHub (Jun 6, 2023):

I'm using this as of June 5, 2023, and it doesn't work. Is anyone able to get this configuration with Collabora in Nginx Proxy Manager?

<!-- gh-comment-id:1577795030 --> @DCCInterstellar commented on GitHub (Jun 6, 2023): I'm using this as of June 5, 2023, and it doesn't work. Is anyone able to get this configuration with Collabora in Nginx Proxy Manager?
Author
Owner

@mitohund commented on GitHub (Jun 13, 2023):

@DCCInterstellar sorry, I moved on to Nextcloud AIO a month or two ago, where I did not have to tinker with this anymore. But until then, I believe my above solution worked.

<!-- gh-comment-id:1589641288 --> @mitohund commented on GitHub (Jun 13, 2023): @DCCInterstellar sorry, I moved on to Nextcloud AIO a month or two ago, where I did not have to tinker with this anymore. But until then, I believe my above solution worked.
Author
Owner

@DCCInterstellar commented on GitHub (Jun 13, 2023):

@mitohund No worries! I've tried it over and over but for some reason, Collabora kept giving me issues. I decided to let it go and install OnlyOfficeDocumentServer. So far that's been working really well Nextcloud.

<!-- gh-comment-id:1589984177 --> @DCCInterstellar commented on GitHub (Jun 13, 2023): @mitohund No worries! I've tried it over and over but for some reason, Collabora kept giving me issues. I decided to let it go and install OnlyOfficeDocumentServer. So far that's been working really well Nextcloud.
Author
Owner

@mitohund commented on GitHub (Jun 14, 2023):

@DCCInterstellar I just noticed that in the above code block there is an unnecessary empty line and empty space, towards the end of the # Capabilities block, just before }. Don't know if this could cause any issues?

<!-- gh-comment-id:1590942175 --> @mitohund commented on GitHub (Jun 14, 2023): @DCCInterstellar I just noticed that in the above code block there is an unnecessary empty line and empty space, towards the end of the # Capabilities block, just before }. Don't know if this could cause any issues?
Author
Owner

@DCCInterstellar commented on GitHub (Jun 15, 2023):

@mitohund I tried removing the extra block. Still having the same issue, sadly. But
thank you for trying to help!

On Wed, Jun 14, 2023 at 4:38 AM mitohund @.***> wrote:

@DCCInterstellar https://github.com/DCCInterstellar I just noticed that
in the above code block there is an unnecessary empty line and empty space,
towards the end of the # Capabilities block, just before }. Don't know if
this could cause any issues?


Reply to this email directly, view it on GitHub
https://github.com/NginxProxyManager/nginx-proxy-manager/issues/70#issuecomment-1590942175,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A5TXWPXRBC5XUY3WMP33KETXLGIAXANCNFSM4GX7OJ7A
.
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:1593691481 --> @DCCInterstellar commented on GitHub (Jun 15, 2023): @mitohund I tried removing the extra block. Still having the same issue, sadly. But thank you for trying to help! On Wed, Jun 14, 2023 at 4:38 AM mitohund ***@***.***> wrote: > @DCCInterstellar <https://github.com/DCCInterstellar> I just noticed that > in the above code block there is an unnecessary empty line and empty space, > towards the end of the # Capabilities block, just before }. Don't know if > this could cause any issues? > > — > Reply to this email directly, view it on GitHub > <https://github.com/NginxProxyManager/nginx-proxy-manager/issues/70#issuecomment-1590942175>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A5TXWPXRBC5XUY3WMP33KETXLGIAXANCNFSM4GX7OJ7A> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@warioishere commented on GitHub (Aug 11, 2023):

same here. I am trying to get this to work since weeks:

https://github.com/CollaboraOnline/online/issues/7063

if anyone has an idea?

<!-- gh-comment-id:1675286631 --> @warioishere commented on GitHub (Aug 11, 2023): same here. I am trying to get this to work since weeks: https://github.com/CollaboraOnline/online/issues/7063 if anyone has an idea?
Author
Owner

@dounoit commented on GitHub (Aug 29, 2023):

i'll pile on - i can't get this thing to work - i been pullin my hair out - its complaining about unautorized:

wsd-00001-00062 2023-08-29 08:20:56.797140 +0000 [ docbroker_003 ] ERR Unauthorized Request while starting session on https%3A%2F%2Fdkloud.douno.it%3A443%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F9415_ocbn5c6s32h1 for socket #24. Terminating connection. Error: No acceptable WOPI hosts found matching the target host [cloud.fqdn.com] in config| wsd/COOLWSD.cpp:5047
wsd-00001-00062 2023-08-29 08:20:56.812968 +0000 [ docbroker_003 ] ERR #18: Read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| net/Socket.hpp:1122
wsd-00001-00062 2023-08-29 08:20:56.813091 +0000 [ docbroker_003 ] WRN #18: Unassociated Kit (55) disconnected unexpectedly| wsd/COOLWSD.cpp:3497

<!-- gh-comment-id:1697004190 --> @dounoit commented on GitHub (Aug 29, 2023): i'll pile on - i can't get this thing to work - i been pullin my hair out - its complaining about unautorized: wsd-00001-00062 2023-08-29 08:20:56.797140 +0000 [ docbroker_003 ] ERR Unauthorized Request while starting session on https%3A%2F%2Fdkloud.douno.it%3A443%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F9415_ocbn5c6s32h1 for socket #24. Terminating connection. Error: No acceptable WOPI hosts found matching the target host [cloud.fqdn.com] in config| wsd/COOLWSD.cpp:5047 wsd-00001-00062 2023-08-29 08:20:56.812968 +0000 [ docbroker_003 ] ERR #18: Read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| net/Socket.hpp:1122 wsd-00001-00062 2023-08-29 08:20:56.813091 +0000 [ docbroker_003 ] WRN #18: Unassociated Kit (55) disconnected unexpectedly| wsd/COOLWSD.cpp:3497
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#68
No description provided.