This is an old revision of the document!
Installing manually
The generic setup instructions boil down to
This starts it up manually
/path/to/OctoPrint/bin/octoprint serve
Basic Installation
cd ~ sudo apt update sudo apt install python3-pip python3-dev python3-setuptools python3-venv git libyaml-dev build-essential mkdir OctoPrint && cd OctoPrint python3 -m venv venv source venv/bin/activate
OctoPrint and it's Python dependencies can then be installed using pip:
pip install pip --upgrade pip install octoprint
Note
If this installs an old version of OctoPrint, pip probably still has something cached. In that case add --no-cache-dir to the install command, e.g. pip install --no-cache-dir octoprint To make this permanent, clean pip's cache: rm -r ~/.cache/pip
Starting the server for the first time
pi@raspberrypi:~ $ ~/OctoPrint/venv/bin/octoprint serve 2020-11-03 17:39:17,979 - octoprint.startup - INFO - *************************** 2020-11-03 17:39:17,980 - octoprint.startup - INFO - Starting OctoPrint 1.4.2 2020-11-03 17:39:17,980 - octoprint.startup - INFO - ***************************
Automatic start up
Download the init script files from OctoPrint's repository, move them to their respective folders and make the init script executable:
wget https://github.com/OctoPrint/OctoPrint/raw/master/scripts/octoprint.service && sudo mv octoprint.service /etc/systemd/system/octoprint.service
Adjust the paths to your octoprint binary in /etc/systemd/system/octoprint.service. If you set it up in a virtualenv as described above make sure your
/etc/systemd/system/octoprint.service looks like this:
ExecStart=/home/pi/OctoPrint/venv/bin/octoprint
Then add the script to autostart using sudo systemctl enable octoprint.service.
This will also allow you to start/stop/restart the OctoPrint daemon via
sudo service octoprint {start|stop|restart}