How to edit config files without breaking them
A surprising number of server problems come down to a single misplaced character in a settings file. Config files look like plain text, and they are, but each format has rules, and a server that cannot read its config may refuse to start, silently ignore your change or reset it. Knowing the common formats and the usual mistakes turns editing from a gamble into a routine.
The golden habits
Before the formats, three habits that prevent most trouble:
- Copy the file first. Save a backup copy next to it, such as
server.properties.bak, before you change a line. If something breaks, you restore it in seconds. - Stop the server before editing, unless you know the game reloads the file. Some games rewrite their config on shutdown, which overwrites changes you made while it was running. ARK server rates explained gives an example.
- Change one thing at a time, then test. Ten changes at once make it impossible to find the bad one.
Using the right editor
Use the file manager's editor, or a proper code editor on your computer if you download the file with SFTP. Avoid word processors, which add hidden formatting, and basic editors that convert quote marks into curly ones or add a hidden mark at the start of the file. The file should be plain text, in UTF-8 encoding.
The common formats
Properties files (.properties)
Used by Minecraft's server.properties. One setting per line, as name=value.
- No spaces around the equals sign is safest.
- Lines starting with
#are comments. - Values are not quoted.
- Booleans are
trueorfalse, in lowercase.
See Editing server.properties for the Minecraft details.
YAML (.yml, .yaml)
Used by many Minecraft plugins. Structure comes from indentation, and this is where most mistakes happen:
- Indent with spaces, never tabs. A tab makes the file unreadable.
- Use the same number of spaces for each level, usually two.
- A colon must be followed by a space:
key: value. - Quote text that contains special characters, such as a colon or a
#.
settings:
max-homes: 3
teleport-delay: 5
If a plugin says "could not load config", a tab or wrong indent is the likeliest cause. A YAML checker website or editor plugin shows exactly which line.
JSON (.json)
Used by many tools, bots and plugin configs. Strict rules:
- Every name is in double quotes.
- Items are separated by commas, with no comma after the last item.
- Only straight double quotes work, not single or curly ones.
- No comments are allowed.
A single missing or extra comma breaks the whole file. A JSON validator finds it instantly.
INI files (.ini)
Used by games such as ARK. Sections in square brackets, then Name=Value lines.
- Settings must sit under the correct
[Section]. - Names are often case sensitive.
- Some games rewrite the file at shutdown.
Config scripts (.cfg)
Used by many Source and Rust servers. Each line is a command, such as hostname "My Server". Quote text, and use straight quotes. See How to configure your Rust server and Counter-Strike 2 game modes and server.cfg explained.
Environment files (.env)
Used by bots and web apps. NAME=value, one per line. Treat them as secrets, because they often hold tokens and passwords. See Environment variables and keeping your bot token safe.
Mistakes to watch for
| Mistake | Effect |
|---|---|
| Tab instead of spaces in YAML | The file does not load |
| Curly quotes pasted from a web page | The value is read wrongly |
| A trailing comma in JSON | The whole file is invalid |
| Wrong capitalisation | The setting is ignored |
| Editing while the game runs | Your change is overwritten |
| Windows line endings in some Linux tools | Strange errors on the first line |
| Saving with the wrong name or extension | The server reads the old file |
| Removing a required setting | The server fails to start |
When it still goes wrong
- Restore your backup copy, and confirm the server starts.
- Apply your change again, more carefully.
- Read the console for the line number or setting name in the error. How to read your server logs explains how to find it.
- If you cannot see it, delete the file only if you know the server will create a fresh default, and compare it with yours.
Keep your changes documented
A short note, kept somewhere safe, of which setting you changed and why, will help you in six months, and it helps whoever takes over after you. Pair it with scheduled backups, so even a bad edit costs you minutes at most.
Still stuck? Open a ticket on Discord - run /ticket in any channel, pick a department, and include your Server ID or Invoice ID so we can jump straight in.