Cannot autostart octoprint on raspberry pi os, linux

What is the problem?

Cannot autostart octoprint on raspberry pi os which is installed on a macbok pro.

What did you already try to solve it?

Went back and retried everything still same result

Have you tried running in safe mode?

No

Did running in safe mode solve the problem?

No

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

I downloaded the octoprint bundle from a github repository:

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

If I could I would much prefer to install octopi on my macbook pro but IDK how. As the only reason I would use the macbook pro would be to run octoprint as the screen and battery is broken. So it is now headless. I am also very confused where to "download " the files to.
octoprint.default => /etc/default/octoprint,
as in this case I created a folder in /etc/default and named it octoprint before inserting "octoprint.default" in it. I did all this as a super user as it said permission denied.

So as I was trying to autostart octoprint I opended the readme.md found in the scripts of the octoprint repository zip and followed the steps, but I got stuck on the step where it says "sudo systemctl enable octoprint" as I ran the command in the terminal as normal user. It said this: pi@raspberry:~ $ sudo systemctl enable octoprint
Synchronizing state of octoprint.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable octoprint
update-rc.d: error: octoprint Default-Start contains no runlevels, aborting.

I then ran this command sudo systemctl start octoprint which replied as ● octoprint.service - The snappy web interface for your 3D printer
Loaded: loaded (/etc/systemd/system/octoprint.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-08-04 17:00:24 +07; 15s ago
Process: 2942 ExecStart=/home/pi/OctoPrint/venv/bin/octoprint (code=exited, status=203/EXEC)
Main PID: 2942 (code=exited, status=203/EXEC)

Aug 04 17:00:24 raspberry systemd[1]: Starting The snappy web interface for your 3D printer...
Aug 04 17:00:24 raspberry systemd[2942]: octoprint.service: Failed to execute command: Permission denied
Aug 04 17:00:24 raspberry systemd[2942]: octoprint.service: Failed at step EXEC spawning /home/pi/OctoPrint/venv/bin/octoprint: Permission
Aug 04 17:00:24 raspberry systemd[1]: octoprint.service: Main process exited, code=exited, status=203/EXEC
Aug 04 17:00:24 raspberry systemd[1]: octoprint.service: Failed with result 'exit-code'.
Aug 04 17:00:24 raspberry systemd[1]: Failed to start The snappy web interface for your 3D printer.

A few questions:

This is pretty confusing, since Raspberry Pi OS is only meant to run on Raspberry Pi devices. Do you mean Raspberry Pi Desktop?

If that's the case, you are essentially running Debian Linux.

Why? And what did you do with it afterwards? The startup scripts you found expect that OctoPrint is installed into a Python venv at a specific location. If you didn't do that, it won't work.

Instead, follow one of the install guides, like the official guide for installing on Linux:

And, on MacOS:

Also a note of clarification: OctoPi is an operating system (Raspberry Pi OS) image with OctoPrint and associated apps installed and configured. If you are searching for information on OctoPi instead of OctoPrint, you may get less relevant or even confusing results.

3 Likes