If you’re reading this, you’re probably looking at a server.cfg
that looks something like this:
It’s pretty cluttered, right? Well, it could definitely look much better! Here are some tips to help you clean things up and organize it in a more readable way:
Sections
-
- Section Headers
-
- Removing permissions from
server.cfg
- Removing permissions from
Section 1: Section Headers
Creating section headers in your server.cfg
is a great way to organize the file and make it more readable. You can do this however you like — whether it’s simple tags or fancy ASCII art.
Basic Section Header Example:
# THIS IS AN EXAMPLE OF A HEADER
ensure RESOURCE_1
ensure RESOURCE_2
ensure RESOURCE_3
Or, if you’d like something more interesting, you can use a tool like ASCII GEN to generate custom ASCII art. Then, you can use it in your server.cfg
like this:
## .__
## ____ ___ ________ _____ ______ | | ____
## _/ __ \\ \/ /\__ \ / \\____ \| | _/ __ \
## \ ___/ > < / __ \| Y Y \ |_> > |_\ ___/
## \___ >__/\_ \(____ /__|_| / __/|____/\___ >
## \/ \/ \/ \/|__| \/
ensure RESOURCE_1
ensure RESOURCE_2
ensure RESOURCE_3
Section 2: Using exec
to Organize Files
Did you know you can use exec
within your server.cfg
to make things even cleaner? This lets you move most of your configuration out of the main file and into separate ones.
Important: You can only use up to 5 exec
files in your `server.cfg’ .
Example (Without Subfolders):
First, create a file inside your server directory (e.g., Keys.cfg
):
Then, add this line to the top of your server.cfg
:
exec Keys.cfg
Inside your Keys.cfg
file, you can include any settings you want. For example, this is where you might store API keys or other sensitive information:
## ____ __.________________.___. _________
## | |/ _|\_ _____/\__ | |/ _____/
## | < | __)_ / | |\_____ \
## | | \ | \ \____ |/ \
## |____|__ \/_______ / / ______/_______ /
## \/ \/ \/ \/
set steam_webApiKey "REPLACE"
sv_licenseKey "REPLACE"
sv_tebexSecret "REPLACE"
set resources_useSystemChat false
set mysql_connection_string "REPLACE"
This keeps your server.cfg
file more organized by separating keys and settings into their own file.
Example (With Subfolders):
If you prefer using subfolders to keep your configuration files even more organized, it’s easy to do. For instance, if your configuration files are inside a folder called server
, you would use the following:
exec server/help.cfg
Check out this image for a better idea of how it would look:
By following these simple steps, you’ll have a much cleaner and more manageable server.cfg
. Keep your resources, permissions, and other settings organized, and your server management will be a breeze!