I want to access my OctoPrint installation from the internet but I only want people I know to be able to see anything

In that case what you want is to restrict access to OctoPrint via common means (outside of OctoPrint) to establish network security.

Why that? Well, contrary to what you'd first think it would not be enough to just refuse to display anything of the usual information in OctoPrint's interface to anonymous users. First of all, that info would still be accessible on the websocket that is used for pushing that information to the frontend. Secondly, if you have a webcam configured and active, OctoPrint does not have any control over that at all (it just embeds it) so it can't possibly secure it. So if you really want to make sure that only you and the people you trust can get read-only access to your OctoPrint instance, you'll need to secure it one layer above OctoPrint in your network hierarchy.

At the very least you'll want to configure OctoPrint to be only accessible through a reverse proxy from the outside (e.g. by setting up haproxy in front of OctoPrint and forwarding its port 80 instead of OctoPrint's port 5000 - OctoPi even already ships with haproxy in place) and set up HTTP Basic Authentication for that. Better yet is to setup a VPN solution (Part 1, Part 2).

Keep in mind: OctoPrint is a print server. It is not a full fledged network security solution and it also does not try to be that since that would open up a whole different can of worms. Use established tools to achieve that please.

3 Likes