sudo? Bad choice. Do not run OctoPrint as user root.
Will also make your issue go away since ~ with sudo refers to the home directory of user root at /root, and you've probably have setup OctoPrint somewhere else.
If this is on an OctoPi-based install, you could assume that OctoPrint can be completely controlled via the script that were already part of that image:
sudo service octoprint start
sudo service octoprint stop
sudo service octoprint restart
This might seem like I didn't hear foosel's advice but trust me, it's different from running OctoPrint directly as root. The underlying scripts themselves do it the right way.