Hosting a Garry's Mod server
Garry's Mod servers run on the Source dedicated server, natively on Linux. Gamemodes and addons are Lua, so a fast core and disciplined addon choices decide how many players stay smooth.
How do I install a Garry's Mod server?
Download app 4020 with SteamCMD anonymously. The 64-bit build lives on the x86-64 beta branch, which brings more usable memory and better performance on modern processors.
useradd -m -s /bin/bash gmod sudo -u gmod steamcmd +force_install_dir /home/gmod/srv \ +login anonymous +app_update 4020 -beta x86-64 +quit
What does the start line look like?
cd /home/gmod/srv ./srcds_run_x64 -game garrysmod -console -port 27015 -tickrate 33 +maxplayers 24 +gamemode terrortown +map ttt_minecraft_b5 +host_workshop_collection 1234567890 -authkey STEAM_WEB_API_KEY +sv_setsteamaccount GSLT_TOKEN
+gamemode:sandbox,terrortownfor Trouble in Terrorist Town, or the folder name of an installed gamemode such as DarkRP.+host_workshop_collection: a Workshop collection the server downloads at start, with the Steam Web API key in-authkey.+sv_setsteamaccount: a game server login token, created for app ID 4000 on your Steam account, which keeps the server listed under a stable identity.-tickrate: 33 is common for roleplay and TTT, 66 for fast build or combat servers that need it.
Which ports does it use?
UDP 27015 for players and queries, and TCP 27015 for RCON if you use it remotely. A second server on the same machine takes 27016 or another free port with -port. Close TCP RCON to everyone but your admin address.
How do addons and gamemodes load?
Three ways, and most servers use all of them. Workshop content listed in the collection downloads automatically, and clients receive it on join. Local addons go into garrysmod/addons, each in its own folder, which suits private code and paid scripts. Gamemodes go into garrysmod/gamemodes. Server settings live in garrysmod/cfg/server.cfg: hostname, passwords, sv_loadingurl, download rules and any gamemode convars.
What is FastDL and do I still need it?
FastDL serves custom content such as maps, models and sounds from a web server instead of through the game connection, which is much faster. Set sv_downloadurl to a URL that mirrors the garrysmod content folders, ideally compressed with bzip2. Content published on the Workshop does not need it, but private assets do. A small nginx site on the same machine serves FastDL perfectly well.
server {
listen 80;
server_name dl.example.net;
root /srv/fastdl/garrysmod;
autoindex off;
}
Why do Garry's Mod servers lag?
Almost always because of Lua. The game logic runs on one main thread, and every addon's hooks and timers share it. A single badly written addon can take more time per tick than the rest of the server combined. Good habits:
- Install fewer, better-maintained addons, and remove the ones nobody uses.
- Profile with a Lua profiler addon when tick time rises, then fix or remove the worst offender.
- Limit props per player and freeze physics in roleplay maps.
- Restart nightly so leaked entities and memory return to zero.
Which machine fits?
The fastest single core you can get, since one busy server sits on one thread. A DarkRP server with 60 players and a heavy addon set uses roughly 2 to 4 GB of memory on the 64-bit branch. ESSENTIAL-S with the AMD Ryzen 7 9700X runs several such servers for $46.20 a month. For a community network of TTT, DarkRP, Prop Hunt and a sandbox server, GAME-1 2026 keeps each one on its own fast core with a large cache.
How do I protect player data?
Roleplay money, inventories and ranks usually live in SQLite inside garrysmod/sv.db or in a MySQL or MariaDB database through a Lua module. Back up the database daily and the data folder with it. Running the database on the same machine keeps queries fast, and the Rescue a database from a dead system guide helps if one ever refuses to start.
Machines for Garry's Mod servers
Lowest monthly price of each model across its data centres; the model page shows the price in every location.
| Model | Processor | Cores | Memory | Drives | Port | Per month |
|---|---|---|---|---|---|---|
| ESSENTIAL-GAME-1 | AMD Ryzen 5 5600X | 6 | 32 GB | 2x 512 GB SSD NVMe | 1 Gbps unmetered | $43.20 |
| ESSENTIAL-GAME-2 | AMD Ryzen 7 5800X | 8 | 64 GB | 2x 960 GB SSD NVMe | 1 Gbps unmetered | $60.00 |
| ESSENTIAL-S | AMD Ryzen 7 9700X | 8 | 64 GB | 2x 512 GB SSD NVMe | 1 Gbps unmetered | $46.20 |
| ESSENTIAL-M | AMD Ryzen 9 9900X | 12 | 64 GB | 2x 512 GB SSD NVMe | 1 Gbps unmetered | $70.80 |
| GAME-1 2026 | AMD Ryzen 7 9800X3D | 8 | 64 GB | 2x 960 GB SSD NVMe | 1 Gbps unmetered | $198.60 |
Fast single cores keep Lua-heavy gamemodes smooth at full player counts.
Related pages
Game server hosting
Ryzen X3D and Ryzen 5000 machines for Minecraft, Rust, CS2 and FiveM worlds that need steady tick rates.
Read moreCounter-Strike 2 server hosting
Run Counter-Strike 2 servers on Linux: one SteamCMD download, game type and mode pairs, GSLT tokens, Workshop maps and plugins with Metamod.
Read moreRescue a database from a dead system
Get a consistent MariaDB, MySQL or PostgreSQL dump out of a server whose operating system no longer starts, working entirely from rescue mode.
Read moreQuestions and answers
Does Garry's Mod have a Linux dedicated server?
Yes. SteamCMD app 4020 installs the Source dedicated server for Garry's Mod with native Linux binaries, including a 64-bit branch.
Which port does a Garry's Mod server use?
UDP 27015 for players and queries, and TCP 27015 for remote RCON, which should be open only to your admin address.
How do I load a Workshop collection on a Garry's Mod server?
Add +host_workshop_collection with the collection ID and pass a Steam Web API key with -authkey.
What is FastDL in Garry's Mod?
A web server that delivers custom maps, models and sounds to players faster than the game connection, set with sv_downloadurl.
Why does my Garry's Mod server lag with few players?
Usually a Lua addon with heavy hooks or timers. Profile the server, then fix or remove the addon that uses the most time per tick.