> For the complete documentation index, see [llms.txt](https://shedaniel.gitbook.io/cloth-config/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shedaniel.gitbook.io/cloth-config/using-cloth-config/saving-the-config.md).

# Saving the Config

You can define the code that runs when the user clicks **"Save"** using the following method.

```java
[...]
builder.setSavingRunnable(() -> {
    // Serialise the config into the config file. This will be called last after all variables are updated.
});
```
