Skip to content

server.cfg Guide: Configure Your Game Server Settings

server.cfg is a plain-text file your game server reads on startup. One setting per line, no special syntax. Here is what every key setting does, with annotated examples for GMod and Rust.

What is server.cfg?

server.cfg is a plain-text configuration file that your game server reads on startup. It contains key-value pairs - one setting per line - that control how your server behaves.

The file is read once when the server starts. Most settings are not re-read while the server is running (some convars can be changed live via RCON, but not all). In GMod, the file lives at garrysmod/cfg/server.cfg. In Rust, the equivalent lives at server/my-server/cfg/server.cfg.

You do not need to know any programming to edit it: it is plain text, no special syntax beyond key value or key "value with spaces".

GMod server.cfg: key settings

// garrysmod/cfg/server.cfg

// ── Identity ──
hostname "My Garry's Mod Server"     // Name shown in the server browser
sv_password ""                        // Leave blank for public; set to make private

// ── Players ──
sv_maxplayers 32                      // Maximum concurrent players

// ── Security ──
sv_cheats 0                           // 0 = cheats off (required for VAC)
rcon_password "change-this-now"       // Change from default - never leave blank

// ── Downloading ──
sv_downloadurl ""                     // Optional FastDL URL; leave blank for Workshop
sv_allowupload 0                      // Whether clients can upload sprays
sv_allowdownload 1                    // Whether clients can download files

// ── Sandbox-specific ──
sbox_noclip 1                         // Allow noclip in Sandbox mode
sbox_maxprops 200                     // Max props a single player can spawn
sbox_godmode 0                        // 0 = players can be killed (default)
  • hostname must be in quotes if it contains spaces.
  • rcon_password should be a strong, unique string: a blank RCON password is a serious security risk.
  • sv_cheats 1 will disable VAC and is visible in the server browser; never enable it on a production server.

Rust server configuration: key settings

// server/my-server/cfg/server.cfg

// ── Identity ──
server.hostname "My Rust Server"
server.description "Weekly wipes | No BP wipes | EU"
server.url "https://example.com"
server.headerimage "https://example.com/banner.jpg"   // Direct image URL, max 512x256px

// ── World ──
server.seed 12345        // World generation seed
server.worldsize 3500    // Map size in metres (1000–6000); 3500 is a common mid-size
server.maxplayers 100    // Maximum concurrent players

// ── Economy / Decay ──
decay.scale 1.0          // 1.0 = standard; 0.5 = half speed; 0 = no decay
  • server.seed and server.worldsize together determine your map: changing either on an existing save will cause a wipe.
  • server.headerimage must be a publicly accessible direct URL; Steam will not fetch images behind authentication.
  • Rust does not use // comments natively in all versions: test with and without if settings are ignored.

How to edit server.cfg

Option 1: Browser file editor (recommended)

Open your server dashboard and select the file manager. Navigate to the cfg/ folder and open server.cfg. Edit in the browser, save, then restart your server for changes to take effect. No FTP client, no command line required.

Option 2: FTP/SFTP

Connect using the FTP credentials from your panel. Download server.cfg, edit it locally in a plain-text editor (Notepad, VS Code, etc.), and re-upload. Do not use Microsoft Word or any rich-text editor: they add hidden formatting that breaks the file.

Common mistakes

Forgetting quotes around values with spaces

hostname My Server will break; use hostname "My Server".

Wrong file encoding

server.cfg must be UTF-8 or ASCII. Saving with Windows-1252 encoding can cause the file to be silently skipped or partially parsed.

Setting sv_cheats 1 accidentally

Disables VAC and flags your server publicly; double-check this setting before launch.

Leaving rcon_password blank or set to "password"

A guessable RCON password gives anyone with network access full server control.

Editing the wrong cfg file

GMod has multiple cfg files (autoexec.cfg, listenserver.cfg, server.cfg); changes to the wrong one have no effect.

Frequently asked questions

Do I need to restart my server after editing server.cfg?

For most settings, yes. server.cfg is read on startup, not continuously. Some convars (like hostname or sv_password) can be changed live via RCON without a restart, but the change will not persist unless it is also in the config file.

Where is server.cfg in Garry's Mod?

The file is at garrysmod/cfg/server.cfg relative to your server install root. If it does not exist, create it. The server will read it automatically on next start.

What does rcon_password do?

RCON (remote console) lets you send commands to a running server without direct access to the machine. The rcon_password setting controls who can authenticate with RCON. A blank or obvious password is a serious risk: anyone with network access to your server port could take full control.

Can I use comments in server.cfg?

In GMod server.cfg, lines starting with // are ignored as comments. In Rust, comment support varies by version: if a line is being ignored unexpectedly, try removing any comment text.

Why is my hostname not showing in the server browser?

The most common cause is forgetting quotes around a hostname that contains spaces (hostname My Server instead of hostname "My Server"). Also check that the server has fully started and been picked up by Steam's master server list. This can take a few minutes on first launch.

Our browser-based file editor lets you update server.cfg without FTP or SSH

Edit, save, restart: all from the panel dashboard.

Set up your server today →