HTTPS Nextcloud won't work with HTTP Onlyoffice Document Server

So I’ve got Onlyoffice’s document server installed on the same server that I installed Nextcloud on. I used a different port (2096) for the document server, which was also installed via docker. I have Nextcloud on Cloudflare for the SSL certificate, but setting up a reverse proxy with nginx seemed too difficult for me. I set the correct ip with port for Onlyoffice and it accepts it, but when I try to open a file it tells me that “ONLYOFFICE cannot be reached”. I have Onlyoffice’s document server running on just http, without a certificate. When I use Nextcloud with just http, I can access the files fine but I would prefer to be able to use https for security. Is there a way I can use Nextcloud on https and still contact onlyoffice? Nextcloud isn’t running on docker, while Onlyoffice is.

if you are using selfsigned certificates for onlyoffice you may try

'onlyoffice' => 
   array ( 
      'verify_peer_off' => TRUE,

in your nextcloud config.php file.

for setting up a reverse proxy in nginx:

and / or

Have a look at
Makes docker really easy to manage and comes with build in letsencrypt support.

If you want to see how it works run the playbook in a new virtual machine. Traefik and nginx and docker and so…