How to Set Up a FiveM Server: Step-by-Step Guide
Complete FiveM server setup guide on REXE VDS: installation, txAdmin configuration, port settings, and performance optimization tips for GTA V roleplay servers.
GMod dedicated server setup, gamemode configuration, addon/workshop collection, FastDL, ULX admin mod, and server optimization.
Garry's Mod (GMod) is a sandbox game built on the Source Engine that offers unlimited creative possibilities. With gamemodes like DarkRP, TTT (Trouble in Terrorist Town), Sandbox, and many more, you can build your own community server. This guide covers the complete GMod dedicated server setup on your REXE VDS.
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 Cores | 4+ Cores |
| RAM | 4 GB | 8+ GB |
| Disk | 20 GB SSD | 40+ GB NVMe |
| OS | Ubuntu 22.04+ | Ubuntu 22.04 LTS |
| Bandwidth | 5 Mbps | 10+ Mbps |
RAM requirements vary based on the number of addons installed and player capacity. DarkRP servers typically require more RAM.
Connect to your server via SSH and install required packages:
sudo apt update && sudo apt upgrade -y
sudo apt install -y lib32gcc-s1 lib32stdc++6 wget tar screen
Create a dedicated user:
sudo adduser gmod --disabled-login --gecos ""
sudo su - gmod
mkdir -p ~/steamcmd && cd ~/steamcmd
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzf steamcmd_linux.tar.gz
rm steamcmd_linux.tar.gz
./steamcmd.sh +quit
~/steamcmd/steamcmd.sh +force_install_dir ~/gmod-server \
+login anonymous \
+app_update 4020 validate \
+quit
App ID 4020 is the Steam ID for Garry's Mod Dedicated Server. The download is approximately 4-5 GB.
Many GMod gamemodes require CSS content:
~/steamcmd/steamcmd.sh +force_install_dir ~/css-content \
+login anonymous \
+app_update 232330 validate \
+quit
Mount CSS content to the GMod server:
nano ~/gmod-server/garrysmod/cfg/mount.cfg
"mountcfg"
{
"cstrike" "/home/gmod/css-content/cstrike"
}
A GSLT token is required for your server to appear in the server browser:
Create a separate GSLT token for each server. Never share your token.
nano ~/gmod-server/garrysmod/cfg/server.cfg
hostname "My REXE GMod Server"
rcon_password "STRONG_RCON_PASSWORD"
sv_password ""
sv_defaultgamemode "sandbox"
sv_maxrate 0
sv_minrate 100000
sv_maxupdaterate 66
sv_minupdaterate 33
sv_timeout 120
sv_region 3
sv_lan 0
sv_allowdownload 1
sv_allowupload 0
net_maxfilesize 64
log on
| Gamemode | Description | sv_defaultgamemode |
|---|---|---|
| sandbox | Free build mode | sandbox |
| darkrp | Roleplay game | darkrp |
| terrortown | TTT - Detective game | terrortown |
| prophunt | Hide and seek | prop_hunt |
| murder | Murder mystery | murder |
| deathrun | Trap parkour | deathrun |
nano ~/gmod-server/start.sh
#!/bin/bash
cd ~/gmod-server
./srcds_run \
-game garrysmod \
-port 27015 \
-maxplayers 32 \
+gamemode sandbox \
+map gm_construct \
+sv_setsteamaccount GSLT_TOKEN \
-tickrate 33 \
+host_workshop_collection COLLECTION_ID \
-authkey STEAM_API_KEY
chmod +x ~/gmod-server/start.sh
Manage addons via Steam Workshop collections:
Get your API key from steamcommunity.com/dev/apikey.
In the startup script:
+host_workshop_collection COLLECTION_ID \
-authkey STEAM_API_KEY
For client-side auto-download, create lua/autorun/server/workshop.lua:
-- Force clients to download workshop addons
resource.AddWorkshop("ADDON_ID_1")
resource.AddWorkshop("ADDON_ID_2")
resource.AddWorkshop("ADDON_ID_3")
FastDL enables faster downloads of custom content:
sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/fastdl
server {
listen 8080;
server_name SERVER_IP;
location /garrysmod/ {
alias /home/gmod/gmod-server/garrysmod/;
autoindex on;
}
}
sudo ln -s /etc/nginx/sites-available/fastdl /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
Add to server.cfg:
sv_downloadurl "http://SERVER_IP:8080/garrysmod/"
sv_allowdownload 1
FastDL allows players to download custom content much faster when connecting to your server.
ULX is the most popular admin mod for GMod servers:
cd ~/gmod-server/garrysmod/addons
git clone https://github.com/TeamUlysses/ulib.git
git clone https://github.com/TeamUlysses/ulx.git
After restarting the server, in-game:
ulx adduserid STEAM_ID superadmin
ulx ban PLAYER_NAME 0 "Reason"
ulx kick PLAYER_NAME "Reason"
ulx noclip PLAYER_NAME
| Port | Protocol | Usage |
|---|---|---|
| 27015 | TCP + UDP | GMod game server |
| 27005 | UDP | Client port |
| 27020 | UDP | SourceTV |
| 8080 | TCP | FastDL (optional) |
From the REXE Path Panel:
sudo nano /etc/systemd/system/gmod.service
[Unit]
Description=Garry's Mod Dedicated Server
After=network.target
[Service]
Type=simple
User=gmod
Group=gmod
WorkingDirectory=/home/gmod/gmod-server
ExecStart=/home/gmod/gmod-server/start.sh
Restart=on-failure
RestartSec=15
LimitNOFILE=100000
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable gmod
sudo systemctl start gmod
DarkRP is the most popular GMod gamemode:
cd ~/gmod-server/garrysmod/gamemodes
git clone https://github.com/FPtje/DarkRP.git darkrp
cd ~/gmod-server/garrysmod/addons
git clone https://github.com/FPtje/darkrpmodification.git
Update server.cfg:
sv_defaultgamemode "darkrp"
-tickrate 33 # Standard (recommended)
-tickrate 66 # High performance (requires more CPU)
lua_log_sv 0
sv_hibernate_think 1
gmod_physiterations 2
nano ~/update_gmod.sh
#!/bin/bash
~/steamcmd/steamcmd.sh +force_install_dir ~/gmod-server +login anonymous +app_update 4020 +quit
chmod +x ~/update_gmod.sh
crontab -e
0 5 * * * /home/gmod/update_gmod.sh >> /home/gmod/update.log 2>&1
With a Garry's Mod dedicated server, you can create a community server with unlimited creative possibilities. Workshop collections, ULX admin mod, FastDL, and DarkRP bring your server to a professional level. REXE VDS powerful infrastructure provides ideal performance for your GMod server.
Not mandatory, but many gamemodes and maps require CSS content. Without CSS, players will see purple-black squares (missing textures).
Create a new collection on Steam Workshop, add addons, and use the collection ID in the startup script with +host_workshop_collection parameter.
Download the DarkRP gamemode from GitHub to the gamemodes folder, install the DarkRP Modification addon, and set the gamemode to darkrp in server.cfg.
FastDL allows players to download custom content via HTTP when connecting to your server. It can be set up with Nginx or Apache.
Clone ULib and ULX from GitHub into the addons folder. After server restart, use the ulx adduserid command to make yourself superadmin.
33 tickrate is recommended for standard servers. 66 tickrate can be used for competitive servers but requires more CPU resources.
Complete FiveM server setup guide on REXE VDS: installation, txAdmin configuration, port settings, and performance optimization tips for GTA V roleplay servers.
Complete Minecraft server setup guide on REXE VDS: Paper/Spigot installation, Java configuration, plugin management, and performance optimization for stable gameplay.
Complete CS2 dedicated server setup guide on REXE VDS: SteamCMD installation, GSLT token, server configuration, game modes, and DDoS protection with Path Panel.