manu7irl / klipper-DWC2-installer

to streamline the install or upgrade of KLIPPER & DWC2 front-end for it. With these 2 together no need to use octoprint. I run mine on orangepi zero with H2+ CPU 512MB and it works nicely.
GNU General Public License v3.0
55 stars 13 forks source link

klipper-DWC2-installer

This installer script is made to streamline the install or upgrade of KLIPPER and Duet Web Control front-end for it. with these 2 together no need to use octoprint, so your hardware will not be bloated nor overloaded. I run mine on orangepi zero with H2+ CPU 512MB and it works nicely. Now the script is based on a new multi-session method, to make an ultimate "Klipper server" to connect multiple printers or only one if needed. You can by running it get klipper installed with DWC2 and octoprint, in less than 5 minutes!

Do not run this script as root, as it will prevent you to do so.

To run it:

cd ~ 
sudo apt install git -y 
git clone https://github.com/manu7irl/klipper-DWC2-installer
cd klipper-DWC2-installer
./installer.sh

You will be presented to an interactive menu to install or update your system. This is pretty staright-forward but if you need help ping me. If you install DWC for the first time, the script will add the default sections, to the end of your printer.cfg file, in order to the tornado web server and the file manager can use the virtual_sdcard function: tip: the virtual_sdcard folder path, can point to your ~/.octoprint/sdcard folder. So an uploaded gcode file through the octoprint ui will also appears on DWC and vice versa.

     "=========================="
     "    INSTALL OR UPDATE     "
     "    KLIPPER & DWC2        "
     "    OCTOPRINT             "
     "    BY MANU7IRL           "
     "=========================="
     "1. Install KLIPPER"
     "2. Update KLIPPER"
     "3. Flash your MCU"
     "4. Install DWC2"
     "5. Update DWC2"
     "6. Install OCTOPRINT"
     "7. Uninstall KLIPPER & DWC"
     "8. Uninstall OCTOPRINT"
     "9. Exit"
[virtual_sdcard]
path: ~/PrinterFarm/KlipperFarm/printer-0/sdcard #use the folder of your choice

[web_dwc2]
# optional - defaulting to Klipper
printer_name: My_own_klipper_printer
# optional - defaulting to 127.0.0.1
listen_adress: 0.0.0.0
# needed - use above 1024 as nonroot user
listen_port: 4750
#   optional defaulting to dwc2/web. Its a folder relative to your virtual sdcard.
web_path: dwc2/web
# optional - defaulting to /tmp/printer, needed in order to get dwc multi-session
serial_path: /tmp/printer-$printer-num

your printer.cfg file should be placed under ~/PrinterFarm/KlipperFarm/printer-{0..9} folder and renamed after the corresponding printer-{0..9} folder. ex: if the folder is printer-0, the printer.cfg file should be printer-0.cfg

##NEW## You will be presented to a set of question to decide to run it on which user and how many printers to be added. Todo list: