NextCloud and collabora Server on the Same Ubuntu server

Hi, A bit about my situation, so that you guys can understand the background. I live with three roommates. every one work in the same company. So I’m trying to make a local collaboration software. Internet is not available to us, Due to the network being weak near us, That’s why we are planning using nextcloud and collabora. We do have a dlink 2700u modem with us (just for playing lan games, we don’t have internet in it. It is used as a hotspot). The point is we can’t rely on internet. So any solution involving internet is not feasible.
I am running UBUNTU server 18.04 LTS
So thats my situation. I have Installed Next Cloud using this tutorial :

I am doing this on a VM (for now, I’ll change it to a full fledged PC after I get it working). During the tutorial he installs ssl certificates using certbot’s let’s encrypt. I tried to do it, but certbot wont give ssl to ip addresses. so i skipped https and got nextcloud working perfectly. But I found a way to self sign ssl from here :

So I did everything exactly as they said and got https on next cloud (Using ip address not domain). Then I continued to watch another video from the same guy about installing collabora through docker :

It was fine until he configured the reverse proxy using ssl certificate and key generated for collabora. He generated ssl certificate, chainfile, key manually using certbot. Then I realised that self signed certificate files only contained .crt and .key file only. There is no chain file and the file extension of ssl certificates provided by the certbot are all in .pem format. I know if I have subdomain for nextcloud and collabora, I could have produced ssl using certbot lets encrypt. but i am running on local machine, I dont have domains in local system.

So what do I have to Do to setup collabora and nextcloud installed in a same server without any subdomains ?
If subdomains are a must, how can I install subdomains in intranet server without dns server?
I can try bind9 but is it possible to run bind9 on the same server as nextcloud+collabora ?
I cant have a system running dns server, another one with collabora and another with next cloud. I just have one system. So any one know how to do this?