ServerConfigCleaner

ServerConfigCleaner

Avoids syncing sensitive values in configs to the client

by
1.3K Downloads
forgeneoforgeutility
Rent Server with this Mod

About this Mod

NeoForge and MinecraftForge sync the entire content of all "server configs" to the client. Since this is not clear from
the naming, some mods ended up putting secret values in these configs, e.g. Discord bot tokens. If you run a server
using a mod with this issue, this allows any user that can join your server to access these values. This mod avoids this
by removing sensitive values before the config is sent to the client.

Versions

Since this mod covers a wide range of Minecraft versions and two modloaders, the versioning scheme is somewhat
complicated. See the table below for the correct version for your loader and Minecraft version.

Loader Minecraft version Mod version suffix
MinecraftForge 1.13.2 - 1.16.5 -1.13.2
MinecraftForge 1.17.x - 1.20.1 -1.17.1
NeoForge 1.20.1 -1.17.1
MinecraftForge 1.20.2+ -1.20.2-mcf
NeoForge 1.20.2 - 1.20.5 -1.20.2-neo
NeoForge 1.21.0+ -1.21.0-neo

How it works

This mod works in two stages: First, it detects config options that potentially contain sensitive information during
launch. Since this is done using a very rough heuristic, the options that are found have to be manually classified in
the config/serverconfigcleaner-common.toml config file:

  1. Most of them will be false positives, harmless options that happen to match the heuristic. For example, the option
    logistics.seatHostileMobs in Create would be marked as a
    potentially sensitive option since it contains the string Host. These config values have to be added to the
    falsePositives list.
  2. Some of them may be options that contain actual sensitive values. These options have to be added to the doNotSync
    list in the same format, e.g. doNotSync = ["mymod:discord.token"].

To continue the launch, all found values have to be classified in the ServerConfigCleaner config. The mod ships with a
list of known false positives and known "problematic" options (the latter not in plaintext). Therefore, you should
usually not have to do anything at this stage. If you have to add values manually, see below on getting them added to
the default lists.

In the second stage, the mod intercepts the config sync on the server. If a value was marked as sensitive in the config
after the first stage, the value will be replaced by the default value before being synced to the client. Since the
default value for sensitive options is generally a meaningless constant value provided by the developer (e.g. INSERT BOT TOKEN HERE), this can be sent to the client without revealing any secret information.

Reporting missed values

If you run into false positives that are not in the default list in the config, please create an issue listing them.

If you find any server config options that contain sensitive information and are not part of the default set of
sensitive options, please do not create an issue with these options. Instead, please get in touch with either
malte0811 (Discord: malte0811; e-mail available on GitHub profile) or ThatGravyBoat (Discord: thatgravyboat).

Available Versions

1.1-1.21.0-neorelease
MC 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4neoforge
December 23, 2024
1.1-1.20.2-neorelease
MC 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6neoforge
December 23, 2024
1.1-1.20.2-mcfrelease
MC 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4forge
December 23, 2024
1.1-1.17.1release
MC 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1forge, neoforge
December 23, 2024
1.1-1.13.2release
MC 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5forge
December 23, 2024

How to Install ServerConfigCleaner on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set forge Loader

In the panel under "Egg", select the forge loader and matching Minecraft version (1.21.4).

3

Install Mod

Open the mod browser in the dashboard and search for "ServerConfigCleaner". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

forgeneoforge

Minecraft Versions

1.21.4, 1.21.3, 1.21.2 (+33 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

ServerConfigCleaner server crashes on startup – what to do?

Most common cause: wrong forge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.4). You can switch loaders with one click in the panel.

Is ServerConfigCleaner compatible with forge and neoforge?

ServerConfigCleaner officially supports forge, neoforge for Minecraft 1.21.4, 1.21.3, 1.21.2. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with ServerConfigCleaner – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if ServerConfigCleaner consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install ServerConfigCleaner with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Required

Supported Versions

1.21.41.21.31.21.21.21.11.211.20.61.20.51.20.41.20.31.20.2+26 more