How to Set Up FastDL for a Garry's Mod Server
By default players download custom maps and files straight from your game server, which is slow and can eat into bandwidth. FastDL lets clients fetch those files from a normal web server instead.
How it works
You host a copy of your custom content on a web host, then tell the server where it is. When a player joins, the game checks the content list and downloads from your web address.
Server settings
Add these to garrysmod/cfg/server.cfg:
- sv_downloadurl "http://your-host/garrysmod/"
- sv_allowdownload 1
The URL must point to a folder whose layout mirrors the game folder, so a file at garrysmod/maps/mymap.bsp should be reachable at your URL followed by maps/mymap.bsp. Make sure the address ends with a slash.
Folder layout
- Create folders on the web host named maps, materials, models, sound and lua as needed.
- Upload your custom files into the matching folders.
- Open a file URL in a browser to confirm it downloads.
Compression
Source engine FastDL traditionally expects files compressed with bzip2 and given a .bz2 extension, for example mymap.bsp.bz2. Uncompressed files can still work on many setups, but compressed files download faster. Keep the original and compressed names consistent.
Tell the game which files to send
Content only downloads if the server lists it. Use resource.AddFile in a Lua file under garrysmod/lua/autorun/server/ for each file, for example the full path of your map or model. For Workshop addons use resource.AddWorkshop with the item ID instead, which does not require FastDL at all.
Troubleshooting
- Players still download slowly: the URL is wrong or the file is missing on the web host. Test it in a browser.
- Players see ERROR models: the file is not listed with resource.AddFile or not uploaded.
- Do not host the files on the game server itself; use a separate web host.
- Restart the server after editing server.cfg.