{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":"
Important
This documentation is for KIAUH version 6 and still work in progress!
KIAUH - Klipper Installation And Update Helper
A handy installation script that makes installing Klipper (and more) a breeze!
"},{"location":"#features","title":"Features","text":"This document covers possible important changes to KIAUH.
"},{"location":"development/changelog/#2024-08-31-v600-alpha1","title":"2024-08-31 (v6.0.0-alpha.1)","text":"Long time no see, but here we are again! A lot has happened in the background, but now it is time to take it out into the wild.
"},{"location":"development/changelog/#kiauh-has-now-reached-version-6-well-at-least-in-an-alpha-state","title":"KIAUH has now reached version 6! Well, at least in an alpha state...","text":"The project has seen a complete rewrite of the script from scratch in Python. It requires Python 3.8 or newer to run. Because this update is still in an alpha state, bugs may or will occur. During startup, you will be asked if you want to start the new version 6 or the old version 5. As long as version 6 is in a pre-release state, version 5 will still be available. If there are any critical issues with the new version that were overlooked, you can always switch back to the old version.
In case you selected not to get asked about which version to start (option 3 or 4 in the startup dialog) and you want to revert that decision, you will find a line called version_to_launch= within the .kiauh.ini file in your home directory. Just delete that line, save the file and restart KIAUH. KIAUH will then ask you again which version you want to start.
Here is a list of the most important changes to KIAUH in regard to version 6: - The majority of features available in KIAUH v5 are still available; they just got migrated from Bash to Python. - It is now possible to add new/remove instances to/from existing multi-instance installations of Klipper and Moonraker - KIAUH now has an Extension-System. This allows contributors to add new installers to KIAUH without having to modify the main script. - You will now find some of the features that were previously available in the Installer-Menu in the Extensions-Menu. - The current extensions are: - G-Code Shell Command (previously found in the Advanced-Menu) - Mainsail Theme Installer (previously found in the Advanced-Menu) - Klipper-Backup (new in v6!) - Moonraker Telegram Bot (previously found in the Installer-Menu) - PrettyGCode for Klipper (previously found in the Installer-Menu) - Obico for Klipper (previously found in the Installer-Menu) - The following additional extensions are planned, but not yet available: - Spoolman (available in v5 in the Installer-Menu) - OctoApp (available in v5 in the Installer-Menu) - KIAUH has its own config file now - The file has some default values for the currently supported options - There might be more options in the future - It is located in KIAUH's root directory and is called default.kiauh.cfg - DO NOT EDIT the default file directly, instead make a copy of it and call it kiauh.cfg - Settings changed via the Advanced-Menu will be written to the kiauh.cfg - Support for OctoPrint was removed
Feel free to give version 6 a try and report any bugs or issues you encounter! Every feedback is appreciated.
"},{"location":"development/changelog/#2023-06-17","title":"2023-06-17","text":"KIAUH has now added support for installing Mobileraker's companion! Mobileraker is a free and Open Source Android and iOS App for Klipper, utilizing the Moonraker API, allowing you to control your printer. Thank you to Clon1998 for adding this feature!
"},{"location":"development/changelog/#2023-02-03","title":"2023-02-03","text":"The installer for MJPG-Streamer got replaced by crowsnest. It is an improved webcam service, utilizing ustreamer. Please have a look here for additional info about crowsnest and how to configure it: https://github.com/mainsail-crew/crowsnest \\ It's unsure if the previous MJPG-Streamer installer will be updated and make its way back into KIAUH. A big thanks to KwadFan for writing the crowsnest implementation.
"},{"location":"development/changelog/#2022-10-31","title":"2022-10-31","text":"Some functions got updated, though not all of them.
The following functions are still currently unavailable: - Installation of: MJPG-Streamer - All backup functions and the Log-Upload
"},{"location":"development/changelog/#2022-10-20","title":"2022-10-20","text":"KIAUH has now reached major version 5 !
Recently Moonraker introduced some changes which makes it necessary to change the folder structure of printer setups. If you are interested in the details, check out this PR: https://github.com/Arksine/moonraker/pull/491 \\ Although Moonraker has some mechanics available to migrate existing setups to the new file structure with the use of symlinks, fresh and clean installs should be considered.
The version jump of KIAUH to v5 is a breaking change due to those major changes! That means v4 and v5 are not compatible with each other! This is also the reason why you will currently be greeted by a yellow notification in the main menu of KIAUH leading to this changelog. I decided to disable a few functions of the script and focus on releasing the required changes to the core components of this script. I will work on updating the other parts of the script piece by piece during the next days/weeks. So I am already sorry in advance if one of your desired components you wanted to install or use temporarily cannot be installed or used right now.
The following functions are currently unavailable: - Installation of: KlipperScreen, Obico, Octoprint, MJPG-Streamer, Telegram Bot and PrettyGCode - All backup functions and the Log-Upload
So what is working?\\ Installation of Klipper, Moonraker, Mainsail and Fluidd. Both, single and multi-instance setups work!\\ As already said, the rest will follow in the near future. Updating and removal of already installed components should continue to work.
What was removed?\\ The option to change Klippers configuration directory got removed. From now on it will not be possible anymore to change the configuration directory from within KIAUH and the new filestructure is enforced.
What if I don't have an existing Klipper/Moonraker install right now?\\ Nothing important to think about, install Klipper and Moonraker. KIAUH will install both of them with the new filestructure.
What if I have an existing Klipper/Moonraker install?\\ First of all: Backups! Please copy all of your config files and the Moonraker database (it is a hidden folder, usually ~/.moonraker_database) to a safe location. After that, uninstall Klipper and Moonraker with KIAUH. You can then proceed and re-install both of them with KIAUH again. It is important that you are on KIAUH v5 for that! Once everything is installed again, you need to manually copy your configuration files from the old ~/klipper_config folder to the new ~/printer_data/config folder. Previous, by Moonraker created symlinks to folder of the old filestructure will not work anymore, you need to move the files to their new location now! Do the same with the two files inside of ~/.moonraker_database. Move/copy them into ~/printer_data/database. If ~/printer_data/database is already populated with a data.mdb and lock.mdb delete them or simply overwrite them. Nothing should be lost as those should be empty database files. Anyway, you made backups, right? You can now proceed and restart Moonraker. Either from within Mainsail or Fluidd, or use SSH and execute sudo systemctl restart moonraker. If everything went smooth, you should be good to go again. If you see some Moonraker warnings about deprecated options in the moonraker.conf, go ahead and resolve them. I will not cover them in detail here. A good source is the Moonraker documentation: https://moonraker.readthedocs.io/en/latest/configuration/
What if I have an existing Klipper/Moonraker multi-instance install?\\ Pretty much the same steps that are required for single instance installs apply to multi-instance setups. So please go ahead and read the previous paragraph if you didn't already. Make backups of everything first. Then remove and install the desired amount of Klipper and Moonraker instances again. Now you need to move all config and database files to their new locations.\\ Example with an instance called printer_1:\\ The config files go from ~/klipper_config/printer_1 to ~/printer_1_data/config. The database files go from ~/.moonraker_database_1 to ~/printer_1_data/database. Now restart all Moonraker services. You can restart all of them at once if you launch KIAUH, and in the main menu type restart moonraker and hit Enter.
I hope I have covered the most important things. In case you need further support, the official Klipper Discord is a good place to ask for help.
"},{"location":"development/changelog/#2022-08-15","title":"2022-08-15","text":"Support for \"Obico for Klipper\" was added! Huge thanks to kennethjiang for helping me with the implementation!
"},{"location":"development/changelog/#2022-05-29","title":"2022-05-29","text":"KIAUH has now reached major version 4 ! * feat: Klipper can be installed under Python3 (still considered as experimental) * feat: Klipper can be installed from custom repositories / inofficial forks * feat: Custom instance name for multi instance installations of Klipper * Any other multi instance will share the same name given to the corresponding Klipper instance * E.g. klipper-voron2 -> moonraker-voron2 -> moonraker-telegram-bot-voron2 * feat: Option to allow installation of / updating to unstable Mainsail and Fluidd versions * by default only stable versions get installed/updated * feat: Multi-Instance OctoPrint installations now each have their own virtual python environment * allows independent installation of plugins for each instance * feat: Implementing the use of shellcheck during development * feat: Implementing a simple logging mechanic * feat: Log-upload function now also allows uploading other logfiles (kiauh.log, webcamd.log etc.) * feat: added several new help dialogs which try to explain various functions * fix: During Klipper installation, checks for group membership of tty and dialout are made * refactor: rework of the settings menu for better control the new KIAUH features * refactor: Support for DWC and DWC-for-Klipper has been removed * refactor: The backup before update settings were moved to the KIAUH settings menu * refactor: Switch branch function has been removed (was replaced by the custom Klipper repo feature) * refactor: The update manager sections for Mainsail, Fluidd and KlipperScreen were removed from the moonraker.conf template * They will now be individually added during installation of the corresponding interface * refactor: The rollback function was reworked and now also allows rollbacks of Moonraker * It now takes numerical inputs and reverts the corresponding repository by the given amount instead * KIAUH does not save previous states to its config anymore like it did with the previous approach
/dev/ttyAMA0. You now have to select a connection methop prior flashing which is either USB or UART.The NGINX configuration files got updated to be in sync with MainsailOS and FluiddPi. Issues with the NGINX service not starting up due to wrong configuration should be resolved now. To get the updated configuration files, please remove Moonraker and Mainsail / Fluidd with KIAUH first and then re-install it. An automated file check for those configuration files might follow in the future which then automates updating those files if there were important changes.
The default moonraker.conf was updated to reflect the recent changes to the update manager section. The update channel is set to dev.
log_path to existing moonraker.conf files when updating Moonraker and the entry is missing. Before that, it was necessary that the user provided that path manually to make Fluidd display the logfiles in its interface. This issue should be resolved now.log_path which clients can make use of to show log files located in that folder to their users. More info here: https://github.com/Arksine/moonraker/commit/829b3a4ee80579af35dd64a37ccc092a1f67682a \\ Client developers agreed upon using ~/klipper_logs as the new default log path.\\ That means, from now on, Klipper and Moonraker services installed with KIAUH will place their logfiles in that mentioned folder./tmp/<service>.log and will update them next time the user updates Klipper and/or Moonraker with the KIAUH update function.(Main Menu -> 4 -> Enter -> 10 -> Enter) in a short summary:~/klipper_logs/root/bin/webcamd to /usr/local/bin/webcamdupstreams.conf gets updated to be able to configure up to 4 webcamsmainsail.txt / fluiddpi.txt gets moved from /boot to ~/klipper_config and renamed to webcam.txt~/klipper_config/etc/logrotate.dSAVE_GCODE_STATE NAME=PAUSE_state and RESTORE_GCODE_STATE NAME=PAUSE_stateThis is a big one... KIAUH v3.0 is out.\\ With this update you can now install multiple instances of Klipper, Moonraker, Duet Web Control or Octoprint on the same Pi. This was quite a big rework of the whole script. So bugs can appear but with the help of some testers, i think there shouldn't be any critical ones anymore. In this regards thanks to @lixxbox and @zellneralex for testing.
Important changes to how installations are set up now: All components get installed as systemd services. Installation via init.d was dropped completely! This shouldn't affect you at all, since the common linux distributions like RaspberryPi OS or custom distributions like MainsailOS, FluiddPi or OctoPi support both ways of installing services. I just wanted to mention it here.
Now with KIAUH v3.0 and multi-instance installation capabilities, there are some things to point out. You will now need to tell KIAUH where your printers configurations are located when installing Klipper for the first time. Even though it is not recommended, you can change this location with the help of KIAUH and rewrite Klipper and Moonraker to use the new location.
When setting up a multi-instance system, the folder structure will only change slightly. The goal was to keep it as compatible as possible with the custom distributions like mainsailOS and FluiddPi. This should help converting a single-instance setup of mainsailOS/FluiddPi to a multi-instance setup in no time, but keeping single-instance backwards compatibility if needed at a later point in time.
The folder structure is as follows when setting up multi-instances:\\ Each printer instance will get its own folder within your configuration location. The decision to this specific structure was made to make it as painless and easy as possible to convert to a multi-instance setup. Here is an example:
/home/<username>\n \u2514\u2500\u2500 klipper_config\n \u251c\u2500\u2500 printer_1\n \u2502 \u251c\u2500\u2500 printer.cfg\n \u2502 \u2514\u2500\u2500 moonraker.conf\n \u251c\u2500\u2500 printer_2\n \u2502 \u251c\u2500\u2500 printer.cfg\n \u2502 \u2514\u2500\u2500 moonraker.conf\n \u2514\u2500\u2500 printer_n\n \u251c\u2500\u2500 printer.cfg\n \u2514\u2500\u2500 moonraker.conf\n Also when setting up multi-instances of each service, the name of each service slightly changes. Each service gets its corresponding instance added to the service filename.
This only applies to multi-instances! Single instance installations with KIAUH will keep their original names!
Corresponding to the filetree example from above that would mean:
Klipper services:\n --> klipper-1.service\n --> klipper-2.service\n --> klipper-n.service\n\nMoonraker services:\n --> moonraker-1.service\n --> moonraker-2.service\n --> moonraker-n.service\n * The same service file rules from above apply to OctoPrint even though only Klipper and Moonraker are shown in this example. You can start, stop and restart all Klipper, Moonraker and OctoPrint instances from the KIAUH main menu. For doing this, just type \"stop klipper\", \"start moonraker\", \"restart octoprint\" and so on.
KIAUH v3.0 relocated its ini-file. It is now a hidden file in the users home-directory calles .kiauh.ini. This has the benefit of keeping all values in that file between possible re-installations of KIAUH. Otherwise that file would be lost.
The option of adding more trusted clients to the moonraker.conf file was dropped. Since you can edit this file right inside of Mainsail or Fluidd, only some basic entries are made which get you running.
I bet i have missed mentioning other stuff as well because it took me quite some time to re-write many functions. So i just hope you like the new version \ud83d\ude04
The user can now choose to install Klipper as a systemd service.
The Shell Command extension and shell_command.py got renamed to G-Code Shell Command extension and gcode_shell_command.py. In case the pending PR will be merged in the future, this was an early attempt to dodge possible incompatibilities. The G-Code Shell Command docs has been updated accordingly.
The way how KIAUH interacts and writes to the users printer.cfg got changed. Usually KIAUH wrote everything directly into the printer.cfg. The way it will work from now on is, that a new file called kiauh.cfg will be created if there is something that needs to be written to the printer.cfg and everything gets written to kiauh.cfg instead. The only thing which then gets written to the users printer.cfg is [include kiauh.cfg]. This line will be located at the very top of the existing printer.cfg with a little comment as a note. The user can then decide to either keep the kiauh.cfg or take its content, places it into the printer.cfg directly and remove the [include kiauh.cfg].
The mainsail_macros.cfg got renamed to webui_macros.cfg. Since Mainsail and Fluidd both use the same kind of pause, cancel and resume macros, a more generic name was chosen for the file containing the example macros one can choose to install when installing those webinterfaces.
Support for changing the Klipper branch to the moonraker-dev branch from @Arksine has been dropped. Support for Moonraker has been merged into Klipper mainline a long time ago.
A new function is available from the main menu. You can now upload your log files to http://paste.c-net.org/ to share them for debugging purposes.
Fluidd, a new Klipper interface got added to the list of available installers. At the same time some installation routines have changed or have seen some rework. Changes were made to the installation of NGINX configurations. A method was introduced to change the listen port of a webinterface configuration if there is already another webinterface listening on the default port (80).
At the moment, the Moonraker installer no longer asks you whether you want to install a web interface too. For now you therefore have to install them with their respective installers. Please report any bugs or issues you encounter.
This is a brief explanation of how to use the shell command extension for Klipper, which you can install with KIAUH.
After installing the extension you can execute linux commands or even scripts from within Klipper with custom commands defined in your printer.cfg.
"},{"location":"extensions/gcode-shell-command/#how-to-configure-a-shell-command","title":"How to configure a shell command:","text":"# Runs a linux command or script from within klipper. Note that sudo commands\n# that require password authentication are disallowed. All executable scripts\n# should include a shebang.\n# [gcode_shell_command my_shell_cmd]\n#command:\n# The linux shell command/script to be executed. This parameter must be\n# provided\n#timeout: 2.\n# The timeout in seconds until the command is forcably terminated. Default\n# is 2 seconds.\n#verbose: True\n# If enabled, the command's output will be forwarded to the terminal. Its\n# recommended to set this to false for commands that my run in quick\n# succession. Default is True.\n Once you have set up a shell command with the given parameters from above in your printer.cfg you can run the command as follows: RUN_SHELL_COMMAND CMD=name
Example:
[gcode_shell_command hello_world]\ncommand: echo hello world\ntimeout: 2.\nverbose: True\n Execute with: RUN_SHELL_COMMAND CMD=hello_world
As of commit f231fa9 it is also possible to pass optional parameters to a gcode_shell_command. The following short example shows storing the extruder temperature into a variable, passing that value with a parameter to a gcode_shell_command, which then, once the gcode_macro runs and the gcode_shell_command gets called, executes the script.sh. The script then echoes a message to the console (if verbose: True) and writes the value of the parameter into a textfile called test.txt located in the home directory.
Content of the gcode_shell_command and the gcode_macro:
[gcode_shell_command print_to_file]\ncommand: sh /home/pi/klipper_config/script.sh\ntimeout: 30.\nverbose: True\n\n[gcode_macro GET_TEMP]\ngcode:\n {% set temp = printer.extruder.temperature %}\n { action_respond_info(\"%s\" % (temp)) }\n RUN_SHELL_COMMAND CMD=print_to_file PARAMS={temp}\n Content of script.sh:
#!/bin/sh\n\necho \"temp is: $1\"\necho \"$1\" >> \"${HOME}/test.txt\"\n"},{"location":"extensions/gcode-shell-command/#warning","title":"Warning","text":"This extension may have a high potential for abuse if not used carefully! Also, depending on the command you execute, high system loads may occur and can cause system instabilities. Use this extension at your own risk and only if you know what you are doing!
"},{"location":"setup/installation/","title":"Installing KIAUH","text":"In the following sections, you will be guided through the installation process step-by-step.
To use KIAUH, it is enough to download the script and run it on your Raspberry Pi or other compatible device. If you need to know how to set up a Raspberry Pi or if you are unsure whether your current setup is sufficient, please refer to the Raspberry Pi Installation Guide and follow the steps therein. Afterwards, you can return to this guide to install KIAUH.
"},{"location":"setup/installation/#prerequisites","title":"Prerequisites","text":"Before you can download and run KIAUH, you need to ensure that git is installed on your system. Open a terminal and run the following command:
sudo apt-get update && sudo apt-get install git -y\n"},{"location":"setup/installation/#downloading-kiauh","title":"Downloading KIAUH","text":"After git was successfully installed, you can download KIAUH by cloning the repository from GitHub. It is recommended to clone it into your home directory. Run the following command in your terminal:
cd ~ && git clone https://github.com/dw-0/kiauh.git\n"},{"location":"setup/installation/#running-kiauh","title":"Running KIAUH","text":"Once the repository is cloned, you can start KIAUH. Make sure you are in your home directory and execute the script by running the following command:
./kiauh/kiauh.sh\n After executing the command, you will be presented with the KIAUH menu, which allows you to install and manage various 3D printing software. For more information on how to use KIAUH, please refer to the Usage Guide.
"},{"location":"setup/raspberry-pi-setup/","title":"Raspberry Pi Setup","text":"This guide will help you set up a Raspberry Pi for running Klipper and other, Klipper related 3D printing software. In case you are using a different single-board computer (SBC), please refer to the manufacturer's instructions for installing a compatible version of Linux on your device.
It is assumed that you have at least a Raspberry Pi 3 or newer, along with a microSD card (at least 8GB, preferably 16GB or more) and a power supply. Additionally, you will need a computer with an SD card reader to prepare the microSD card.
KIAUH requires a Linux operating system that has already been flashed to your Raspberry Pi's (or other SBC's) microSD card. As a result, you must ensure that you already have a functional Linux system on hand before you can proceed with installing KIAUH. Raspberry Pi OS Lite (either 32bit or 64bit) is a recommended Linux image if you are using a Raspberry Pi.
To flash Raspberry Pi OS Lite to your microSD card using the official Raspberry Pi Imager, follow the steps below. If you encounter any issues or need further assistance, please refer to the official Raspberry Pi documentation.
Choose OS and select Raspberry Pi OS (other). Raspberry Pi OS Lite (32bit) (or 64bit if desired). Enable SSH and enter your Wi-Fi credentials.
Info
Wi-Fi is only necessary if you want to connect to your Raspberry Pi over a wireless network. If you plan to use a wired Ethernet connection, you can skip this step. SSH is required for remote access to your Raspberry Pi, so make sure to enable it.
Click Save to close the advanced options menu.
Click Write to start flashing the image to the microSD card.
Warning
All data on the microSD card will be overwritten!
Once the flashing process is complete, safely eject the microSD card from your computer.
pi and the default password is raspberry.If you successfully connected to your Raspberry Pi via SSH, you can proceed to install KIAUH by following the instructions in the Installation Guide.
"}]}