Invalid Origin Error


i’m Running a NextCloudPi Server on Docker.
NCP is hosted on my Synology.
Its running behing the On-Board NGINX Reverse Proxy.

I have to Problems.

First Problem:

NCP trys to Redirect in URL Links on Port 443 and 4443, but i need to mask these Ports with some other Ports in the Local Area Network.

First Question:

How to make these Redirects working on my masked Ports?

Second Problem:

NCP dont make Updates because of an “Invalid Origin” Error.

The trusted domains are working, the reverse Proxy is working and i have access from the internet.

Second Question:

How to get rid of this “Invalid Origin” Error?



How did you run up the docker instance?
Docker run or compose?
What were your settings?

A good thing about docker is that you can host ports to whatever you want as the internal docker ports are still the same.
In docker run it’s the -p flag, so [host]:443 -p [host2]:4443 or in docker compose
- host:443

Then with an nginx reverse proxy all you have to do is point it to the right ports. However, there are a bunch of nginx flags/settings to make something like nextcloud work properly. What’s your nginx configuration?

I suspect it’s got something to do with this setting
X-Frame-Options: SAMEORIGIN but I’m not expert so

I suspect this is where the issue lies but it might be some other Synology related thing.