I’ve seen several topics to use collabora and multiple domains, but I still can’t find the right script. Can somebody explain which command I need to use to add several domains to collabora? I have tried several options, like below command:
sudo docker run -t -d -p 127.0.0.1:9980:9980 -e ‘domain=1\.domain\.com|domain=2\.domain.com’ --restart always --cap-add MKNOD collabora/code
What works for me:
docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=nc\\.domain1\\.com\|nc\\.domain2\\.com\|nc\\.domain3\\.com' --restart always --cap-add MKNOD collabora/code
You have to escape the dots in the domain names with two backslashes.
I know it’s an old thread, but it fits here best: for unknown reasons this solution has stopped working at the latest CODE docker image (COOLWSD 184.108.40.206). I have searched for a while, but did not find a solution. At the moment I have the impression it only works with the first domain that uses the instance after reboot. Does anybody maybe have a hint?
This is working for me with two seperate Nextcloud instances…
docker run --name collabora -t -d -p 127.0.0.1:9980:9980 \
-e 'domain=cloud01\\.domain\\.tld' \
-e 'domain=cloud02\\.domain\\.tld' \
-e 'dictionaries=de_CH' \
-e 'username=adminuser' \
-e 'password=supers3cr3tpa$$w0rd \
--restart always --cap-add MKNOD collabora/code
@bb77: Tried your suggestion and splitting the domains up in individual arguments, but unfortunately that didn’t help either. It led to the situation that only the last one worked. When combining it as the years before, the first domain works.
It’s weird, because it just stopped working after having run smoothly for two years or so.
Update: It appears that Collabora configuration has changed in the latest releases, so @bb77 's solution will probably also fail soon. I realised when I checked the docker logs:
-e ERR: Use of domain variable is not supported. First host/domain who tries to connect to COOL is always allowed.
To allow multiple host and its aliases use something like this and pass it as env variable:
For more info: https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html
The linked article confused me a bit, and I did not get it running. Then I discovered that the mentioned configuration apparently will only be available in the upcoming docker release (https://forum.collaboraonline.com/t/fixing-code-multihost-configuration/1001/8)
For the moment one has to change it inside the docker file. I managed to get it running again with the description mentioned here: https://forum.collaboraonline.com/t/21-11-3-4-1-problem-with-multiple-domains/991/3
Thought this may be helpful to others as well.
This will break a lot of instances soon (it already started) and should in my opinion be addressed in sticky post or so. Information is now also available under:
@tim.s : you’ve had the link already in the error log, just saw it now.
We created an easy setup script for Debian 11 which can install Nextcloud High performance backend, Signaling & Collabora Office (with MS fonts) with Multi Domain Support.