ImperialHost.cc · Guides · Building and simulation
Garry’s Mod server: joining and setup
Most of a Garry’s Mod server is set on the Startup tab of the game panel: the map, the gamemode, the player slots and the Steam Workshop collection. The name and the password are in the server.cfg file.
Before you start
- A Garry’s Mod server with us and access to the game panel.
- Garry’s Mod on Steam.
1. Join from the game
- The server's address is in the client area on the service's page under IP address, for example
node1.imperialhost.cc:30005. In the game panel it is at the top under the server's name, and the Copy button copies it. - Turn on the developer console in the game: in the options open the keyboard settings, then the advanced settings, and tick the developer console.
- Open the console with the key below Esc and type
connect node1.imperialhost.cc:30005with your address and port.
2. Name, password and player slots
- In the game panel open the Files tab, the
garrysmod/cfgfolder and theserver.cfgfile in it. - Change the server's name on the
hostnameline and put a join password between the quotes on thesv_passwordline. Without a password anyone can join. Save with Save Content. - On the Startup tab set MAX PLAYERS (up to 128), the default map in MAP and the gamemode in GAMEMODE, for example
sandbox, orterrortownfor Trouble in Terrorist Town. Each value saves by itself. - On the Console tab click Restart (the circular arrow at the top near the server's name). The changes apply after the restart.
Players type the password in the console as password secret before they use connect.
3. Addons from the Steam Workshop
- Make a collection of addons and maps on the Steam Workshop. It must be public or unlisted: the server can't download a private collection.
- Copy the collection's number from the end of its address (after
?id=), paste it into WORKSHOP ID on the Startup tab and restart the server. It downloads the collection by itself. - From the collection players get only the map automatically, and with some gamemodes the gamemode too. Add the other addons for them in the file
garrysmod/lua/autorun/server/workshop.lua: one lineresource.AddWorkshop( "123456789" )per addon, with the addon's number, not the collection's. Replace the empty lineresource.AddWorkshop( "" ), save the file and restart the server.
4. Make yourself superadmin
- Join the server. In the game panel type
statuson the Console tab and find your Steam ID in the list, for exampleSTEAM_0:1:12345678. - On the Files tab open the file
garrysmod/settings/users.txt. - Inside the curly brackets of the
"superadmin"block add the line"Name" "STEAM_0:1:12345678"with your name and Steam ID. For an admin use the"admin"block. Save with Save Content. - Restart the server. The file is read only at start-up.
For finer roles such as a moderator, servers use the ULX addon with the ULib library from the Steam Workshop.
Troubleshooting
The server is not in the server list
Without a Steam token (GSLT) the server ranks far down the list. Create a token for App ID 4000 for free at steamcommunity.com/dev/managegameservers and paste it into STEAM ACCOUNT TOKEN on the Startup tab. Every server needs its own token. Then restart the server.
Players see missing textures or ERROR models
Most often they don't have the addons. Add them to workshop.lua with resource.AddWorkshop (see above) and restart the server.
The collection's addons don't download
The collection must be public or unlisted, and WORKSHOP ID must hold the collection's number, not a single addon's. The console shows the download after the start.
Superadmin rights don't work
The Steam ID must be in the STEAM_0:… form exactly as status shows it, and the line must be inside the "superadmin" block. Restart the server after the change.
Still stuck?
Message us on Discord. The AI assistant Aurel answers first, and you can call an admin. Or open a ticket in the client area.