Setting up OctoPrint on a Raspberry Pi running Raspbian

It appears to be running in the third case.

It is. And that's because I started it myself and posted it for comparison's sake. Still the problem remains. After running sudo service octoprint status it get's back with a warning for fake startup-deamon could that be the problem?

EDIT: running mv /sbin/start-stop-daemon.REAL /sbin/start-stop-daemon a solution found online for the above mentioned warning message, looks like it fixed the problem. Posted the solution here for people having the same problem

It is. And that's because I started it myself and posted it for comparison's sake. Still the problem remains

I seem to have the same problem. I see you found a solution online, but any reasons as to why it works?

UPDATE: I think I figured out the issue (I'm assuming @Bence_Voros was also setting up octo on a non raspberry pi computer). If you're not using a pi you need to change the username pi to whatever your username is in the /etc/default/octoprint (there should be two places you need to change it)

The nginx webcam location configuration requires proxy_buffering set to off, otherwise it will load forever.

        location /webcam/ {
                proxy_pass http://192.168.0.11:8080/;
                proxy_buffering off;
        }
1 Like

The steps worked flawlessly setting up a Pi 4 (1GB). I replaced my Zero W which worked despite discouragement everywhere and... wow, the Pi 4 is so much faster.
I used the backup/restore plugin which also worked great.
Many thanks for such great software!

3 Likes

Thanks for posting this guide.... I know just enough to be dangerous and a little surprised I got it all to work.... Thanks again

1 Like

Note that if you're using another shell (I'm using fish), this line will not work - you'll need to switch to bash or source a different file. Luckily, an activate.fish is also included, so I could just source that instead.

This install guide worked well on a Pine 64 and the Armbian Buster server image.

Andy

2 Likes

I installed this on a RPi4 with no issues starting from "2019-07-10-raspbian-buster-full.img" as I have an 7" LCD attached. My question is I installed TouchUI and boot directly into the epiphany browser as per the instruction but when I exit the browser I just get a black screen. Is there anyway to get it to go back to the default GUI?

It may be necessary to change what the display sees:

Ctrl-Shift-F1 through F7 or F8 to the best of my knowledge will select the different ones. The X11 screens start at F7 and all before that are tty.

1 Like

Just ran through these steps on a shiny new Raspberry Pi 4 (4Gb) and everything seems to be up and running. I think the only trouble I had was when I accidentally skipped over steps, or things didn't save correctly because I didn't sudo first.

Hello. Completely new to the Raspberry Pi platform, but have been doing Arduino for years. I want to run OctoPrint on a 3B+ running regular Raspian so I can also run Pi-Hole and who knows what else simultaneously. I print a lot and have no qualms about leaving it on. Of course, I do want the webcam to keep an eye on things remotely. Would this guide be appropriate for me?

Note that PiHole is known to block the software update process within OctoPrint. Personally, I wouldn't put non-related things also on this Pi since the quality of print jobs is what you're after, IMHO.

For me, I'd rather just buy more Pi computers and dedicate those to these other tasks.

2 Likes

Excellent guide. Just the right balance between too brief and too detailed!

2 Likes

To make the webcam work I had to add the script (with file name 'webcam') in directory /etc/init.d and not home/pi/scripts/webcam. Next, I did follow what was required for the webcamDaemon file (Make sure you create the file 'scripts'). Finally I executed the following two commands to make it work.

sudo chmod 755 /etc/init.d/webcam
sudo update-rc.d webcam defaults

Another note is you won't have to add the "/home/pi/scripts/webcam start" in the rc.local file.

Phenomenal post. Made an account just to <3 this!

1 Like

<If you want to be able to start and stop mjpeg-streamer from within OctoPrint, put the following in /home/pi/scripts/webcam :

```
#!/bin/bash
# Start / stop streamer daemon

case "$1" in

  • start)*
  •    /home/pi/scripts/webcamDaemon >/dev/null 2>&1 &*
    
  •    echo "$0: started"*
    
  •    ;;*
    
  • stop)*
  •    pkill -x webcamDaemon*
    
  •    pkill -x mjpg_streamer*
    
  •    echo "$0: stopped"*
    
  •    ;;*
    
  • )
  •    echo "Usage: $0 {start|stop}" >&2*
    
  •    ;;*
    

esac
```

Put this in /home/pi/scripts/webcamDaemon :>

i Just want it to start when i startup the pi but it doesn't do shit

I guess you missed that part :wink:

@foosel thanks for a great tutorial. Please consider adding another Heads-up section somewhere next to camera optional section saying:
Don't forget to enable connection to the Raspberry Pi Camera in RPI config:

- sudo raspi-config
- choose '5 Interfacing Options/P1 Camera -> Enable'
- reboot

I configured lots of OctoPrints, but last time I spent quite some time looking for a reason why the camera didn't want to work :slight_smile: