Provides an integration of Nextcloud folders into HumHub Spaces with sync of sub-folders, files and permissions between them.
Install and enable "Collabora Online - Built-in CODE Server" app.
In "Administration" -> "Office":
You're done!
If after reloading the config is not saved, connect to your Nextcloud server via SSH.
Add HumHub server IP (xxxx:xxxx:xxxx is the IPV6 of the server):
php occ config:app:set richdocuments wopi_allowlist --value="xxxx:xxxx:xxxx"
php occ config:app:set richdocuments external_apps --value="yes"
Apply changes:
php occ maintenance:repair
php occ richdocuments:activate
Check:
php occ config:app:get richdocuments wopi_allowlist
php occ config:app:get richdocuments external_apps
In case of issue, check logs:
php occ log:tail
In that case, to edit documents online, you have 2 options:
You can create a reverse proxy to make your Nextcloud instance accessible through, e.g., https://www.my-humhub.tld/cloud while it actually runs on, e.g., https://my-nextcloud.tld or https://nextmy-nextcloud.tld. This solves the cross-origin issue for iframe embedding.
Here's how to set this up:
Add this configuration to your www.my-humhub.tld nginx config:
location /cloud/ {
# Remove /cloud prefix when forwarding to the backend
rewrite ^/cloud/(.*) /$1 break;
proxy_pass https://my-nextcloud.tld;
# Preserve the original host header
proxy_set_header Host my-nextcloud.tld;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
# WebSocket support (needed for Collabora)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Increase timeouts for large file operations
proxy_read_timeout 3600;
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
# Handle redirects properly
proxy_redirect https://my-nextcloud.tld/ https://www.my-humhub.tld/cloud/;
}
Enable required modules first:
a2enmod proxy proxy_http proxy_wstunnel headers
Then add to your www.my-humhub.tld Apache config:
<Location /cloud>
ProxyPass https://my-nextcloud.tld
ProxyPassReverse https://my-nextcloud.tld
ProxyPreserveHost Off
RequestHeader set Host "my-nextcloud.tld"
RequestHeader set X-Forwarded-Proto "https"
# WebSocket support
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) wss://my-nextcloud.tld/$1 [P,L]
</Location>
You'll also need to update your Nextcloud config/config.php to allow access from the new URL:
'trusted_domains' =>
array (
0 => 'my-nextcloud.tld',
1 => 'www.my-humhub.tld',
),
'overwritehost' => 'www.my-humhub.tld',
'overwritewebroot' => '/cloud',
'overwriteprotocol' => 'https',
This configuration tells Nextcloud to generate URLs with the /cloud prefix when accessed through the proxy.
After configuration:
https://www.my-humhub.tld/cloud - you should see your Nextcloud instanceThis approach maintains your existing Nextcloud installation while making it accessible under the same domain as your main website, resolving the CORS/cross-origin issues.
If you haven't configured Reverse Proxy, you can still edit text files by adding the HumHub URL to the Nextcloud oc_trusted_servers table:
INSERT INTO oc_trusted_servers (url, url_hash, token, shared_secret, status, sync_token)
VALUES ('https://your-humhub.tld', MD5('https://your-humhub.tld'), NULL, NULL, 2, NULL);