Garry's Mod guide

Garry's Mod ULX and ULib Admin Guide: Groups, Ranks and Commands

By the ChicagoServers team · Updated · 7 min read

After installing ULX and ULib, your first job is to make yourself a superadmin from the server console with ulx adduserid "STEAM_0:X:YYYYYY" superadmin. From there you can manage ranks with ulx adduser, tune what each group can do, and moderate with ulx kick, ulx ban, ulx goto and ulx bring.

Command names and defaults below were read from the ULX and ULib source on GitHub (ULX v3.81 and ULib 2.71 are the latest releases, from March 2024). ULib is required by ULX, and a full server restart is needed after installing, not just a map change.

Quick answer
  • Install ULib (Workshop 557962238) and ULX (Workshop 557962280), then restart the server fully.
  • Make the first superadmin from the server console: ulx adduserid "STEAM_0:X:YYYYYY" superadmin. In-game chat commands only work once someone already has the rank.
  • Default groups form a chain: operator then admin then superadmin, and user for everyone else.
  • Use ulx menu for the XGUI interface and ulx help for a command list.
  • Targets accept keywords: * everyone, ^ yourself, @ whoever you are aiming at, %group a group, and ! to negate.
On this page
  1. Install ULib and ULX
  2. Make your first superadmin
  3. Groups, ranks and inheritance
  4. Everyday moderation commands
  5. Target keywords
  6. Troubleshooting ULX
  7. Frequently asked questions
  8. References

Install ULib and ULX

ULX is the admin mod and ULib is the library it depends on. Both are on the Workshop, so the simplest route is to add them to your server's Workshop collection: ULib is item 557962238 and ULX is item 557962280. The README also supports the classic route of extracting into garrysmod/addons/.

Restart the server completely. Once it is up, run ulx help in the console to confirm ULX is loaded. Hosting with ChicagoServers? The Garry's Mod server hosting page lists what is included, such as Steam Workshop collection support, free server backups and SFTP file access.

Make your first superadmin

Console commands run from the server console have full access, so that is where you bootstrap the first superadmin. You need the player's SteamID in STEAM_0:X:YYYYYY form. Players can find theirs by running status in their own console while connected, and ulx who shows information about the users currently online.

By SteamID (works when the player is offline)
ulx adduserid "STEAM_0:1:123456" superadmin
By name (player must be connected)
ulx adduser "PlayerName" superadmin

ulx adduserid accepts a SteamID, an IP or a UniqueID and validates the format; a malformed ID returns an error rather than adding a broken entry. Both commands default to superadmin access, so a regular admin cannot promote people.

Groups, ranks and inheritance

ULib's access control list ships with four groups. Current source defines them as below, with each rank inheriting from the one beneath:

GroupInherits fromCan target
usernoneno moderation targets by default
operatornoneeveryone except admins and above
adminoperatoreveryone except superadmins
superadminadmineveryone

Targeting limits mean an admin cannot kick or ban a superadmin by default. Groups and users are stored in garrysmod/data/ulib/groups.txt and users.txt. You manage them with these commands:

CommandSyntaxDefault access
Add user to groupulx adduser <player> <group> or ulx adduserid <steamid|ip|uniqueid> <group>superadmin
Remove all accessulx removeuser <player> or ulx removeuserid <id>superadmin
Create a groupulx addgroup <group> [inherits from] (inherits from user if omitted)superadmin
Rename or delete a groupulx renamegroup <current> <new>, ulx removegroup <group>superadmin
Group permissionulx groupallow <group> <command> [access tag], ulx groupdeny <group> <command>superadmin
Per-user permissionulx userallow <player> <command> [access tag], ulx userdeny <player> <command> [remove]superadmin
Limit who a group can targetulx setgroupcantarget <group> [target string]superadmin

ULib refuses to rename or remove user, admin and superadmin. A moderator rank is easy to make; this one inherits the admin rank and then grants one extra command:

ulx addgroup moderator admin
ulx groupallow moderator "ulx banid"
ulx adduserid "STEAM_0:0:987654" moderator

Everyday moderation commands

These come straight from the ULX modules. Most also work as chat commands with a ! prefix, such as !kick or !goto.

TaskSyntaxDefault access
Kickulx kick <player> [reason]admin
Ban online playerulx ban <player> [minutes, 0 = permanent] [reason]admin
Ban by SteamIDulx banid <steamid> [minutes] [reason]superadmin
Unbanulx unban <steamid>admin
Teleport to a playerulx goto <player>admin
Bring player(s) to youulx bring <players>admin
Send one player to anotherulx send <player> <player>admin
Return after teleportulx return [player]admin
Change mapulx map <map> [gamemode]admin
Mute text chat / voiceulx mute <players>, ulx gag <players>, with ulx unmute and ulx ungagadmin
Freeze / slay / slapulx freeze, ulx slay, ulx slapadmin
Run a console commandulx rcon <command>superadmin

Ban durations accept plain minutes or a time string using h, d, w and y, for example ulx ban "PlayerName" 1d "cheating" for one day. Quote any name that contains spaces.

Target keywords

Anywhere a command takes players, ULib accepts keywords as well as names. Combine them with commas:

KeywordMeaning
*All players
^Yourself
@The player you are looking at
#groupPlayers whose group is exactly that group
%groupPlayers in that group, counting inheritance
$idPlayers matching a particular ID
! prefixNegates the keyword, so !^ means everyone but you

For example, ulx freeze * freezes everyone and ulx bring !^ would bring everyone but you, subject to what your group is allowed to target.

Troubleshooting ULX

  • Commands do not exist: ULib must load first, and the server must have been fully restarted after installing.
  • Added a user but it was rejected: use the exact STEAM_0:X:Y format and an existing group name. Invalid IDs and unknown groups are refused with an error message.
  • DarkRP: ULX has disabled its UTeam feature under DarkRP gamemodes since v3.72 to avoid conflicts, so use DarkRP's own job tools for teams.
  • Lost access: use the server console to run ulx adduserid again. As a last resort, ulx resettodefaults resets all ULX and ULib configuration (from v3.81 it also resets bans and users stored in SQLite), so use it only if you intend to start over.

Frequently asked questions

How do I make myself admin with ULX?

From the server console, run ulx adduserid "STEAM_0:X:YYYYYY" superadmin with your own SteamID, or ulx adduser "YourName" superadmin if you are connected. In-game commands only work after someone already has superadmin.

What is the difference between ulx ban and ulx banid?

ulx ban targets a connected player and defaults to admin access. ulx banid takes a SteamID, so it works on players who are offline, and it defaults to superadmin access.

Where does ULX store admins and groups?

In garrysmod/data/ulib/users.txt and groups.txt, managed through ULX commands or the XGUI menu. Avoid hand-editing them on a running server.

Do I need ULib to run ULX?

Yes. ULib is a required library for ULX, and both are on the Steam Workshop. A full restart is required after installing.

References