I am trying to integrate Collabora into Seafile. Everytime I try to open an Office file I get this error:
Unauthorized WOPI host. Please try again later and report to your administrator if the issue persists.
I followed the Seafile Guid here and the Collabora Documentations here to find a way but still not working. In the Doher Log I get those errors when trying to open the office files
[ websrv_poll ] ERR #30: WOPI::CheckFileInfo failed for URI [https://seafile.domain.tld/api2/wopi/files/xxx?access_token=xxx&access_token_ttl=0]: 0 (Unknown) . Headers: Body: []| wsd/wopi/CheckFileInfo.cpp:103
[ websrv_poll ] ERR #30: Invalid URI or access denied to [https://seafile.domain.tld/api2/wopi/files/xxx?access_token=xxx&access_token_ttl=0]| wsd/wopi/CheckFileInfo.cpp:118
When the container starts it also reports some errors:
wsd-00001-00001 2025-05-16 20:16:04.603177 +0000 [ coolwsd ] ERR enterMountingNS, root mount failed: Permission denied| common/JailUtil.cpp:79
wsd-00001-00001 2025-05-16 20:16:04.603435 +0000 [ coolwsd ] ERR creating usernamespace for mount user failed.| wsd/COOLWSD.cpp:1229
wsd-00001-00001 2025-05-16 20:16:04.628437 +0000 [ coolwsd ] ERR Failed to bind-mount [/opt/cool/systemplate] -> [/opt/cool/child-roots/1-a7e2f2e1/cool_test_mount]| common/JailUtil.cpp:157
wsd-00001-00001 2025-05-16 20:16:04.628507 +0000 [ coolwsd ] ERR Bind-Mounting fails and will be disabled for this run. To disable permanently set mount_jail_tree config entry in coolwsd.xml to false.| common/JailUtil.cpp:454
...
kit-00035-00035 2025-05-16 20:16:25.618101 +0000 [ kit_spare_001 ] ERR Failed to get the realpath of [/opt/cool/child-roots/1-a7e2f2e1/tmp/sharedpresets/template] (ENOENT: No such file or directory)| common/FileUtil-unix.cpp:63
kit-00035-00035 2025-05-16 20:16:25.618292 +0000 [ kit_spare_001 ] ERR linkOrCopy: nftw() failed for '/opt/cool/child-roots/1-a7e2f2e1/tmp/sharedpresets/template'| kit/Kit.cpp:612
wsd-00001-00029 2025-05-16 20:16:25.661290 +0000 [ prisoner_poll ] TRC PrisonerRequestDispatcher| wsd/COOLWSD.cpp:2891
kit-00042-00042 2025-05-16 20:16:26.228852 +0000 [ kit_spare_004 ] ERR Failed to get the realpath of [/opt/cool/child-roots/1-a7e2f2e1/tmp/sharedpresets/template] (ENOENT: No such file or directory)| common/FileUtil-unix.cpp:63
kit-00042-00042 2025-05-16 20:16:26.228989 +0000 [ kit_spare_004 ] ERR linkOrCopy: nftw() failed for '/opt/cool/child-roots/1-a7e2f2e1/tmp/sharedpresets/template'| kit/Kit.cpp:612
kit-00041-00041 2025-05-16 20:16:26.242437 +0000 [ kit_spare_003 ] ERR Failed to get the realpath of [/opt/cool/child-roots/1-a7e2f2e1/tmp/sharedpresets/template] (ENOENT: No such file or directory)| common/FileUtil-unix.cpp:63
kit-00041-00041 2025-05-16 20:16:26.242548 +0000 [ kit_spare_003 ] ERR linkOrCopy: nftw() failed for '/opt/cool/child-roots/1-a7e2f2e1/tmp/sharedpresets/template'| kit/Kit.cpp:612
kit-00040-00040 2025-05-16 20:16:26.339427 +0000 [ kit_spare_002 ] ERR Failed to get the realpath of [/opt/cool/child-roots/1-a7e2f2e1/tmp/sharedpresets/template] (ENOENT: No such file or directory)| common/FileUtil-unix.cpp:63
kit-00040-00040 2025-05-16 20:16:26.339625 +0000 [ kit_spare_002 ] ERR linkOrCopy: nftw() failed for '/opt/cool/child-roots/1-a7e2f2e1/tmp/sharedpresets/template'| kit/Kit.cpp:612
Docker compose for Collabora:
services:
seafile-collabora:
image: collabora/code
container_name: seafile-collabora
restart: unless-stopped
networks:
- public
cap_add:
- MKNOD
privileged: true
tty: true
security_opt:
- seccomp:unconfined
env_file: ./seafile-collabora.env
networks:
public:
external: true
content of .env
username=user
password=pass
domain=seafile\\.domain\\.tld
server_name=documentserver.domain.tld
aliasgroup1=https://.*:443
dictionaries=de_DE en_GB en_US es_ES
extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:wopi.host=seafile.domain.tld
Added this to seahub_settings.py
OFFICE_SERVER_TYPE = 'CollaboraOffice'
ENABLE_ONLYOFFICE = False
ENABLE_OFFICE_WEB_APP = True
OFFICE_WEB_APP_BASE_URL = 'https://documentserver.domain.tld/hosting/discovery'
WOPI_ACCESS_TOKEN_EXPIRATION = 30 * 60
OFFICE_WEB_APP_FILE_EXTENSION = ('odp', 'ods', 'odt', 'xls', 'xlsb', 'xlsm', 'xlsx','ppsx', 'ppt', 'pptm', 'pptx', 'doc', 'docm', 'docx')
ENABLE_OFFICE_WEB_APP_EDIT = True
OFFICE_WEB_APP_EDIT_FILE_EXTENSION = ('odp', 'ods', 'odt', 'xls', 'xlsb', 'xlsm', 'xlsx','ppsx', 'ppt', 'pptm', 'pptx', 'doc', 'docm', 'docx')