[Solved] Two or more collabora on one server and one collabora for several domains

Dear all,
I’m using several nextcloud instances on a single machine, single ip and it works fine, with several virtual hosts.
something like : cloud1.mydomain.com cloud2.mydomain.com etc…
One of them is linked to a default collabora service, installed on the same server. like collabora1.mydomain.com
It works fine
I tried to run a second docker container just changing port and client domain like this :

echo docker run -t -d -p -e ‘domain=collabora2\.mydomain\.com’ --restart always --cap-add MKNOD collabora/code

with a second virtual host, adjusting the ports in the apache config file, with different servername and certificate etc…

when i try to edit a document in cloud2.mydomain.com, I’ve the error Access Forbiden

nothing with docker logs …
in apache error log :

[Tue Apr 25 16:52:36.100834 2017] [proxy_http:error] [pid 11078] (103)Software caused connection abort: [client XX.XX.XX.XX:59227] AH01102: error reading status line from remote server
[Tue Apr 25 16:52:36.100951 2017] [proxy:error] [pid 11078] [client XX.XX.XX.XX:59227] AH00898: Error reading from remote server returned by /hosting/discovery


Well, mainly two things,
a) That’s not correctly done
b) You might don’t want to go that path

a) The docker port will never change 9980, for the host OTOH it does on 9981, so you’ll get
Also try giving docker containers names with -name so you know what container is doing what.

b) CODE (the Collabora Free version or any Online Office suite) is about RAM since the documents will be open on the server, also docker it self is taking it’s chunk of RAM to work.

So you probably want to use the same service for multiple domains, in order to have enough RAM available for users to be able to use that feature, or on the long run you’ll end with a filled up server that won’t be able to serve it’s main purpose, share and sync files.


Thank you very much Ark74 for your quick and complete answer.

I did the change on the port and everything works fine ! And the --name option is also very useful !

The second solution sounds good : using the same container for several domains… but how to ?
In the container, the environment variable “domain” seems not to provide a solution to do that.
Is it possible to set several domain name ? Is it possible to use a “*” or something like that ?
Where do you find documentation about that, I searched a lot but didn’t find how to set a different port like you explained and other settings…


The domain option can be configured on:


When running the docker image:
docker run -t -d -p -e 'domain=domain\\.nextcloud\\.com' --restart always --cap-add MKNOD collabora/code

1 Like

Very nice ! It works fine !
Thank you !
But… where do you find this precious informations… ?

Mostly on the documentation, later on self experience.

If you see fit, mark this issue as solved.

1 Like

@Jerome I’m planning to do the same on my ubuntu1604 but how can I setup a 2nd host as I believe I need another SSL cert as well for that same public IP then ? Or are you using localhost and not a public IP/SSL?

Any other gotcha’s when I run nextcloud 1103 and collabora on the same server?

thnx! Jeroen

Hi Jeroen,

if you want to host several nextcloud instances on the same machine using the same ip, you have to define as many virtual hosts as you have instances (I’m not a specialist, but it is tha way I did). For each, you have to use a different certificate because the domain is different.

then, for collabora, you have two choices : using the same collabora container or not :

  • simply pass the two or more domain names of your nextcloud instances in the docker run command line ( as described here : https://nextcloud.com/collaboraonline/ ) like this :
    docker run -t -d -p -e 'domain=myfirst\.domain\.com|mysecond\.domain\.com' --restart always --cap-add MKNOD collabora/code and that’s all

  • mounting a second container on a second port, still on the same machine like this :
    docker run -t -d -p -e 'domain=mysecond\.domain\.com' --restart always --cap-add MKNOD --name mysecondcontainer collabora/code
    and then you need to install a second virtual host on your apache server with the configuration file pointing on port 9981 instead of default 9980… with an other domain name
    and then you need to get another certificate for the new domain name

The second choice need a little bit more effort but can supply collabora for a little bit more users as it is said that one instance of collabora container can respond to 20 users (I do not have sufficient experience to measure that)

The two solutions are working on my 1102 instances, I don’t think it will change on 1103. If it does, I’ll post on the forum.

I don’t see any other gotcha…

Enjoy !


Merci Jérôme! I’ll give it a try!