Can't access webcam

Camera model
Logitech C170 (working fine despite the bad quality)
What is the problem?
I've installed Octoprint in an OrangePi Zero 2 running on Bullseye and mostly followed the official Linux guide or from 3dprintscape (no haproxy). Everything except the webcam stream is working like intended.
All the guides say to use "/webcam/?action=stream" in the Octoprint settings, but I can't get it to work with "PiIPAddress:5000", so...
What did you already try to solve it?
... I used "http://PiIPAddress:8080/?action=stream" and it's working so far locally. But I want to access octoprint with the camera feed from outside of my network, so I set a port-forward in my router to "FritzBoxDNS:5000" but from this site the stream with my adjusted link didn't work.
(In the past I had octoprint running in docker on an old PC and there I had used this port forwarding with "/webcam/?action=stream" working)

At my research I found that's often a question if you can access octopi.local and yes, I can access in my case "orangepizero2.local" (don't know if I had to install bonjour print services, but I did) and strangely this is the only way "/webcam/?action=stream" is working.

Hopefully my explanation is understandable.
I think the solution of my 2 combined problems will be to get "/webcam/?action=stream" working with the "PiIPAddress:5000", then the forwarding should also be working

Thanks for your help :slight_smile:

/webcam/ would be provided by Haproxy so if you don't set that part up, then you won't be able to use that as the URL.

You've explained the problem in your post - you've port forwarded port 5000, but the webcam is on 8080 - so this is not accessible. There's no way around that without using a reverse proxy to combine the two. There's no URL with an IP address and port number that would fit both local and external access, without using the relative URL above.

You should not port forward your OctoPrint instance without any extra security and this goes directly against the project's recommendations. Please use a secure method of remote access and not port forwarding. A 3D printer is not something that should be connected to the hostile internet.

Thanks for your fast reply.
Now I've installed haproxy probably correctly (can access octoprint by using only the IP and the webcam also works).
But now (I hope it isn't that much offtopic) I ask myself how to access it from the internet in the best way. My idea was to use "MyFritzBoxDNS:anyPort" which the router redirects to "PiIPAddress:80".. this works, but is this the intended way, because octoprint puts out a warning "possible external access! .. insecure..."?

I explained in the earlier post that port forwarding is not recommended, and gave you a link that explains more & lists some recommended ways.