Access from Internet

I need to access my OctoPrint from outside my local netwok (the internet and/or VPN).

Because of DS-Lite problem, I am running a VPS from outside my network and connect my raspberry through wireguard. On that server I am running nginx as a reverse proxy and the WireGuard server (on Ubuntu 20.04).

I got it instantly working wiht Octo4Android without any issue. Because of some needs I now wanted to switch to my rasberry.

What is the problem?

I can't conntect to OctoPi through the reverse proxy. I get the error 502 Bad Gateway.
Because of that I also tried to connect with just VPN (WireGuard). This also doesn't work.

What did you already try to solve it?

I thought it could be a problem, that haproxy was installed. I've set up octoprint on my own with rasperryPi OS and without haproxy running. So it's just reachable on port 5000. Same problem here.

I "octo"-checked my proxy settings for nginx. In OctroPrint I've activated CORS. In the config.yaml I've excluded ip-check and also whitelisted my wireguard-subnet (192.168.206.xx) and added the downstream ips, from that I want to connect. either for my own octoprint-install and on another octoPi I've set up.. nothing seems to help....

I've added host and port to config.yaml as and 5000.
And I've added recommended settings for reverse proxy there.

See: OctoPrint Docs

I am just able to connect from within my internal network with any IP from 192.168.178.xx. Everything else seems to be blocked.

Additional information about your network

My VPS with IPv4 running Ubuntu LTS 20.04 and WireGuard (with IP

My OctoPi behind my FritzBox running as WireGuard Client (IP and internal IP (

From my internal network connections ALWAYS are working.

Thank you for any hep!


The logs:
haproxy.log (137.2 KB)
octoprint.log (108.2 KB)
systeminfo.log (857 Bytes)

Hello @Christian_Nikola !

You may have a look on this FAQ:

Hello Ewald,

thanks for your reply,

I don't know what to look at in the FAQ, I've read a lot, and I can't find, what's the matter.
I also have the reverse proxy configuration from there and it already was working with Octo4a. But it is not working with my raspberry pi.

I can't figure out, why...

Thanks for helping hints!