Nextcloud Collabora Application Error Bad Gateway Fix via Portainer

Good Afternoon Everyone,

For anyone having the issue of trying to spin up a Collabora server via “Apps” on Truenas Scale 25.04.1, I have a fix if you’re not able to proxy traffic to the Collabora server and you are getting a “Bad Gateway” using Nginx Proxy Manager, if you’re not using Portainer that will be necessary for this fix, go to stacks in portainer and paste this yaml configuration

version: ‘3’
services:
collabora:
image: collabora/code
container_name: collabora
restart: always
ports:
- “9980:9980”
environment:
server_name: collabora.domain.tld
aliasgroup1: https://nextcloud.domain.tld:443
username: ‘your username’
password: ‘your password’

you have this configuration make sure you specify the ip address of the collabora server in Nginx and port HTTPS / FORCE SSL / HTTP2 Support / HSTS Enabled/ Block Common Exploits / Websockets support
Make sure those are all enabled, then go back to Nextcloud and point it at your Collabora server https://collabora.domain.tld

Hope this helps anyone having issue this was just a quit fix and I generated the YAML with AI but it works, thanks all!