From 46b325f2bdf67eea7236deedd046cb7234a2d6bb Mon Sep 17 00:00:00 2001 From: Alan Savage <3028205+asavageiv@users.noreply.github.com> Date: Tue, 17 Mar 2026 13:35:49 -0700 Subject: [PATCH] Workaround #7757 with nextcloud-aio-apache FQDN CollaboraOnline/online/pull/13869 prevents http://nextcloud-aio-apache:23973 from being correctly recognized as a valid URI and thus breaks matching as an authorized WOPI host. This uses http://nextcloud-aio-apache.nextcloud-aio:23973 which is correctly recognized as a valid URI. Signed-off-by: Alan Savage <3028205+asavageiv@users.noreply.github.com> --- Containers/apache/Caddyfile | 2 +- php/containers.json | 4 ++-- reverse-proxy.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Containers/apache/Caddyfile b/Containers/apache/Caddyfile index 92e84b49..40da90f9 100644 --- a/Containers/apache/Caddyfile +++ b/Containers/apache/Caddyfile @@ -15,7 +15,7 @@ } https://{$ADDITIONAL_TRUSTED_DOMAIN}:443, -http://{$APACHE_HOST}:23973, # For Collabora callback and WOPI requests, see containers.json +http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI requests, see containers.json {$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} { header -Server header -X-Powered-By diff --git a/php/containers.json b/php/containers.json index c6738ec1..96346cfe 100644 --- a/php/containers.json +++ b/php/containers.json @@ -379,7 +379,7 @@ ], "internal_port": "9980", "environment": [ - "aliasgroup1=https://%NC_DOMAIN%:443,http://nextcloud-aio-apache:23973", + "aliasgroup1=https://%NC_DOMAIN%:443,http://nextcloud-aio-apache.nextcloud-aio:23973", "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.disable_server_audit=true --o:logging.level=warning --o:logging.level_startup=warning --o:welcome.enable=false --o:fetch_update_check=0 --o:allow_update_popup=false %COLLABORA_SECCOMP_POLICY% --o:remote_font_config.url=https://%NC_DOMAIN%/apps/richdocuments/settings/fonts.json --o:net.post_allow.host[0]=.+", "dictionaries=%COLLABORA_DICTIONARIES%", "TZ=%TIMEZONE%", @@ -389,7 +389,7 @@ "restart": "unless-stopped", "nextcloud_exec_commands": [ "echo 'Activating Collabora config...'", - "php /var/www/html/occ richdocuments:activate-config --wopi-url='http://nextcloud-aio-apache:23973' --callback-url='http://nextcloud-aio-apache:23973'" + "php /var/www/html/occ richdocuments:activate-config --wopi-url='http://nextcloud-aio-apache.nextcloud-aio:23973' --callback-url='http://nextcloud-aio-apache.nextcloud-aio:23973'" ], "profiles": [ "collabora" diff --git a/reverse-proxy.md b/reverse-proxy.md index b049e1b3..be843c69 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -169,8 +169,8 @@ The process to run Nextcloud AIO behind a reverse proxy has three required steps The reverse-proxy container needs to be connected to the nextcloud containers. This can be achieved one of these 3 ways: 1. Utilize host networking instead of docker bridge networking: Specify `--network host` option (or `network_mode: host` for docker-compose) as setting for the reverse proxy container to connect it to the host network. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. With this setup, the default sample configurations with reverse-proxy pointing to `localhost:$APACHE_PORT` should work directly. - 1. Connect nextcloud's external-facing containers to the reverse-proxy's docker network by specifying env variable APACHE_ADDITIONAL_NETWORK. With this setup, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache:$APACHE_PORT`. ⚠️⚠️⚠️ Note, the specified network must already exist before Nextcloud AIO is started. Otherwise it will fail to start the container because the network is not existing. - 1. Connect the reverse-proxy container to the `nextcloud-aio` network by specifying it as a secondary (external) network for the reverse proxy container. With this setup also, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache:$APACHE_PORT` . + 1. Connect nextcloud's external-facing containers to the reverse-proxy's docker network by specifying env variable APACHE_ADDITIONAL_NETWORK. With this setup, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache.nextcloud-aio:$APACHE_PORT`. ⚠️⚠️⚠️ Note, the specified network must already exist before Nextcloud AIO is started. Otherwise it will fail to start the container because the network is not existing. + 1. Connect the reverse-proxy container to the `nextcloud-aio` network by specifying it as a secondary (external) network for the reverse proxy container. With this setup also, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache.nextcloud-aio:$APACHE_PORT` .