Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

Where to type commands: server console and RCON

Garry's Mod runs on Valve's Source engine. Its basic admin commands are typed in two places:

  • The server console: the terminal where srcds runs, or the console your host provides. It has every right, with no password.
  • RCON: a remote console protected by the rcon_password password. It listens over TCP on the same port as the game (27015 by default, or the one set with -port).

The RCON password is set in garrysmod/cfg/server.cfg:

rcon_password "a-long-unique-password"

As long as rcon_password is empty, the server refuses every RCON connection. From the game, open the console (the ~ key, after enabling the developer console in the options), then:

rcon_password "a-long-unique-password"
rcon status

The rcon command sends whatever follows it to the server. The engine automatically bans addresses that get the password wrong too often (settings sv_rcon_maxfailures, sv_rcon_minfailures and sv_rcon_banpenalty, in minutes). This password grants full power: only give it to people who could manage the machine. The server's ports are covered in game server ports.

02

Players and bans: the engine commands

These commands exist on every Garry's Mod server, with no addon. To see who is connected:

  • status: the current map and the player list, with their session number (userid), SteamID and ping;
  • users: information about the players on the server.

To take action:

kick PlayerName
kickid 12 "Mic spam"
banid 0 STEAM_0:1:12345678 kick
addip 60 203.0.113.25
removeid STEAM_0:1:12345678
removeip 203.0.113.25
listid
listip
writeid
writeip
  • kick removes a player by name, kickid by userid or SteamID, with a message;
  • banid bans a SteamID (or a userid) for a number of minutes; 0 makes the ban permanent, and the word kick at the end removes the player right away;
  • addip bans an IP address, with the same minutes rule (banip does exactly the same thing);
  • removeid and removeip lift a ban, listid and listip show the lists;
  • writeid saves permanent SteamID bans to cfg/banned_user.cfg, writeip saves the IP list to cfg/banned_ip.cfg.

Without writeid and writeip, these lists stay in memory and vanish on restart. To reload them at every start, add at the end of server.cfg:

exec banned_user.cfg
exec banned_ip.cfg

An IP ban also hits other people sharing the same connection: prefer the SteamID.

03

Map, password and messages

Server settings are typed in the same console, or written in server.cfg to apply at every start:

hostname "My Garry's Mod server"
sv_password "password"
sv_password ""
gamemode darkrp
changelevel rp_downtown_v4c_v2
say Restart in five minutes
hide_server 1
  • hostname: the name shown in the server list;
  • sv_password: the password required to join; an empty value opens the server to everyone again;
  • gamemode: the gamemode to load, by its folder name. It only takes effect at the next map change;
  • changelevel: switches cleanly to another map, or reloads the current one if you give its name again;
  • say: sends a message to every player from the console;
  • hide_server 1: removes the server from the public list.

Leave sv_allowcslua at 0: at 1, players can run their own client-side Lua scripts, which opens the door to cheating. If a map or gamemode refuses to load, the guide Garry's Mod server errors helps you read the console.

04

ULX: the commands of an admin addon

The engine alone provides no menu, no groups and no teleporting. ULX is not part of Garry's Mod: it is a free addon, installed together with its ULib library (see installing ULX and ULib). Each command comes in two forms: ulx command in a console, !command in chat.

The first rank is given from the server console, to a connected player:

ulx adduser "PlayerName" superadmin
ulx adduserid "STEAM_0:1:12345678" admin
ulx removeuser "PlayerName"

The built-in groups are user, operator, admin and superadmin; ulx addgroup creates more and ulx groupallow grants them commands. Then, in game:

  • Menu: !menu in chat, or ulx menu in the game console;
  • Players: ulx who (players and groups), ulx kick "PlayerName" reason, ulx goto, ulx bring, ulx return, ulx spectate, ulx mute (text chat), ulx gag (voice), ulx jail;
  • Bans: ulx ban "PlayerName" 1d reason (minutes, or h, d, w; 0 for permanent), ulx banid "STEAM_0:1:12345678" 0 reason (superadmin only by default), ulx unban "STEAM_0:1:12345678";
  • Server: ulx map followed by the map and, if needed, the gamemode; ulx votemap2, ulx votekick, ulx voteban for a vote;
  • Help: ulx help lists the commands you are allowed to use.

