Stefan Dej 64b65454b8 update guide & package.json to V0.4.0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-27 21:38:49 +01:00

85 lines
2.6 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: default
title: Moonraker
parent: Setup Guide
nav_order: 4
permalink: /setup/moonraker
---
## Moonraker
Moonraker is a web server that exposes APIs which lets Mainsail interact with Klipper.
### Installation
Clone Moonraker into your HOME directory:
```bash
cd ~
git clone https://github.com/Arksine/moonraker.git
```
Run Moonrakers install script:
```bash
cd ~/moonraker/scripts
./install-moonraker.sh -c /home/pi/klipper_config/moonraker.conf
```
Once the script is finished, both Moonraker and Klipper should be started.
In `/tmp/klippy.log` the following entry should appear: `Moonraker: server connection detected`
### Configuration
> ⚠️ **Please pay attention to the following steps!**
Misconfigured trusted_clients are a very common source of failure.
For Moonraker you'll need to create a separate config file.
`nano ~/klipper_config/moonraker.conf`
Insert the following part and modify `trusted_clients` according to arksines description below.
Also consider further IP ranges, e.g. when connecting via VPN. To determine your local ip `ip a` and `ifconfig -a` are common ways to do so on Linux and `ipconfig` on Windows.
> **This is a very basic config**
For more options and detailed explanations you should follow [arksines instructions](https://github.com/Arksine/moonraker/blob/master/docs/installation.md).
```
[server]
host: 0.0.0.0
config_path: ~/klipper_config
[authorization]
enabled: true
trusted_clients:
192.168.1.0/24
[update_manager]
client_repo: meteyou/mainsail
client_path: ~/mainsail
```
> 🔥 **trusted_clients - read carefully** 🔥
A list of newline separated ip addresses and/or ip ranges that are
trusted. Trusted clients are given full access to the API. Both IPv4
and IPv6 addresses and ranges are supported. Ranges must be expressed
in CIDR notation (see http://ip.sb/cidr for more info).
For example, an entry of 192.168.1.0/24 will authorize IPs in the range of 192.168.1.1 -
192.168.1.254. Note that when specifying IPv4 ranges the last segment
of the ip address must be 0. The default is no clients or ranges are
trusted.
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
Restart Moonraker
```bash
sudo service moonraker restart
```
Open the following url with your printers IP in your browser
```
http://<printer-ip>:7125/printer/info
```
If everything has been set up successfully, a message like this should appear:
```
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
```
---
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }