Your own overrides¶
The easy way: your own config file¶
Instead of editing the shipped files, put your changes in a file of your own. Klipper reads a section that appears twice as one, and the value it reads last wins, so a file included at the end overrides the shipped values without changing them. Updates then never conflict with your settings.
- Create
my-printer.cfgin the config folder. Any name works that isn't one of OpenCreator's files. -
In
printer.cfg, add an include just above theSAVE_CONFIGblock (the#*# <---------------------- SAVE_CONFIG ---------------------->line). If you have plugins installed,oc-pluginhas already put[include plugins/*.cfg]there; add yours below it: -
Put the options you want to change in
my-printer.cfg, under their section name, and restart Klipper.
Only the options you list change; everything else keeps the shipped value. For example:
# my-printer.cfg
# Slower final approach into the docks
[creator5_toolchanger]
dock_approach_speed: 80
# Soak the bed longer, and leave it a little higher at print end
[creator5_toolchanger]
bed_soak_minutes: 5
lower_bed_z: 240
# A coarser, faster bed mesh (10 x 10 shipped)
[bed_mesh]
probe_count: 7, 7
# Your own macro
[gcode_macro PARK_FRONT]
description: Park the toolhead at the front
gcode:
G90
G1 X130 Y10 F12000
A macro you define again here replaces the shipped one, since its gcode is just
another option. To see which value Klipper actually used, open
http://<printer-ip>:7125/printer/objects/query?configfile=settings in a
browser, or check the config dump near the top of printer.log after a restart.
Leave calibration to SAVE_CONFIG
Don't put values that calibration saves, like input shaper, PID, the bed
mesh or the probe z_offset, in your own file. SAVE_CONFIG refuses to save
an option whose value comes from an included file. Run the calibration and
let SAVE_CONFIG store the result at the bottom of printer.cfg.
Note
You can't remove a section from another file this way, only change its options. To turn a section off, comment it out where it is. Updates keep that edit like any other.
Editing the shipped files¶
Editing a template directly is fine too. Updates keep your change unless they change the same lines. It's the better choice for small fixes in place, like commenting out a line, where an override file can't help.
If an update changes the same lines you edited, your live file stays untouched and the merged version is written beside it. Follow Resolving a conflict, or move the setting to your own file to avoid future conflicts. See What's in each file for the shipped templates and generated files.