I have set up a Nextcloud and Collabora server on my NAS. I deployed it on TrueNAS SCALE and implemented a reverse proxy using NGINX.
Everything works well, but when I enter my Collabora URL in Nextcloud office setting, it automatically appends the port number at the end (collabora.mydomain.com:9980). It seems that this happens after the communication with Collabora. Initially, it shows a green indicator, which means the communication is working well, but after a while, it turns red.
When I change the server_name
in the Collabora settings to collabora.mydomain.com:443
, it works well. This seems to be because I have set --o:ssl.termination=true
, allowing all external connections to use SSL.
When I manually append the port number, it seems collabora no longer adds the port 9980
because it recognizes the port number. According to the nextcloud.log
, only port :443
is appended.
Now it works well, but is there another way to prevent Nextcloud from automatically appending the port number after communicating with Collabora? Could it be an issue with NGINX? I have configured all SSL settings in the NGINX web UI, and in the advanced settings, I have the following configuration:
# static files
location ^~ /browser {
proxy_pass $forward_scheme://$server:$port;
proxy_set_header Host $host;
}
# WOPI discovery URL
location ^~ /hosting/discovery {
proxy_pass $forward_scheme://$server:$port;
proxy_set_header Host $host;
}
# Capabilities
location ^~ /hosting/capabilities {
proxy_pass $forward_scheme://$server:$port;
proxy_set_header Host $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 $host;
proxy_read_timeout 36000s;
}
# download, presentation and image upload
location ~ ^/(c|l)ool {
proxy_pass $forward_scheme://$server:$port;
proxy_set_header Host $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 $host;
proxy_read_timeout 36000s;
}
I set this up by reading the Collabora documentation.
I have limited knowledge about server-related topics, so I’m not sure what additional information I should provide. I apologize for that. If there are specific logs or information that would help in resolving the issue, please let me know, and I will attach them.
Also, I’m not very good at English, so I have received help from AI.