NextCloud keeps adding port to URL and breaks everything

I’m on electric eel. NextCloud is working fine on the mobile app and desktop client. However, the web UI does not work. It keeps adding the port to the URL so it becomes cloud.domain.com:port