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

I just did a setup on a clean install to a Pi 4.

These are the steps I used to get it up and running as it is slightly different to what is listed above.

sudo apt update -y
sudo apt full-upgrade -y
sudo apt install python3-pip python3-dev python3-setuptools python3-venv git libyaml-dev build-essential -y
pip3 install virtualenv
sudo reboot

mkdir OctoPrint && cd OctoPrint
virtualenv --python=python3 venv
source venv/bin/activate
pip install octoprint

//Test

~/OctoPrint/venv/bin/octoprint serve

//Setup Octoprint Via GUI you should be able to see some info in the console.
//Once setup is complete.
//End Octoprint

CTRL+C

The rest of the guide works well :slight_smile:

1 Like

Hi, I'm stuck on the haproxy.cfg sample. I can't edit it, showing an error "Failed to save document. Permission denied." How can I edit and save the haproxy.cfg file?

A little late, but run the edit command as

sudo <whatever editor you're using> haproxy.cfg

That gives the editor root permission, and root can save any file anywhere.

me too bro so yeah

I am having a lot of trouble

It might help to say what you're having trouble with :wink:

Im having issues with plugins, they install okay, but after restarting the server, they are no longer installed

Please open a new topic under 'Get Help', providing as much information as possible and we will try to help you.

Why? If this is the only thing it is used for, why does it matter? Seems like running this virtually just makes it inherently use more resources?

I just got a 3D printer and I'm interested in Octoprint. Less for the video, because I have some great 2k pan and tilt cameras that give me a good view, but more so for stats.

A virtual environment is NOT a virtual machine. Think of it as a dedicated folder for the software itself and the dependencies. There's no resource overhead there, apart from a tiny amount of additional storage for some copies of the Python binaries that are miniscule.

And why? We've had too many issues with people who went "this is the only software that will run there" and then it turned out it wasn't.

3 Likes

Thanks for the quick reply. Yes, I realize it isn't a VM. Just seems like it makes it more difficult to access.

Ok, fair enough. Thanks!

Great instructions, but I'm trying to futz with my camera and /boot/octoprint.txt just isn't there.
Did I miss something? I've been running this for almost two years now, everything works and updates but the file's just not there! Is there a default somewhere I can start with? THanks!

/boot/octoprint.txt is a part of OctoPi and this guide doesn't create it or set it up. To change the mjpg-streamer settings you'd have to edit the scripts you created originally. It's possible this guide changed since you did it or that you decided to do something different, so saying exactly what/where is impossible, but starting with what the guide has for setting up mjpg-streamer to start up automatically is a good place to start.

Yep, I understand. I followed the guide starting with Raspbian on a Pi 4.Streaming with mjpg_streamer works a treat, but it looks for /boot/octoprint.txt and of course doesn't find it.

I'm just looking for an octoprint.txt to start with :slight_smile:

I guess what I'm trying to say is that won't help you. If you are trying to alter the resolution or framerate or something to that effect you just need to edit your mjpg-streamer script.

OctoPi has some 'background' scripts and utilities setup to read the octoprint.txt and do different things based on it...but you won't have that if you followed this guide. Even if you got a copy of the default octoprint.txt, putting it in /boot and editing won't do anything for you.

Going to quickly jump in an point out the first section of the script:

As confusing as this is, it does actually have a section in there for sourcing the config from /boot/octopi.txt. Quite confusing, but these scripts were initially copied out of OctoPi.

@salsaman - it would probably be easier to adjust the config at the top of this file, or you can add the exact same lines to the octopi.txt file.

1 Like

Ah, I had missed that part, so I stand corrected then. Sorry!

Thanks, done!

Installed this on my Pi4 running Hoobs on Rasbian: PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"

I got everything installed just fine but when I try to run

~/OctoPrint/venv/bin/octoprint serve

But it doesn't complete the process, it ends on this line every time

2021-07-21 11:50:00,239 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid

I also attached the full output.
octoprint startup output.log (10.7 KB)

Any ideas what I need to do here? When I installed I made sure to installed with the

--no-cache-dir

option and then I restarted the Pi after adding the hoobs user to the dial out group

That looks like it's actually running just fine, have you gone to http://<yourPi>:5000? If you start it like this it starts interactively, meaning it takes over your console until you stop it again via Ctrl+C. If you don't want it to run like that you'll need to install some startup scripts.

1 Like