I have set up a dynamic DNS adress from noip.com, so I have access to Octoprint via an adress like ***************.ddns.net
Everything works fine, exept for one thing:
As soon as I access my Octoprint from outside my home network, I can't see the live stream from my Rasberry Pi Camera anymore. (I can only see the live video stream when I access Octoprint from within my home network)
How do I set things up so I can see the live video stream from ouside my home network (via ***************.ddns.net) ?
Safest thing to do is install a VPN
PiVPN makes it easy...then only one port thru your router (UDP port 1194) is open to the internet...on the device you want to log into with you install OpenVPN client...then use the key generated from the server (an .ovpn file) https://github.com/pivpn/pivpn <- source page
Once connected...even if you are a zillion miles away...the device looks like it's sitting inside your home network thru IP tables and internal routing of the server, giving you complete encrypted access to your home network, and access to your file shares, servers, VNC, and whatever else you have hosting inside your own LAN. (and without the proper keys...noone gets in )
In the ovpns folder where you create the ovpn files run this command to make a simple file server and access via your phones web browser using your Pi's IP:8080 python -m SimpleHTTPServer 8080
That’s a nice way to throw the security out of the window... It is like buying an expensive lock and the mailing yourself the key in a transparent envelope with the return address clearly shown.
What I love is that clone-your-own-key kiosk at Fry's Electronics, for example. It takes your credit card (now they have your home address), asks you what kind of key you're making ("home"), then they accept your existing key and duplicate it for you within moments.
But then you've just given them the ability to clone another key later, drive to your house when you're not there and open it up.
Hi octopi uses the same url entered whether you are remote or local so the remote browser is looking for the same url in your case http://octopi:8080/?action=stream this is a local only address. what you can do is port forward 8080 on your router to your pi as well and change the webcam url to something like http://***************.ddns.net:8080/?action=stream then the address will resolve both inside and outside your network as long as your router supports loopback. (which most do)
This has been a while, but it appears that this might not work for streaming via the android app. Attempted to try: /webcam/?action=stream as well as http://publicIP/webcam/?action=stream. Couldn't get it to open up in a browser window or via the app.
So, are you suggesting creating a second tunnel for the webcam? I am experiencing the same problem with an orange pi on Armbian, and I think what Ngrok only redirects your printer to the port 80 of the domain. In my case, my printer uses the port 4000, and my webcam uses 8080. With the Ngrok Tunnel Plugin, I am unable to use the same tunnel URL for the webcam as it redirects "my_webcam's_local_ip:4000" to "ngrok_subdomain:80" and that means "ngork_subdomain:8080" does not lead anywhere. So, I can only insert a ngrok link into webcam URL if only i create another tunnel leading to the port 8080. Do you think there is a solution without creating a second tunnel for the webcam? Could creating a relative path solve the issue?
I apologize if I misspoke. This will work for the majority of people which are using an octopi image or have implemented a reverse proxy similar to octopi's haproxy and are redirecting the standard port 80/443 and webcam stream urls. If your setup does not have the reverse proxy in place then it will not work for you I don't believe.