2021-01-04 03:34:11 +01:00


2021-01-04 17:04:11 +01:00
2022-01-18 22:42:44 +01:00
- [klipper-web-control-docker ](#klipper-web-control-docker )
- [Features ](#features )
- [Getting started ](#getting-started )
- [Install the services ](#install-the-services )
- [If things are running fine now... ](#if-things-are-running-fine-now )
- [If things are not running... ](#if-things-are-not-running )
- [Features not implemented or not tested (yet) ](#features-not-implemented-or-not-tested-yet )
- [Credits ](#credits )
2021-01-04 17:04:11 +01:00
# klipper-web-control-docker
__Klipper with Moonraker shipped with Fluidd and/or Mainsail__
2021-01-10 23:56:42 +01:00
- get your printer to the next level!
2021-01-04 17:04:11 +01:00
- Docker Compose config and Dockerfiles provided!
- Build with Github actions and deployed to https://hub.docker.com/u/dimalo
- Docker multiarch builds with best practices
## Features
2021-04-27 21:51:00 -10:00
- Dockerhub images support x64, ARM64, ARM32v7 & ARM32v6
2021-01-04 17:04:11 +01:00
- Docker multistage builds for optimized image sizes
- fully integrated klipper image with moonraker enabled
- startup management with supervisord & dependent startup (klipper starts first, then only if klipper is running moonraker is started)
2022-09-25 14:38:08 +02:00
- Optionally use the klipper_z_calibration-extension
2021-01-04 17:04:11 +01:00
- collection of useful klipper macros [see client_macros.cfg ](./config/client_macros.cfg )
- Nozzle prime line with random Y starting point
Don't use the same starting point for priming to reduce bed wear!
- safe filament load / unload / change, which checks for sufficient (configurable) nozzle temperature
- best practice start gcode:
Please modify this to your needs! This macro works well on my cartesian and core xy machines and only homes Z as soon as the nozzle is hot, so leftover extrusions don't smash into the bed when they're cold.
Example for PrusaSlicer start gcode:
2021-01-10 23:56:42 +01:00
```
; Making sure PrusaSlicer doesn't inject heatup gcode...
M104 S0
M190 S0
; Run START_PRINT macro
START_PRINT T_BED=[first_layer_bed_temperature] T_EXTRUDER=[first_layer_temperature]
```
2021-01-04 17:04:11 +01:00
- several versions of pause/cancel/end, to either present the toolhead or the print (and get the toolhead out of the way) - ___check the defaults!_ __
- park toolhead with ```M125` `` (default X25 Y0)
- support delay with display output with ```COUNTDOWN` ``
___Please be careful to not run the macros without making sure they work with your printer!_ __
2021-01-10 23:56:42 +01:00
- collection of calibration macros (for example manual bed leveling) [see calibration_macros.cfg ](./config/calibration_macros.cfg )
2021-01-04 17:04:11 +01:00
- complete Klipper setup with web control client
- supports [Fluidd ](https://github.com/cadriel/fluidd )
- supports [Mainsail ](https://github.com/meteyou/mainsail )
- you can even run both in parallel!
2022-09-25 14:38:08 +02:00
- only your printer.cfg is required
2021-01-04 17:04:11 +01:00
- the services start without it, so you can supply your config through the web UI
- you can mount your config file to /home/klippy/.config/printer.cfg, and klipper will pick it up after a restart
## Getting started
___Prerequisites:___
- _Your klipper host machine runs Linux or MacOS (Windows was not tested yet)_
2024-11-03 08:45:57 -05:00
- (MacOS) Currently it is not possible to expose serial devices to a container in MacOS Docker. This is a known issue with Docker (https://github.com/docker/for-mac/issues/900)
2021-01-04 17:04:11 +01:00
- _You have docker and docker-compose installed on your machine_
- _You have flashed your printer with the appropriate .bin_
- _You have your printer connected to your machine and you know it's serial mount point (e.g. /dev/ttyACM0 or /dev/ttyUSB0)_
2021-04-27 21:51:00 -10:00
- _ARM32v6 (Raspberry Pi Zero and 1) requires [Docker 20 ](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script ). Fluidd is not yet supported_
2021-01-04 17:04:11 +01:00
### Install the services
1. clone this repository and open it or navigate to it in your terminal
1. modify docker-compose.yml to your needs
- set serial port of your printer
- mount printer.cfg if already prepared (else you will be able to set it up later as well...)
2021-01-10 23:56:42 +01:00
1. run ```docker-compose pull && docker-compose up` `` if you want to use the provided dockerhub images, else run ` ``docker-compose up` `` to first build them on your host
2021-01-04 17:04:11 +01:00
1. watch the services being set up
- make sure you have no port conflicts on 7125, 8010 and 8011
- make sure klipper and moonraker started
- leave the compose session running
1. test the frontends
- http://localhost:8010
- http://localhost:8011
1. configure your printer
- modify / upload printer.cfg, if not mounted already
- check if klipper is able to connect to the printer
- follow klippers documentation to test your printers functionality
### If things are running fine now...
Quit the compose session with ```Ctrl+C` ``and run ` ``docker-compose up -d` ``.
__Happy 3D Printing!__
### If things are not running...
__No serial connection:__
Check the permissions on the serial device in the klipper host.
```ls -lsa /dev/ttyACM0` ``
Supply the group permissions to the docker-compose config in docker-compose.yml build args for klipper.
Run ```docker-compose build` ``
After build run ```docker-compose up -d` `` and see if it works.
2022-01-18 22:42:44 +01:00
__Klipper is crashing:__
(from [#25 ](https://github.com/dimalo/klipper-web-control-docker/issues/25 ))
_Klipper crashes with log similar to:_
```log
klipper Fatal Python error: pyinit_main: can't initialize time
klipper | Python runtime state: core initialized
klipper | PermissionError: [Errno 1] Operation not permitted
```
check your libseccomp version and update if needed (see [https://docs.linuxserver.io/faq#libseccomp ](https://docs.linuxserver.io/faq#libseccomp ))
2021-01-04 17:04:11 +01:00
## Features not implemented or not tested (yet)
2021-01-23 21:55:02 +01:00
- compiling klipper.bin for your printer (will need compile tools which bloat the image so this will likely not be implemented)
- automatic updates for klipper/moonraker (partly working as repos are getting updated but no dependency installs happen - update the container with ```docker-compose pull` `` instead)
- automatic updates for the frontend (update the container with ```docker-compose pull` `` instead)
2021-01-04 17:04:11 +01:00
- CI pipeline to build images as upstream repos change
## Credits
- where I found some of the macros
2021-01-05 01:28:10 +01:00
- [https://github.com/fl0r1s/klipper_config ](https://github.com/fl0r1s/klipper_config )
2021-07-13 22:40:48 +02:00
- [Klipper ](https://github.com/KevinOConnor/klipper )
- [Moonraker ](https://github.com/Arksine/moonraker )
- [Fluidd ](https://github.com/cadriel/fluidd )
- [Mainsail ](https://github.com/meteyou/mainsail )
2022-09-25 14:38:08 +02:00
- [klipper_z_calibration ](https://github.com/protoloft/klipper_z_calibration )
2021-01-04 17:04:11 +01:00
- awesome global RepRap open source community!