Garry’s Mod Dedicated Server Guide: Setup, Addons and Backups
Set up a Garry’s Mod dedicated server, add Workshop addons and collections that clients download properly, and keep backups you can actually restore.
What a Garry’s Mod dedicated server actually is
A Garry’s Mod dedicated server is srcds, the Source dedicated server program, running the Garry’s Mod game data. It is separate from the normal client. That matters because the server has its own install, its own startup line, its own config files and its own update path. You do not launch your own copy of Garry’s Mod and hope people can join it; you run a dedicated server process designed to host a map continuously.
- Gamemode: Sandbox is the easiest starting point, but Garry’s Mod can also boot into shipped
terrortownfor Trouble in Terrorist Town, or a Workshop gamemode later. Your startup line needs the gamemode folder name, not a friendly title. - Player slots: this affects plan choice, CPU pressure, bandwidth use and how aggressive you need to be with prop and entity limits. More people means more physics, more Lua activity and more network traffic for the server to process.
- Rent or self-host: renting is simpler because the panel usually fills in the install path, ports and service wrapper for you. Self-hosting gives control, but you need to think about updates, restarts, storage paths and the machine’s single-threaded server performance. If you are still deciding, see our Garry’s Mod server hosting comparison. If you want to run it on your own hardware, start with our self-hosting guide and our game server hardware requirements guide.
Install the server with SteamCMD on Windows or Linux
The dedicated server is distributed separately through SteamCMD as App ID 4020. That is the server download ID, not the token ID. You log in anonymously and pull the files into a dedicated folder.
Windows install
steamcmd.exe +login anonymous +force_install_dir c:\my_garrysmod_server\ +app_update 4020 validate +quit
Since the September 2026 update (16 September), the Windows server download also includes 64-bit binaries, so a heavy server with lots of addons is far less likely to crash from running out of 32-bit memory. The same update added srcds_console.exe, a version of srcds.exe that reuses your existing console window instead of opening a new one each time.
If updates fail, the wiki notes that +force_install_dir can sometimes cause update problems. The practical fix is to try again without it, reinstall into another folder, or set the force-install directory before login.
Linux install and first boot
steamcmd +login anonymous +force_install_dir ../gmodds +app_update 4020 validate +quit cd ~/gmodds/ && ./srcds_run -game garrysmod +maxplayers 32 +map gm_construct
On Linux, run the server under its own user account. The wiki recommends a user named steam with home /home/steam. On a 64-bit Linux machine, if SteamCMD reports linux32/steamcmd: No such file or directory, the usual cause is missing 32-bit libraries rather than a bad path.
srcds_run is the wrapper script that restarts the server after a crash. It does not restart the server after a reboot, and it cannot help if you simply close the terminal. If you want the server to come back after system restarts, that is a separate service-management job on your machine or your host panel.
Run the same SteamCMD line again whenever Garry’s Mod updates. Some updates are backwards compatible, like the September 2026 one, but others are not: after the April 2026 update (29 April), players on the new version could not join a server until it had been updated too.
Get a GSLT before you care about browser listing
Since the May 2020 update, Garry’s Mod servers should have a Steam Game Server Login Token. In practical terms, treat it as mandatory. A server without one suffers a severe server-list ranking penalty, so it can look as if the server is missing when it is really just buried.
This is where the two app IDs matter:
4020is the Garry’s Mod Dedicated Server download in SteamCMD.4000is the Garry’s Mod base game app ID used when you create the GSLT.
Each server needs its own unique token. Put that token on the startup line with +sv_setsteamaccount and restart. Doing that ties the running server to a static SteamID, which helps players find it again even if the IP changes. If the token is invalid or expired, the server will not start. If you change your Steam password, all GSLTs are invalidated and must be regenerated.
Build the startup line properly
The startup line does two jobs: it launches the server binary, and it provides the earliest settings the server needs before the first map starts. That timing is why some convars belong here rather than in server.cfg. If the server has to know something before it can initialise networking or load the first map, put it on the command line.
Example startup lines
srcds.exe -console +maxplayers 20 +gamemode sandbox +map gm_construct +sv_setsteamaccount <token> +host_workshop_collection <collection_id> -tickrate 66.6666 -port 27015 -condebug
./srcds_run -game garrysmod +maxplayers 12 +gamemode sandbox +map gm_flatgrass +sv_setsteamaccount <token> +host_workshop_collection <collection_id> -tickrate 66.6666 -port 27015 -condebug
The first line is Windows, the second Linux. -condebug saves the console output to a log file in the garrysmod folder, which helps when the server closes too quickly to read the error.
What each part does:
-console: starts with a console window on Windows so you can actually see what the server is doing.-game garrysmod: on Linux, pointssrcdsat the Garry’s Mod game folder.+maxplayers: sets the slot count. More slots means more entities, more networking and more physics pressure under load.+gamemode: the folder name insidegarrysmod/gamemodes/or an addon’s owngamemodes/folder. This is not a display name.+map: the map file name without.bsp, fromgarrysmod/maps/or an addon.+sv_setsteamaccount: your GSLT. This is what ties the server to Steam for proper listing.+host_workshop_collection: tells the server which public or unlisted Workshop collection to download and mount on startup.
| Setting | Where it belongs | Why it belongs there |
|---|---|---|
+sv_setsteamaccount | Command line | The server needs the token as it starts talking to Steam. If it is wrong, startup can fail immediately. |
+map | Command line | The first map must exist before the server can finish initialising a playable session. |
+gamemode | Command line | The first map should load under the correct gamemode from the beginning. |
+maxplayers | Command line | Slot count affects how the server allocates itself at launch and how the browser sees it. |
-tickrate | Command line | Tick timing is a launch-level server behaviour, not a late config tweak. |
-port | Command line | The server must know which port to bind before players can connect. |
sv_lan | Command line | It must be set before the server starts; server.cfg runs too late. |
hostname, sv_password, rcon_password | server.cfg | These are normal runtime convars and are easier to maintain in one readable file. |
+maxplayers, +gamemode, +map, +sv_setsteamaccount, -tickrate, -port, sv_lan.hostname, sv_password, rcon_password, sv_location, sv_allowcslua, sbox_* limits.Use a small, readable server.cfg first
garrysmod/cfg/server.cfg is where you put the settings you are likely to revisit. The repository ships an empty one, which is useful because it means you are not fighting hidden defaults in a pre-filled template. Start small and comment your choices so you remember why they exist.
// garrysmod/cfg/server.cfg hostname "My Garry's Mod Server" sv_password "" rcon_password "change_this" sv_location gb sv_loadingurl "https://example.com/loading" sv_allowcslua 0 sv_kickerrornum 0 // Sandbox per-player limits: add a line for each one you want to // tighten, with a value that suits your slot count and hardware: // sbox_maxprops, sbox_maxragdolls, sbox_maxnpcs, sbox_maxvehicles, // sbox_maxeffects, sbox_maxballoons, sbox_maxthrusters sbox_noclip 1 sbox_godmode 0 sbox_playershurtplayers 1 sbox_weapons 0
hostnameis just the browser name, but keeping it clear helps your own players find the right entry quickly.sv_passwordcontrols access. An empty value makes it public; a password reduces random joins while you are still building the server.rcon_passwordprotects remote console access. Treat it as admin access, because that is what it is.sv_location gbsets the browser flag. Use the correct ISO code; fake location is a rules problem, not just a cosmetic one.sv_loadingurlsets the page shown while joining. It must begin withhttp://orhttps://.sv_allowcslua 0stops clients running their own clientside Lua through commands such aslua_openscript_clandlua_run_cl. Servers often disable this because it reduces what clients can execute locally, which is a security and consistency choice rather than a performance optimisation.sv_kickerrornumcan kick clients after a number of clientside Lua errors. Leaving it at0means never kick for that. Raising it can remove badly broken clients, but it can also punish players for addon-side mistakes they did not cause.
Make yourself admin with users.txt
The built-in admin system lives in garrysmod/settings/users.txt. It has superadmin and admin sections. To grant yourself access, place your own SteamID in the appropriate section.
"superadmin"
{
"yourname" "STEAM_0:1:12345678"
}
"admin"
{
} Use your own SteamID (type status in the game console while connected to see it), not the placeholder above. The file is read when a player first spawns, by the authentication logic in Garry’s Mod. If Steam has fully authenticated the player and the ID matches, the join message says You're in the 'superadmin' group on this server.
If Steam has not fully authenticated the player yet, the group is not applied on that spawn and the server reports that the usergroup has not been set. That is the reason behind the familiar “not fully authenticated” confusion: the file is correct, but the auth state was not ready at the moment the player first spawned.
Addons: mounting one and sending its content are different jobs
Once the vanilla server lists and lets you in, addons are where most of the remaining trouble comes from. For Sandbox, TTT, DarkRP and Prop Hunt, the rule is the same: the server loading an addon and a player seeing its assets are two separate outcomes. That is the part many admins miss. An addon can be mounted correctly, run its Lua and even change gameplay, while clients still join to missing textures or red ERROR models because the content was never sent to them.
- Job 1: the server must have and mount the addon, or it cannot run it at all.
- Job 2: players must download the addon’s content, or their client cannot render its models, materials or sounds.
The matrix shows which job each type of addon needs.
| Addon contains | Server must mount it | Add with resource.AddWorkshop |
|---|---|---|
| Lua only (admin tools, gamemode logic) | Yes | No |
| Models, materials or sounds | Yes | Yes |
| The current Workshop map | Yes | Automatic |
| A gamemode with a workshopid | Yes | Automatic |
| Lua plus content (weapons, NPCs) | Yes | Yes |
Use a Workshop collection to install addons on the server
For most community servers, a Workshop collection is the tidiest way to mount addons on the server. Put the addons you want into a Steam Workshop collection and make sure the collection is Public or Unlisted. A private or friends-only collection cannot be read by the server, so nothing will download from it at startup.
If you are self-hosting and the base dedicated server itself may be stale, update that first with steamcmd +login anonymous +force_install_dir <dir> +app_update 4020 validate +quit. That removes one variable before you start blaming addons.
Default Workshop route
- Create or tidy your collection so it contains the server addons you want mounted.
- Launch the server with the collection ID and your game server login token.
- Set the gamemode with its folder name if needed.
- Restart and read the console before adding more.
./srcds_run -game garrysmod +maxplayers 32 +host_workshop_collection 157384458 +sv_setsteamaccount <token> +gamemode sandbox +map gm_construct
The ID for +host_workshop_collection is the number at the end of the collection’s Workshop URL. On every start, the server downloads the collection, mounts all its addons and checks them for updates. If you included nested collections, those are downloaded too. A big collection makes restarts slower because of that update check, but you get one list to manage and the server stays on the same versions as the Workshop.
Since the September 2026 update you can also list Workshop items in a plain file instead of, or as well as, a collection. Create garrysmod/cfg/srcds_workshop_ids.txt yourself in this format, with one line per Workshop ID:
"my_workshop_addons"
{
"1" { "wsid" "123277559" }
"2" { "wsid" "111412589" }
} Follow an addon from the collection to the player and you can see where each step can break.
Where a Garry’s Mod server keeps its data
The more addons, ranks and props a server collects, the more there is to lose in one bad update. Garry’s Mod does not have a single world save in the way many survival servers do. Player data, ranks, persistent props, bans, logs, custom code and server settings live in different places, and each of them matters for a different kind of recovery.
This map helps you separate unique server state from files that Steam or the Workshop can rebuild.
| Path | What lives there | Why it matters | Can it be re-downloaded? |
|---|---|---|---|
garrysmod/sv.db | SQLite database used by the sql library; common home for PData, many addon records, ULib bans, and DarkRP data by default | This is often the single most important file for player state. Lose it and you can lose money, ranks, bans, inventories or other persistent addon data. | No |
garrysmod/data/ | File-based addon saves created through the file library | Any addon storing JSON, text, logs or flat-file saves on the server writes here, so missing it can mean empty configs, wiped addon state or lost audit data. | No |
garrysmod/data/persist/<mapname>_<sbox_persist value>.txt | Sandbox persistent props for a given map and persistence profile | Critical for build servers that use “Make Persistent”. It is separate from dupes and only updates on specific events, so its timing matters. | No |
garrysmod/data/ulib/users.txt, garrysmod/data/ulib/groups.txt, garrysmod/data/ulib/misc_registered.txt | ULib/ULX users, groups and related registration data | If these are missing, your admin hierarchy can revert even if the server itself still starts. | No |
garrysmod/data/DarkRP_logs/ | DarkRP logs | Not as vital as player balances, but useful for moderation history and tracing what happened before a rollback. | No |
garrysmod/cfg/server.cfg, banned_user.cfg, banned_ip.cfg | Server settings, passwords, limits and built-in ban files | These control how the server behaves and who is blocked. Restoring them avoids guessing old settings after an outage. | No |
garrysmod/settings/users.txt | Built-in admin users | Useful as a fallback if ULX is broken or absent after restore. | No |
garrysmod/addons/ | Non-Workshop addons, purchased scripts, custom edits, local fixes | These are your irreplaceable code changes. A restore without them can boot, but with missing features or broken data readers. | Not the non-Workshop parts |
Make the backup consistent, not just complete
The first rule is simple: a backup taken at the wrong moment can be worse than no backup because it gives you false confidence. The highest-risk file is garrysmod/sv.db. SQLite writes to a single database file, and a blind file copy while the server is still writing can capture an inconsistent state. That is a disk consistency problem, not a gameplay one: the server may look fine while the copied file is already broken.
The safest option is to stop the server, then copy the files. The trade-off is downtime, but in exchange you remove live writes to sv.db and cut down file churn in garrysmod/data/. If you cannot stop immediately, quieting the server is still worth doing: pause build sessions, avoid rank edits, avoid config changes, and do not treat a live panel snapshot as equal to a clean stop. Less write activity lowers the chance of half-updated flat files, but it does not make a raw SQLite copy safe.
If you have access to the sqlite3 command-line tool, its .backup command is the proper live-safe way to copy sv.db because SQLite itself produces the snapshot instead of your file manager copying bytes mid-write.
# Example: create a consistent SQLite copy sqlite3 garrysmod/sv.db ".backup 'garrysmod/sv.db.backup'"
# Example: stop the server first, then archive the key paths tar -czf gmod-backup.tar.gz \ garrysmod/sv.db \ garrysmod/data/ \ garrysmod/cfg/ \ garrysmod/settings/users.txt \ garrysmod/addons/ \ garrysmod/gamemodes/ \ garrysmod/lua/bin/
How to restore cleanly, and why the order matters
Restore to a separate test folder or separate server first. The reason is simple: first boot after a restore is when missing addons, bad modules, wrong config and stale databases show themselves. If you test on the live server, you are debugging under pressure and can easily overwrite newer good data with older files.
- Build a clean base server if needed. Reinstall the base files from SteamCMD if the whole instance is suspect.
- Restore local code first. Put back non-Workshop addons, custom gamemodes and
garrysmod/lua/bin/before starting the server. This avoids booting with missing readers, missing modules or default code that may create fresh blank files. - Restore config and startup settings. Put back
garrysmod/cfg/,garrysmod/settings/users.txt, and the startup line pieces such as+gamemode,+map,+host_workshop_collectionand+sv_setsteamaccount. - Restore data next. Put back
garrysmod/sv.dbandgarrysmod/data/. If DarkRP uses MySQL, restore that database snapshot as part of the same recovery, not afterwards. - Start the test copy and inspect it. Watch for missing modules, SQL errors, wrong gamemode loads, empty admin lists or absent Workshop downloads.
- Only then restore live. Once the test copy behaves as expected, repeat the same file set on the production server.
Other Garry’s Mod server questions
Do players need to subscribe to my Workshop collection to join?
No. The server can make the current Workshop map and gamemode available automatically, and other content can be delivered with resource.AddWorkshop or FastDL. Subscribing in advance only saves them download time; what matters is that players allow downloads in their own settings.
Can I add addons without restarting the server?
Not reliably. If you copy files in while the server is running, Garry’s Mod can throw Couldn't include file '...' (File not found) because the file was not present during the clean startup include pass. A restart is the safe way to force mounting, include checks and Workshop update checks into a known state.
Do I still need Counter-Strike: Source content for my server?
Usually less than before. Most Counter-Strike: Source and Half-Life 2 episode content now ships with Garry’s Mod by default, aside from maps, voice lines and music. If you still mount another Source game with mount.cfg, remember that it only helps the server; it does not give players that content automatically.