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.comcloud2.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 :
Well, mainly two things,
a) Thatās not correctly done
b) You might donāt want to go that path
Elaborating,
a) The docker port will never change 9980, for the host OTOH it does on 9981, so youāll get -p 127.0.0.1:9981:9980
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ā¦
@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?
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 127.0.0.1:9980:9980 -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 127.0.0.1:9981:9980 -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.