So I've setup a guide on how to setup Octoprint on the Pine64 2gb model. It is kind of lengthy and the only thing I don't have working quite yet is webcam support. But it is coming!
Pine64 Octoprint setup
1. Download Base Debian Image
2. cd /usr/local/sbin/
3. sudo ./resize_rootfs.sh
4. sudo apt-get update
5. sudo apt-get upgrade
6. sudo reboot now
****WIFI SETUP****
****use ifconfig to find ip first, then ssh into ethernet ip***
1. sudo nano /etc/network/interfaces
2. add the following:
***comment out
#auto eth0
#iface eth0 inet dhcp
****will get stuck at boot without this when not connected to ethernet
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "YOUR-SSID-HERE"
wpa-psk "YOUR-PASSWORD-HERE"
3. sudo ifup wlan0
4. sudo ifconfig wlan0
5. ping router-ip-here
6. ping google.com
7. sudo service networking restart
8. sudo reboot now
****Octoprint Setup Without Webcam****
1. cd ~
2. sudo apt-get install python-pip python-dev python-setuptools python-virtualenv git libyaml-dev build-essential
3. git clone https://github.com/foosel/OctoPrint.git
4. cd OctoPrint
5. virtualenv venv
6. ./venv/bin/pip install pip --upgrade
7. ./venv/bin/python setup.py install
8. mkdir ~/.octoprint
9. sudo usermod -a -G tty debian
10. sudo usermod -a -G dialout debian
***To Test Octoprint is working
11. ~/OctoPrint/venv/bin/octoprint
***This section allows for starting Octoprint when at boot
12. sudo nano ~/OctoPrint/scripts/octoprint.init
***edit following to:
DAEMON=/home/debian/OctoPrint/venv/bin/octoprint
13. sudo nano ~/Octoprint/scripts/octoprint.default
**edit following to:
OCTOPRINT_USER=debian
DAEMON=/home/debian/OctoPrint/venv/bin/octoprint
14. sudo cp ~/OctoPrint/scripts/octoprint.init /etc/init.d/octoprint
15. sudo chmod +x /etc/init.d/octoprint
16. sudo cp ~/OctoPrint/scripts/octoprint.default /etc/default/octoprint
17. sudo update-rc.d octoprint defaults
18. sudo service octoprint {stop|start|restart}
----You should now be able to boot into octoprint from <PINEIP:5000> from a web browser
***Make everything accessible on port 80
1. sudo apt-get install haproxy
2. sudo nano /etc/haproxy/haproxy.cfg
***add following to bottom
global
maxconn 4096
user haproxy
group haproxy
daemon
log 127.0.0.1 local0 debug
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
option http-server-close
option forwardfor
maxconn 2000
timeout connect 5s
timeout client 15min
timeout server 15min
frontend public
bind *:80
use_backend webcam if { path_beg /webcam/ }
default_backend octoprint
backend octoprint
reqrep ^([^\ :]*)\ /(.*) \1\ /\2
option forwardfor
server octoprint1 127.0.0.1:5000
backend webcam
reqrep ^([^\ :]*)\ /webcam/(.*) \1\ /\2
server webcam1 127.0.0.1:8080
3. sudo nano /etc/default/haproxy
***add following to bottom
ENABLE=1
4. sudo nano ~/.octoprint/config.yaml
***add following to bottom
server:
host: 127.0.0.1
***This is will now allow you log in to OctoPrint from <PINE64IP>.
TO change that from <PINE64IP> to pine64.local
1.sudo apt-get update && sudo apt-get install avahi-daemon
2. sudo reboot
Note: If using Windows PC to log in to pine64.local install Bonjour
Pine64 Octoprint setup
1. Download Base Debian Image
2. cd /usr/local/sbin/
3. sudo ./resize_rootfs.sh
4. sudo apt-get update
5. sudo apt-get upgrade
6. sudo reboot now
****WIFI SETUP****
****use ifconfig to find ip first, then ssh into ethernet ip***
1. sudo nano /etc/network/interfaces
2. add the following:
***comment out
#auto eth0
#iface eth0 inet dhcp
****will get stuck at boot without this when not connected to ethernet
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "YOUR-SSID-HERE"
wpa-psk "YOUR-PASSWORD-HERE"
3. sudo ifup wlan0
4. sudo ifconfig wlan0
5. ping router-ip-here
6. ping google.com
7. sudo service networking restart
8. sudo reboot now
****Octoprint Setup Without Webcam****
1. cd ~
2. sudo apt-get install python-pip python-dev python-setuptools python-virtualenv git libyaml-dev build-essential
3. git clone https://github.com/foosel/OctoPrint.git
4. cd OctoPrint
5. virtualenv venv
6. ./venv/bin/pip install pip --upgrade
7. ./venv/bin/python setup.py install
8. mkdir ~/.octoprint
9. sudo usermod -a -G tty debian
10. sudo usermod -a -G dialout debian
***To Test Octoprint is working
11. ~/OctoPrint/venv/bin/octoprint
***This section allows for starting Octoprint when at boot
12. sudo nano ~/OctoPrint/scripts/octoprint.init
***edit following to:
DAEMON=/home/debian/OctoPrint/venv/bin/octoprint
13. sudo nano ~/Octoprint/scripts/octoprint.default
**edit following to:
OCTOPRINT_USER=debian
DAEMON=/home/debian/OctoPrint/venv/bin/octoprint
14. sudo cp ~/OctoPrint/scripts/octoprint.init /etc/init.d/octoprint
15. sudo chmod +x /etc/init.d/octoprint
16. sudo cp ~/OctoPrint/scripts/octoprint.default /etc/default/octoprint
17. sudo update-rc.d octoprint defaults
18. sudo service octoprint {stop|start|restart}
----You should now be able to boot into octoprint from <PINEIP:5000> from a web browser
***Make everything accessible on port 80
1. sudo apt-get install haproxy
2. sudo nano /etc/haproxy/haproxy.cfg
***add following to bottom
global
maxconn 4096
user haproxy
group haproxy
daemon
log 127.0.0.1 local0 debug
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
option http-server-close
option forwardfor
maxconn 2000
timeout connect 5s
timeout client 15min
timeout server 15min
frontend public
bind *:80
use_backend webcam if { path_beg /webcam/ }
default_backend octoprint
backend octoprint
reqrep ^([^\ :]*)\ /(.*) \1\ /\2
option forwardfor
server octoprint1 127.0.0.1:5000
backend webcam
reqrep ^([^\ :]*)\ /webcam/(.*) \1\ /\2
server webcam1 127.0.0.1:8080
3. sudo nano /etc/default/haproxy
***add following to bottom
ENABLE=1
4. sudo nano ~/.octoprint/config.yaml
***add following to bottom
server:
host: 127.0.0.1
***This is will now allow you log in to OctoPrint from <PINE64IP>.
TO change that from <PINE64IP> to pine64.local
1.sudo apt-get update && sudo apt-get install avahi-daemon
2. sudo reboot
Note: If using Windows PC to log in to pine64.local install Bonjour