01
Why a GMod server needs web space
The game server runs the match. Three things, however, work better elsewhere, on web hosting:
- fast download (FastDL): content that is not on the Workshop, such as a private map or custom sounds and textures, is downloaded by players from a web address rather than from the game server, which is much slower;
- the loading screen: a web page shown while the player connects;
- the community website: rules, staff recruitment, links to the Discord and the Workshop collection.
None of this needs a VPS: web hosting with a domain name and HTTPS is enough.
02
The Workshop first, FastDL second
Before setting up a FastDL, check what can go through the Steam Workshop. An addon published on the Workshop is downloaded by the player on connection, from a collection or from resource.AddWorkshop in a server-side Lua file. It is the simplest and fastest way.
FastDL is for the rest: content you cannot, or do not want to, publish on the Workshop. These files are announced to players with resource.AddFile, then served from the FastDL web address.
03
Setting up FastDL
- Create a dedicated folder on the web hosting, for example
fastdl, or a subdomain such as fastdl.your-domain.com.
- Copy the files to download into it with the same folder structure as in the server's
garrysmod folder: maps/, materials/, models/, sound/, resource/.
- Compress each file to
.bz2, keeping its original name (my_map.bsp becomes my_map.bsp.bz2): the game recognises this format, and maps download much faster.
- In
server.cfg, set the address: sv_downloadurl "https://fastdl.your-domain.com/", then restart the server.
If a player gets stuck on a file, open its full address in a browser: a 404 error almost always points to a folder or file name copied wrongly, letter case included.
04
A custom loading screen
The loading screen is an ordinary web page, declared in server.cfg with sv_loadingurl. The game shows it during connection and passes it information: %s in the address is replaced by the player's SteamID64, %m by the map name. For example: sv_loadingurl "https://your-domain.com/loading/?steamid=%s&map=%m".
A few tips to keep it pleasant:
- keep the page light: it loads at the same time as the game, and a heavy video slows everything down;
- serve it over HTTPS;
- show what really helps: the rules in a few lines, the Discord address, the current map.
05
The community website
The same hosting holds the community website: a WordPress for announcements and rules, a recruitment page, a list of addons. If an addon on the server has to read or write to a remote database, check that your host allows external connections to the database, or install the database as close as possible to the game server.
E-mail boxes on your domain name are useful too: a contact or recruitment address inspires more trust than a personal one.
06
With CloudFive
Our web hosting covers these three uses: a Let's Encrypt SSL certificate installed and renewed automatically, SSD storage, databases and e-mail boxes depending on the plan, WordPress installed from the customer area. The WEB-1 plan is enough for a FastDL and a loading screen; WEB-2 or WEB-3 if you manage several domains.
The game server itself is ordered on the Garry's Mod page, with the Workshop collection, gamemode and ULX set from the same customer area. To start from scratch: the guide create a Garry's Mod server.
07
Frequently asked questions
Do I need web hosting for a Garry's Mod server?
No, it is not mandatory. It becomes useful for fast download (FastDL) of content that is not on the Workshop, for a custom loading screen and for the community website.
How do I configure sv_downloadurl?
In server.cfg, set the address of the web folder holding the files, with the same structure as the garrysmod folder (maps, materials, models, sound) and a trailing slash, then restart the server.
Why compress FastDL files to .bz2?
The game can decompress .bz2 files: players download smaller files, which clearly speeds up connection, especially for maps.
What do %s and %m mean in sv_loadingurl?
The game replaces %s with the SteamID64 of the connecting player and %m with the map name. The loading page can then show a personalised message or the current map.