I don't have or use the Pi user on my Raspberry Pis. How can I install and use the octopi software? It seems to be hardwired to use the Pi user!
Can you elaborate?
There's nowhere in OctoPrint's codebase that depends on the Pi user - it runs on Windows and Mac OS too, and Pi almost certainly is not available there.
Octopi depends on the pi user - or at least it is configured that way.
But I don't get why you want to use another user?
Anyway here is a guide on how to install Octoprint. Just replace the pi related parts with your user name.
Now the question makes sense to me...
I would be curious as to what method you are using to install/run OctoPrint. OctoPi definitely uses the pi user but since it is a full system image including OS, you most certainly have the pi user. If you remove it, then yeah, octoprint isn't going to work. But that's you monkeying with the OS after flashing the image to your Micro SD card. If you're installing manually over Raspbian, then you would declare which user to run the program under when you start it.
As someone who tried to use the install over Raspbian at first, i would advise going with OctoPi instead. It's just a lite version of Raspbian with everything done for you. You can install anything overtop of OctoPi that you would on Raspbian. For example, I have Node-Red installed on my OctoPi server as well to run printer related automations (I know node js, not python). It runs perfectly. Obviously you can't run anything that will be too labor intensive as you don't want to interfere with OctoPrint but I think you'll have much more success if you stick with the OctoPi image and leave the pi user alone.
It’s bad practice, sorry.
Octopi should have a dedicated user created as all other applications do that require a user.
In the case of OctoPi, the Pi user is dedicated to OctoPrint - that's all the image does. If you want to install other software with other users then you can, if you want to install OctoPrint on a different distro under a different user then you can do that too. Though I don't think creating a new user for every application is necessary, but if that is what you want to do then by all means, do so.
Also lot's of users are not familiar with Linux. They just need a setup as simple as possible.
Asking them for a user name for the OS installation would confuse them - and they really wont care.
No, the opposite. Create a dedicated octopi user and group and use that.
It seems you really pretend on your opinion. Me too
However, when it comes to maintenance via SSH, and people forgot about their user name, they get confused.
BTW: There has never been trouble with the "pi user"...
You're using OctoPi on a Raspberry Pi with the user pi.
I don't see what's wrong with it.
To quickly chime in before this escalates further (because reading through this I have the feeling that we have some strong opinions circulating here, all of them with valid points)...
Yes, in general it's best practice to give a server application its own user account name. Yes, it would have been a good idea to do that on OctoPi as well. However, back when all this just started out as a pet project on all sides with a tiny user base, even more limited resources than now, the decision was made to simply automate the back then README based installation process for a git checkout of OctoPrint with a build script. That involved just using the single existing user account pi because .. well... it was going to be an one-trick-pony kinda image, only running OctoPrint, so things were kept simple. The project grew, so did the user base, and by now changing the user name would lead to a TON of support overhead. Why? Users over the years have gotten used to OctoPrint's settings being at
/home/pi, in the rare cases that they have to enter the more and more to them frightening command line. While I always tried make sure to use
~/.octoprint whenever referring to OctoPrint's config folder, the same can't be said of the places around the internet that now give tips for how to solve certain things on OctoPi. So, at this point, switching OctoPrint to a different user would be incredibly painful on the support front. And for what? To follow a best practice that frankly in this case - considering that this is supposed to be a dedicated image with only OctoPrint running on it - wouldn't have a single advantage here, at least not as far as I can see.
So yes, a dedicated user account for a server is good practice. But no, it's not as easy as just creating a dedicated user account in a case like this. There's not just technical aspects to consider, but a support situation as well, and the pain that changes like this can cause.
Is there a way for me to change it or is it hard-coded into the application.
(Unix systems administrator)
There is nothing hardcoded but it would be a hassle.
You would have to change the config, the startup script, the permitions and move the venv (and I'm not quite sure whether you can just move a venv or not).
In my opinion it would be much easier to just set up a new octoprint instance on fresh raspbian image with a user of your choice.
OctoPrint runs on Linux, Windows, Mac, various *BSD, even your own custom OS kernel if you somehow can get a Python powered userspace on it with a functional standard API... hardcoding a Raspbian specific user would be kinda senseless considering that
(former Unix systems administrator)
Why would it be RaspberryPi OS specific?
I just said that OctoPrint wouldn't be Raspberry Pi OS specific. Everything regarding paths is configurable with sensible defaults and no assumptions about user names and the like. OctoPrint doesn't care at all about which user it runs under, as long as it has a config dir it can read and write and a serial port it can access.