ULX keeps its bans in its own database: use a single system, ULX or banid, so you never have to look for a banned player in two lists.

05

Common DarkRP commands

DarkRP adds its own commands. They are typed in chat with the / prefix, or in a console with the word DarkRP in front. The old rp_ forms (rp_setmoney, rp_arrest…) are deprecated: they no longer do anything and only show the name of the new command.

/setmoney PlayerName 50000
/addmoney PlayerName 1000
DarkRP setmoney PlayerName 50000
  • Money: setmoney sets the wallet amount, addmoney adds to it. By default, both commands are reserved for superadmins;
  • Jail: /arrest PlayerName 120 arrests a player for a time in seconds, /unarrest PlayerName releases them. You first need at least one cell: /jailpos replaces the jail positions with the spot where you stand, /addjailpos adds one;
  • Jobs: /teamban PlayerName cp 600 bans a player from a job (job name or command, then a time in seconds), /teamunban PlayerName cp lifts it; /setspawn cp replaces a job's spawn points with your position, /addspawn cp adds one. Here, cp is the command of the police job shipped with DarkRP;
  • Moderation: /forcerpname PlayerName New name changes a player's RP name, /forcecancelvote cancels the current vote;
  • Messages: /admintell PlayerName message shows a message on one player's screen, /admintellall message on everyone's.

Apart from money, these commands are open to admins. DarkRP asks the admin addon about rights: with ULX, a group that inherits from admin has access. Job names come from your jobs file (see creating DarkRP jobs), and the gamemode itself is installed with the guide creating a DarkRP server.

06

On a CloudFive server

On our Garry's Mod hosting plans, from €2 per month:

  • The console in the customer area manager.cloudfive.fr is the server console: every engine command, ulx adduser and DarkRP setmoney can be typed there, without RCON;
  • DarkRP, the Workshop collection and ULX install in one click (for addons, see Workshop addons);
  • Files (server.cfg, banned_user.cfg) are edited from the customer area or over SFTP, and backups are restored from the same place.

Servers run in France on our own AS218808 network, on Ryzen 9 9950X with DDR5 and NVMe, with Anti-DDoS Premium included and a profile tuned for Garry's Mod. They are ready in about 30 seconds, billed monthly with no commitment, and support answers in French 7 days a week through tickets and Discord.

07

Frequently asked questions

How do I ban a player on a Garry's Mod server without an addon?

In the server console, type banid followed by a time in minutes, the player's SteamID and the word kick, for example banid 0 STEAM_0:1:12345678 kick for a permanent ban. Then type writeid to save it to banned_user.cfg, otherwise it is lost on restart.

How do I use RCON on Garry's Mod?

Set rcon_password in server.cfg. In the game console, type rcon_password followed by the same password, then rcon followed by the command, for example rcon status. RCON goes over TCP through the game port, 27015 by default.

Is ULX included with Garry's Mod?

No. ULX is a free addon installed together with its ULib library, through the Workshop or in the addons folder. It brings the !menu menu, groups and commands such as ulx ban or ulx goto. At CloudFive, it installs in one click.

Why does rp_setmoney no longer work on DarkRP?

The rp_ commands are deprecated in DarkRP: they only show the name of the new command. Use /setmoney PlayerName amount in chat, or DarkRP setmoney PlayerName amount in the console. By default, you need to be a superadmin.

How do I change the map on a Garry's Mod server?

Type changelevel followed by the map name in the server console. To change the gamemode as well, first type gamemode followed by the gamemode's folder name, then changelevel. With ULX, ulx map does both in one command.

Our plans

Going further.

The plans covered in this guide, hosted in France and protected by our anti-DDoS, with no commitment.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay