Garry's Mod ULX and ULib Admin Guide: Groups, Ranks and Commands
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.
- 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:
operatorthenadminthensuperadmin, anduserfor everyone else. - Use
ulx menufor the XGUI interface andulx helpfor a command list. - Targets accept keywords:
*everyone,^yourself,@whoever you are aiming at,%groupa group, and!to negate.
On this page
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.
ulx adduserid "STEAM_0:1:123456" superadminulx adduser "PlayerName" superadminulx 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:
| Group | Inherits from | Can target |
|---|---|---|
user | none | no moderation targets by default |
operator | none | everyone except admins and above |
admin | operator | everyone except superadmins |
superadmin | admin | everyone |
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:
| Command | Syntax | Default access |
|---|---|---|
| Add user to group | ulx adduser <player> <group> or ulx adduserid <steamid|ip|uniqueid> <group> | superadmin |
| Remove all access | ulx removeuser <player> or ulx removeuserid <id> | superadmin |
| Create a group | ulx addgroup <group> [inherits from] (inherits from user if omitted) | superadmin |
| Rename or delete a group | ulx renamegroup <current> <new>, ulx removegroup <group> | superadmin |
| Group permission | ulx groupallow <group> <command> [access tag], ulx groupdeny <group> <command> | superadmin |
| Per-user permission | ulx userallow <player> <command> [access tag], ulx userdeny <player> <command> [remove] | superadmin |
| Limit who a group can target | ulx 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" moderatorEveryday moderation commands
These come straight from the ULX modules. Most also work as chat commands with a ! prefix, such as !kick or !goto.
| Task | Syntax | Default access |
|---|---|---|
| Kick | ulx kick <player> [reason] | admin |
| Ban online player | ulx ban <player> [minutes, 0 = permanent] [reason] | admin |
| Ban by SteamID | ulx banid <steamid> [minutes] [reason] | superadmin |
| Unban | ulx unban <steamid> | admin |
| Teleport to a player | ulx goto <player> | admin |
| Bring player(s) to you | ulx bring <players> | admin |
| Send one player to another | ulx send <player> <player> | admin |
| Return after teleport | ulx return [player] | admin |
| Change map | ulx map <map> [gamemode] | admin |
| Mute text chat / voice | ulx mute <players>, ulx gag <players>, with ulx unmute and ulx ungag | admin |
| Freeze / slay / slap | ulx freeze, ulx slay, ulx slap | admin |
| Run a console command | ulx 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:
| Keyword | Meaning |
|---|---|
* | All players |
^ | Yourself |
@ | The player you are looking at |
#group | Players whose group is exactly that group |
%group | Players in that group, counting inheritance |
$id | Players matching a particular ID |
! prefix | Negates 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:Yformat 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 adduseridagain. As a last resort,ulx resettodefaultsresets 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.