Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

Why FastDL

To see a model, texture, sound or map, a player must have the file locally. Otherwise they see purple and black checkerboards and red ERROR models. Lua code is not affected: according to the official Garry's Mod wiki, it is sent through a separate mechanism, with no setup needed.

The wiki describes three ways to serve content, from fastest to slowest:

  • The Workshop: the player downloads the addon from Steam at full speed. The content must be published on the Workshop and declared with resource.AddWorkshop.
  • FastDL: the player downloads files one by one from a web server, at the speed of their connection. You need web hosting, sv_downloadurl and resource.AddFile.
  • Downloading from the game server: capped at 64 KB/s, it requires sv_allowdownload 1. The wiki calls it obsolete and warns that it exposes the server to abuse: modified clients can flood it with file requests to slow it down.

FastDL is therefore the answer for everything you cannot, or do not want to, publish on the Workshop.

02

Workshop first

Before setting up FastDL, move everything you can to the Workshop. It is faster for players, and Steam keeps the content cached between visits. The method (collection, +host_workshop_collection, a workshop.lua file with resource.AddWorkshop) is in the guide Workshop addons on a GMod server.

Two notes from the official wiki:

  • only declare addons that contain content; Lua-only addons just make loading longer;
  • a file received through FastDL does not count as a Workshop addon: if you move a map from FastDL to the Workshop, players download it a second time.

So do not put the same content in both places: pick one channel per file.

03

Preparing the files

Folder tree. FastDL uses paths relative to the garrysmod folder: maps/, materials/, models/, sound/, resource/. Watch out for addons installed in garrysmod/addons/: the game mounts them as if they were at the root. A file at addons/monaddon/materials/logo.vmt therefore goes on FastDL as materials/logo.vmt, without addons/monaddon/.

Compression. The player first asks for the .bz2 version of a file, then the normal file if it does not exist. Compress each file while keeping its full name: ma_carte.bsp becomes ma_carte.bsp.bz2. On Linux, the -k option keeps the original:

cd ~/fastdl
find maps materials models sound resource -type f ! -name "*.bz2" -exec bzip2 -k {} \;

On Windows, 7-Zip can create files in bzip2 format. Maps, often large, gain the most.

Declaring. The server must tell players which files to download. Create garrysmod/lua/autorun/server/fastdl.lua:

resource.AddFile("maps/ma_carte.bsp")
resource.AddFile("materials/macommunaute/logo.vmt")
resource.AddFile("models/macommunaute/caisse.mdl")
resource.AddFile("sound/macommunaute/annonce.wav")
  • resource.AddFile also adds related files: the .vtf of a .vmt, and the .vvd, .phy, .vtx files of a .mdl. For a single file, use resource.AddSingleFile.
  • Never write .bz2 in the path, and keep the sound folder without an "s".
  • The file must also exist on the game server, otherwise it is not added.
04

Setting sv_downloadurl and sv_allowdownload

Upload the files to web hosting, in a dedicated folder or subdomain (for example fastdl.votre-domaine.fr). The web side, with HTTPS, is covered in the guide web hosting for a GMod server.

Then set the address in garrysmod/cfg/server.cfg and restart the server:

sv_downloadurl "https://fastdl.votre-domaine.fr"

With this setting, a player missing materials/macommunaute/logo.vmt requests https://fastdl.votre-domaine.fr/materials/macommunaute/logo.vmt.bz2, then, failing that, the file without .bz2. Opening that address in a browser is therefore the best test: if it returns a 404 error, the player will receive nothing.

What about sv_allowdownload? The official wiki ties it to direct downloads from the game server, which are slow and open to abuse. Once your FastDL is in place, try sv_allowdownload 0: if a player who does not have the files yet still receives them, keep that setting.

05

Common errors

  • Missing files: the file is not declared with resource.AddFile, not uploaded to FastDL, or uploaded to the wrong path (with addons/monaddon/ in front, for example). Test its full address in a browser.
  • Wrong case: a Linux web server treats Logo.vmt and logo.vmt as different files. The path on FastDL must match the declared one letter for letter. The safest choice is to name everything in lowercase.
  • A changed file never updates for players: according to the wiki, the game does not check the contents of FastDL files. A player who already has a file does not download it again. Rename the file when you change its contents.
  • Players who receive nothing: in the game settings, each player can limit which file types they accept to download. Mention it on your loading screen or your Discord.
  • A list that is too long: all resource.Add* functions share a limit of 8192 files. Long before that limit, loading becomes painful: move the bulk of the content to the Workshop.
  • Lua error at startup in fastdl.lua: resource.AddFile reports each related file it cannot find on the server. Read the console, then add the missing files or fix the paths.

A server loaded with custom content also slows down at startup and in game: the guide optimise a Garry's Mod server covers the other levers.

06

On CloudFive

With CloudFive's Garry's Mod hosting, from €2 per month, the Workshop collection, DarkRP and ULX are installed in one click from the customer area manager.cloudfive.fr: the Workshop then covers most of your content. For the rest, the fastdl.lua file and server.cfg are edited with the file manager or over SFTP, and the console shows Lua errors live.

  • servers in France, on AMD Ryzen 9 9950X, DDR5 memory and NVMe storage;
  • Anti-DDoS Premium included, with a profile specific to the game (see protect a game server from DDoS attacks);
  • backups from the customer area, monthly with no commitment, and French-speaking support 7 days a week.

To start from scratch, see create a Garry's Mod server; for an RP server heavy on models, create a DarkRP server.

07

Frequently asked questions

What is FastDL in Garry's Mod?

It is a web server that gives players the content missing from the Workshop, such as a private map or custom sounds. Players download it at the speed of their connection, instead of the 64 KB/s of downloads from the game server.

How do I set sv_downloadurl in Garry's Mod?

Add sv_downloadurl followed by the web folder's address in quotes to garrysmod/cfg/server.cfg, then restart. The web folder must mirror the garrysmod tree (maps, materials, models, sound) and the files must be declared with resource.AddFile.

Should FastDL files be compressed as .bz2?

It is recommended: the player first asks for the .bz2 version of a file, then the normal file if it is missing. Compressed files are smaller, which mostly shortens map downloads. Keep the full name, for example ma_carte.bsp.bz2.

Why don't players download the files from my FastDL?

Check that each file is declared with resource.AddFile and exists on the game server and on FastDL at the same path, with the same case and without addons/addon-name in front. Open the file's address in a browser: a 404 error points to the problem.

Does FastDL replace the Workshop in Garry's Mod?

No. The Workshop remains faster and simpler for any content you can publish: a collection and resource.AddWorkshop. FastDL is for content you cannot or do not want to publish on the Workshop.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay