Hello everybody.
I have two printers connected to octoprint. Locally, I can access them by myIP:5000 and myIP:5001.
It works properly.
From outside, the local network is accessible via a vpn and only port 80 is opened. It's a compagny VPN and i can not have more port opened.
My question is, can y have two address myIP\octopi and myIP\octopi2 and redirect port to access the two instances ?
Thank you very much
What did you already try to solve it?
WRITE HERE
Have you tried running in safe mode?
WRITE HERE
Did running in safe mode solve the problem?
WRITE HERE
Systeminfo Bundle
You can download this in OctoPrint's System Information dialog ... no bundle, no support!)
WRITE HERE
Additional information about your setup
OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible
Ok,
The VPN only accept port 80 as input.
So i can access octoprint only with routerIP:80.
The router is a littlebit old and redirect only port over ip ex:
routerIP:80 to localIP:80
Thats why I want to redirect inside the octoprint webserver via address.
You'll need to setup a reverse proxy on the server you have OctoPrint on, which will run on port 80, to then proxy /octopi and /octopi2 to their respective locations.
The OctoPi image includes Haproxy, with the config I've linked below. It configures / to go to OctoPrint, and /webcam/ to pass through to the webcam server. It should give you an idea of how it works. Proxy configuration is not easy, as it can look like another language at some points...
There's more examples available here, and some more details of what OctoPrint needs to work properly through a proxy. The X-Script-Name header is important.
I never researched it as I have no need from it, just the logic:
a passive approach (i.e.: the browser 'outside' determines which instance to access by calling myIPv4/somePath) most likely will not work unless you setup some ingenious reverse proxy.
An active approach may work like this: you have 2 different accounts at something like AstroPrint. Each individual OctoPrint connects to one of the accounts. As the connection is initiated by the OctoPrint instances the router will figure out the NAT stuff, browser goes to $(AstroPrint/thisOrThatAccount)
I take it you are aware that exposing an OctoPrint instance to the net w/o some reliable authentication in front is generally considered unwise. A 3D printer is a machine capable of starting a fire and kids do strange things for lulz.
I just want to point out that you are describing port forwarding, which is not the same as VPN. Port forwarding OctoPrint like that is highly discouraged.
If you really do mean VPN and it's limited to a single port for some reason, keep in mind that your webcam streams (if you have any) will also need to be setup similar to how Charlie has described because they will need to be accessible from the client to be visible too.