Servers & communities

Install a map on a GMod server: FastDL or Workshop

Install a map on a GMod server: put the file in garrysmod/maps, set the start map and serve players via FastDL or Workshop. With troubleshooting.

You install a map by placing the .bsp in garrysmod/maps on the server and setting it as the start map or loading it with changelevel. For players to join, they need the same file. They best get it through FastDL or the Steam Workshop, because the direct download from the game server is very slow.

Step 1: put the map on the server

  1. Upload the .bsp to garrysmod/maps/ via FTP or SFTP. Use lowercase letters throughout the file name. Linux servers are case sensitive.
  2. If more files belong to the map, they go into the matching folders. A .nav also sits in garrysmod/maps/, loose content goes into materials, models or sound. If the content is packed into the BSP, you can skip this step.
  3. Set the map as the start map. In the server's launch line you do that with +map rp_example, and the game mode with +gamemode darkrp. Many hosts offer a field for this in their web panel.
  4. On a running server you switch with changelevel rp_example in the server console or via RCON. The command maps * lists all maps the server finds.

If the server starts with a different map or not at all, the cause is almost always the name or the location: a typo, uppercase letters or the wrong folder. The launch parameter takes the map name without the .bsp extension.

Step 2: how players get the map

Every client needs the BSP locally. There are three ways.

Direct download from the game server

With sv_allowdownload 1 the game server sends the file to the client itself. This works without further setup but is heavily throttled. In addition, net_maxfilesize limits the file size, by default to 16 MB. Raising the value does not make the transfer any faster. For today's RP maps this route is only a fallback.

FastDL through a web server

With FastDL, clients download files via HTTP from a web space. You enter the address in server.cfg:

sv_downloadurl "http://fastdl.example.com/garrysmod/"

This one variable switches FastDL on. sv_allowdownload only governs the direct download from the game server. The web space mirrors the folder structure of the server. So the map has to be reachable at .../garrysmod/maps/rp_example.bsp. Optionally you place a bzip2-compressed version next to it as rp_example.bsp.bz2. The client asks for the compressed file first and unpacks it itself, which shortens the download considerably unless the BSP itself is already compressed.

Test the address in a browser. If the file does not load there, it will not load in game either.

Steam Workshop

If the map exists as a Workshop addon, Steam handles distribution. The server loads its addons through a collection that you specify in the launch line:

+host_workshop_collection 1234567890

If the running map comes from this collection, the server marks it for download by clients on its own. For other Workshop addons with content, such as a texture pack, you enter the addon's ID in a server-side Lua file, for example garrysmod/lua/autorun/server/workshop.lua:

resource.AddWorkshop("9876543210")

The number is the ID from the address of the individual Workshop item, not the ID of the collection.

Pros and cons compared

RouteSpeedEffortAdvantagesDisadvantages
Direct downloadvery slownoneworks immediatelysize limit, long wait, puts load on the game server
FastDLfastweb space and upkeepfull control over the files, no public listing requiredfiles must be maintained twice on every update
Workshopfastlowupdates and distribution through Steam, no web space of your ownmap has to be on the Workshop, mind visibility and license

Many servers combine both: Workshop for freely available addons, FastDL for files that should not be on the Workshop.

Typical errors and their causes

"Missing map 'maps/rp_example.bsp', disconnecting": The client does not have the map and could not download it. Check in order:

  • Without FastDL or Workshop: is sv_allowdownload set to 1?
  • Is sv_downloadurl correct, and is the file there in the maps subfolder?
  • Is the .bz2 current and not corrupted?
  • Has the player switched off downloads? The setting for that is cl_downloadfilter.

"Your map [maps/rp_example.bsp] differs from the server's": Client and server have different files under the same name. The player deletes the old copy from garrysmod/maps or garrysmod/download/maps and reconnects. As an owner you avoid this by giving every map version its own file name and always updating FastDL and server together. The .bz2 is easily forgotten.

Map loads but textures are missing: Then content that is not inside the BSP is missing, or a required game. Help is in fixing missing textures and error models. Mappers will find packing custom content into a BSP useful.

Purchased and protected maps: mind the license

When you buy a map, you usually acquire a right to use it on your own server, not the right to pass the file on publicly. A public Workshop upload makes the map freely available to everyone and is therefore usually not allowed. Read the license terms before you choose a distribution route, and ask the mapper if in doubt. FastDL for the players of your own server is the usual way. The basics are in buying GMod maps safely.

For maps with Server-Exclusive, the split is predefined. Only the protected BSP from the package is distributed, all other files stay private on the licensed server. How the principle works and where its limits are is explained in Server-Exclusive maps.

FAQ

Do I also have to add the map with resource.AddFile?

No. The server offers the currently running map to clients for download on its own. You only need resource.AddFile for loose content that is not packed into the BSP.

FastDL or Workshop: which is better?

For freely available maps the Workshop is the most convenient, because Steam handles distribution and updates. For maps that should not or must not be public, FastDL is the right choice. Both routes are similarly fast for players.

Where does GMod store downloaded maps?

Maps that come from the server or via FastDL are stored on the player's side in garrysmod/download/maps. Workshop content is managed separately by Steam.

Why do players download slowly despite FastDL?

Usually the client does not find the file at the given address. Depending on the server's settings it then gets the file through the slow direct download or not at all. Check spelling, trailing slash and folder structure of sv_downloadurl, and open the file in a browser as a test.