Starting OctoPrint with sudo/as root tells me "You should not run OctoPrint as root!" - why?

general

#1

This is intentional.

It is generally not a good idea to run servers as user root, unless you really know what you are doing. No software (and this statement also includes OctoPrint) should ever be considered secure (although of course I do my best) and applications running as root on your system are potential attack vectors to really break stuff.

If the reason you want to run OctoPrint as user root is because you want to bind it to port 80, rather consider putting it behind a reverse proxy like haproxy (OctoPi even already ships like this).

If you really need to run OctoPrint as root though, take a look at the super secret startup option --iknowwhatimdoing.