Trying to run collobara and nextcloud on same server - REpost sorry

Hello everyone so,

I have a server with a few things on it a mailcow server that used port 8443 for all the panel stuff and all the usual ports of IMAP and all that. That runs in docker container.

Then I have a nextcloud server which is currently running on port 80 and 443 but I will later change to another pot because I want to implent another server, but it’s fine for now. This runs in docker on apache with a reverse proxy and stuff I used this docker-compose.yml :

Now I want to add a collabora online server so i pulled the image and added the container. And in the run command my domain for nextcloud.

then installed apache and all that good stuff. added the reserve proxy config. Ohh one thing when i installed apache it didn’t start because nextcloud was running and the port was unaviable. So i did docker-compose down to stop nextcloud start apache config and then start nextcloud back up but i get errors that they are both on the same port. What do I do.

Thanks, Josh


I used this docker compose file

i get this error when i start apache when nextcloud is running, i think i need to put them under the same proxy am i correct.

here is the status

apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
Active: failed (Result: exit-code) since Fri 2020-04-17 12:31:39 CEST; 2min 20s ago
Process: 19274 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
Process: 9868 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
Process: 22592 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 8881 (code=exited, status=0/SUCCESS)

Apr 17 12:31:38 systemd[1]: Starting The Apache HTTP Server…
Apr 17 12:31:39 apachectl[22592]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:Apr 17 12:31:39 apachectl[22592]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0Apr 17 12:31:39 apachectl[22592]: no listening sockets available, shutting down
Apr 17 12:31:39 apachectl[22592]: AH00015: Unable to open logs
Apr 17 12:31:39 apachectl[22592]: Action ‘start’ failed.
Apr 17 12:31:39 apachectl[22592]: The Apache error log may have more information.
Apr 17 12:31:39 systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 17 12:31:39 systemd[1]: apache2.service: Failed with result ‘exit-code’.
Apr 17 12:31:39 systemd[1]: Failed to start The Apache HTTP Server.

It sounds like you already know what the problem is. Two programs can’t both listen on the same port. One of them will have to change.

Yes true, but how do I put both of them behind the same proxy that is specified in the github link I gave, like how would I do this

The proxy’s virtual hosts will forward to different ports on the back end.

Have a look at my guide for a working example.

It’s a nice guide but now I will have to redo my whole server and I don’t want to interrupt my other services… Is there just a way to put them both behind the same proxy and be done with it… Do I remove the proxy from the docker-compose.yml file and make a new one with apache.

They are both behind the same proxy in my example. I haven’t seen your setup, so I can’t tell you what to change.

I recommend against shuffling ports around later. You should choose a permanent setup up front.

So, based on that, it sounds like you have Nextcloud and your reverse proxy both trying to use ports 80 and 443. That’s not going to work. You’ll want the reverse proxy to have the standard ports, which means Nextcloud’s ports need to change, and tour reverse proxy vhost will have to change accordingly for the new ports.

I’m not seeing that in the docker-compose.yml that you linked, so the first thing to do is determine what exactly is in conflict.

The conflict is the two reverse proxy how do i combine to one, i used that exact setup in github and the exact collabora on their site

Okay, so the solution is to run one reverse proxy serving multiple sites. Choose one to keep and then give it the virtual hosts from both.

I need like commands on how to do it, If you would like access to my VPS and help me that would be great!

It isn’t a matter of commands. Your Docker and Apache configurations need to be edited. If you want to post them here (don’t forget to remove sensitive info) then we can take a look, but ultimately you should learn how to manage Apache virtual hosts if you’re going to run this type of setup.

Hi – sorry you are having a problem, however I just want to understand your configuration a little better.

It sounds like you are running apache, nextcloud, collabora within docker images on the same host. By reverse proxy, are you talking about the apache/nextcloud installation and not some other reverse proxy?

What is listening on ports 80/443? Nextcloud doesn’t really listen on 80/443 its a web app that runs on a web server and its the web server that listens on 80/443. Collabora by default listens on 9980.

What is your nginx config? You need to modify it for the docker version to work. I don’t want to see what a post says I want to see your actual config :slight_smile: