Setting up OctoPrint on a Raspberry Pi running Raspberry Pi OS (Debian)

Oh well would you look at that! I guess it just needed some time - it was not loading before at all. Thanks!

I will be adding the auto start scripts for sure, just wanted to make sure it was running correctly first!

Help! I am trying to install OctoPrint on Linux I have gotten far but then I hit a road block. It says the command failed to execute because It's permission got denied. Here's the error message. root@raspberry:/home/pi# journalctl -xe
Jul 26 19:50:57 raspberry systemd[4008]: octoprint.service: Failed to execute command: Permission denied
Jul 26 19:50:57 raspberry systemd[4008]: octoprint.service: Failed at step EXEC spawning /home/pi/OctoPrint/venv/bin/
-- Subject: Process /home/pi/OctoPrint/venv/bin/octoprint could not be executed

I wrote in "sudo service octoprint start" as I was following this guide

Everything in this guide should be done as a standard user, not as root. Your terminal paste is showing you are doing it as root.

I have tried as a standard user but still no success, I am trying to get octoprint to auto start as I want my macbook which is running raspbian to be a headless control hub for my 3D printers.

You may find it easier to open a new post, where you will be able to provide as many details as possible, including the octoprint.log or output from running /home/pi/OctoPrint/venv/bin/octoprint serve manually.

Hello! I installed this on a Raspberry Pi but have since purchased a separate Pi to handle this task alone, how do I now uninstall this completely from the first Pi? I tried using pip to uninstall but I have learned that due to being inside a virtual environment there is more that needs to be done and I am unsure of how to remove that! Can you provide any tips for me to uninstall?

You can just delete the virtual environment/whole OctoPrint folder. Then you would have to go backwards and remove all the services setup, and remove the haproxy configuration.

When going over this, keep in mind it's age and do yourself a favor by flashing OctoPi OS. Doing it manually, using this guide, the performance is far slower.

I agree - using the OctoPi image makes life easier but I don't see any reason why the performance should be worse?

I have Octoprint installed and I can reach the server via the web BUT what is the username and password? How do you set the username and password?

I see my issue I used the browser to http://octopi.local I needed to go to http://IP ADDRESS:5000

So I guess you're running two Octoprint instances and one of them is running on an Octopi image :slight_smile:

I did the install based on the instructions for Raspbian. I think it just wasn't going to serve the startup page by using port 80. With the correct port it worked. I don't see how I would have created two instances. I wouldn't think that would work otherwise there would be no need for the proxy and so forth. That said I am not sure what was going on in the background. I could check next time I boot it to see if there are multiples. But to me this is waaaay overly complex just to have a gui. I wanted to use a 3.5 tft just so i had access at the machine without carrying my laptop with me. 32 bit octopi still works from what I read but I think I will just gve up on it. I could not even get chromium to work on the 64 bit.

It's not entirely clear what issues you're having on your setup. If you install OctoPi, then the install process is quite straightforward. From there, you could install a desktop & use chromium, but with a 3.5 inch TFT you won't be able to do much. Instead of desktop install + chromium, you could try something like OctoDash which is optimized for touchscreens.

Stay away from the 64 bit versions of any Raspberry Pi OS if you don't want to debug issues, they are out of date and not fully working.

Thank you so much for these detailed, accurate and thoughtful instructions, and for this great software! I appreciate the mentions of various security concerns and how to address them. Everything worked 100% as described for me, including webcam, with a fresh installation of Raspberry Pi OS on a Pi 4. I'm waiting for my printer to arrive today but as far as these instructions, these are spot on.

To me using a full installation of the OS is much preferable to OctoPi (not that I have tried it that way), especially with a Pi that has some performance left over for other tasks like a 4. Great to be able to ssh or VNC in and use it as a computer.

1 Like

this solved all my problems... thank you!!! That webcamDaemon script broke my stream everytime.

Hello everyone!

I somehow missed a step and I do not have webcamd.service setup in my /etc/systemd/system folder. Attempting to run a mkdir and creating this file resulted in a "mkdir: cannot create directory '/etc/systemd/system/webcamd.service': Permission denied"

Any suggestions? When manually turning on the webcam server, and inputting the http://:8080/?action=stream command, I am able to view the webcam. Hopefully this enough info to get some more experienced folk of what my current setup state is. but if more info is needed, happy to share wtv is needed. Thanks in advance!

webcamd.service is not a directory, so you shouldn't be creating it with mkdir. It probably needs sudo to create & edit that file, so to edit it you would use something like nano. For example:

sudo nano /etc/systemd/system/webcamd.service
1 Like

Hello,

I installed Debian 11 on an old ASUS Eee PC 105D and then Octoprint on top of this, following this instructions. In Debian 11, there is already haproxy 2.x and it is mentioned in ths article, that there should be an example for a config file that fits this version (Reverse proxy configuration examples). But I can't find it. Can someone show it to me?

Best regards
Ralf

If you scroll right to the bottom of the comments on that thread, there should be one detailing the changes:

It should probably be merged into the top post as a separate config.