Skip to content

Garry's Mod server guide

Garry’s Mod servers are mostly addons and a handful of launch settings, and on Hostboi those settings live in two places: the Startup tab, which the panel applies every time the server starts, and the server’s own server.cfg, which the panel rewrites on every boot.

  1. Open your server in the panel and go to Startup.
  2. Change the fields you need and save.
  3. Restart the server from Console so the new values are used.
Field What it does
Map The map the server loads on start. gm_flatgrass by default.
Gamemode sandbox by default. The gamemode has to be installed on the server to work.
Max Players Slot count, 32 by default.
Tickrate 22 by default. Raising it costs CPU, so only do it if your gamemode needs it.
Lua Refresh 0 disables Lua file refresh, 1 enables it. Useful while you are testing your own Lua.
Server Name The name shown in the server browser.
Server Password Join password. Leave blank for a public server.
Admin (RCON) Password Password for remote console access. Leave blank to keep RCON off.
Workshop ID The ID of a Workshop collection, covered below.
Steam Account Token Your game server login token. See Game keys and tokens.

Server Name, Server Password and Admin (RCON) Password are also written into garrysmod/cfg/server.cfg before every boot, and Garry’s Mod re-runs that file on every map change. Editing those three lines in the file by hand is pointless — the next start overwrites them, and a map change overwrites them again. Use the Startup fields.

Garry’s Mod has no admin system of its own. There are two workable routes.

ULX (the usual one). ULX and ULib are Workshop addons, so the clean way to install them is to put both in a collection and load it (see the Workshop section):

  1. Add ULX and ULib to a Workshop collection and put its ID in Workshop ID on Startup. Restart.
  2. Join the server once so your name is known to it.
  3. In the panel’s Console tab, run ulx adduser "YourName" superadmin, replacing YourName with the name you joined under. ULX’s own documentation uses exactly this command.
  4. Rejoin and run xgui in the console (bind it to a key with bind m xgui) to confirm you have the menu.

RCON, with no addons at all.

  1. Set Admin (RCON) Password on Startup and restart.
  2. In Garry’s Mod, open the developer console and run rcon_password <the password>, then rcon <command> for anything you want to execute — for example rcon status or rcon kick SomePlayer.

Treat that password like any other: don’t paste it into Discord or a ticket. If it leaks, change it on Startup and restart.

The Workshop ID field takes a collection ID, not an addon ID. It is the number at the end of the collection’s URL.

  1. Build a collection on the Steam Workshop and make it public or unlisted — the server cannot read a private collection.
  2. Copy the collection ID into Workshop ID on Startup and restart.
  3. Watch Console while it starts. The server downloads the collection and mounts everything in it; nested collections are downloaded too.

Three things worth knowing:

  • Clients download the addons from Steam themselves, using the IDs the server tells them about. A player who does not own the game’s content still gets the files, but a large collection means a long first join.
  • garrysmod/lua/autorun/server/workshop.lua holds resource.AddWorkshop("...") lines. Each one tells joining players to download that Workshop addon ID; it does not install the addon on the server. To run an addon on the server, add it to your collection or upload it to garrysmod/addons/. The panel does not overwrite this file.
  • The server variable host_workshop_autoupdate, set to 0, stops Workshop content updating on every start. That also stops map updates arriving, which can lock players out, so it is only worth doing on a server whose addons you control by hand.

Paths are relative to the server root, as the Files tab shows them:

Path What is in it
garrysmod/cfg/server.cfg The main config. Runs at boot and on every map change.
garrysmod/lua/autorun/server/ Lua that runs on every start, including workshop.lua.
garrysmod/addons/ Addons you upload by hand instead of taking them from the Workshop.
garrysmod/maps/ Maps you upload by hand.

Uploading a map into garrysmod/maps works, but players then have to download it from your server, which is slow for a big .bsp. A Workshop collection is the better route for anything players will not already have.

  • Map, without a restart: in Console, run changelevel gm_construct (or whichever map you want).
  • Map, permanently: set Map on Startup and restart.
  • Gamemode: set Gamemode on Startup and restart. Garry’s Mod picks the gamemode at startup, so there is no console command that switches it live — and the gamemode’s files have to be on the server already, either in the collection or in garrysmod/gamemodes/.

Run these in the panel’s Console, or in game after rcon_password:

  • status — list connected players with their Steam IDs and ping.
  • changelevel <map> — switch map now.
  • kick <name> — disconnect a player.
  • say <text> — print a message in chat as the console.
  • The server is running but nobody finds it in the browser. Without a Steam game server token the server may not appear in the public list. Add one with Game keys and tokens and restart.
  • The server stops right after you add a token. Garry’s Mod refuses to start with a token Steam does not recognise: the console shows FATAL ERROR and Account not found. Clear Steam Account Token or paste a correct one (made for App ID 4000), then start the server.
  • Addons are not downloading. The collection is private, or the number in Workshop ID is an addon ID rather than a collection ID.
  • “Couldn’t CRC map” or a map fails to load. The client has an older copy of a Workshop map than the server. Restart the server so it updates its Workshop content, then have the player rejoin.
  • Nobody can connect after a Garry’s Mod update. A freshly updated client refuses to join a server that is still on the older build. Restart the server and check the build it reports in Console; if it is still behind, contact support with that line.
  • A gamemode loads as sandbox. The gamemode is not installed on the server, so Garry’s Mod fell back to the default. Add it to the collection, or upload it to garrysmod/gamemodes/.