Video coming soon…

🔨 Setup Garry's Mod Server — Sandbox Multiplayer

Dedicated GMod server for sandbox gameplay with custom gamemodes and Workshop addons

⚠️ This script is provided for demo and testing purposes only. Not intended for production use.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install script — Garry's Mod server running in one command.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/gaming/garrys-mod/garrys-mod-ubuntu.sh
chmod +x garrys-mod-ubuntu.sh
sudo bash garrys-mod-ubuntu.sh

Tutorial Steps

1 Download & Run the Installer

The script installs Docker, pulls the GMod dedicated server image via SteamCMD, and starts the container. The server downloads ~1.5 GB of game files and runs on port 27015 UDP.

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/gaming/garrys-mod/garrys-mod-ubuntu.sh
chmod +x garrys-mod-ubuntu.sh
sudo bash garrys-mod-ubuntu.sh

2 Configure the Server

Edit server.cfg to set hostname, gamemode, max players, and server password. Choose from sandbox, darkrp, terrortown, prophunt, and more.

# Edit server configuration
nano /opt/garrysmod/data/garrysmod/cfg/server.cfg

# Key settings:
# hostname "My GMod Server"
# gamemode "sandbox"           // or darkrp, terrortown, etc.
# maxplayers 32
# sv_password ""               // leave empty for public
# sv_allowupload 1
# sv_allowdownload 1

3 Connect with the Game Client

Open GMod, click Find Multiplayer Game, search by server name in the Community tab, or use the developer console to connect directly.

# In-game console (press ~):
connect <your-server-ip>:27015

4 Admin Management

Install ULX admin mod for comprehensive server management. Use RCON commands for remote administration and monitor server logs for issues.

# Connect via RCON
docker exec -it garrysmod-server rcon-cli --port 27015 --password yourrconpass

# ULX in-game commands:
# ulx adduser <name> superadmin
# ulx kick <name> <reason>
# ulx ban <name> <minutes> <reason>
# ulx noclip <name>

# View live logs
docker logs -f garrysmod-server

Ports Used

PortPurpose
27015 UDPGame traffic and Steam query

Overview

Garry's Mod (GMod) is a sandbox physics game built on the Source engine where players manipulate objects and experiment with physics. A dedicated server hosts custom game modes like DarkRP, TTT (Trouble in Terrorist Town), Prop Hunt, and many more, all powered by Lua addons from the Steam Workshop.

Why Use It

Self-hosting a GMod server gives you full control over addons, game mode, player count, admin tools, and server rules. Popular community servers require custom addon combinations, workshop collections, and ULX admin mod that are only possible with a dedicated server.

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              GMod uses UDP port 27015 for game connections. Open UDP port 27015. For FastDL, you need a separate web server on port 80 or 443. RCON uses TCP port 27015 — keep this firewalled.

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    Alternatives include popular community servers (no setup needed), FiveM (GTA V mod, similar concept), and other Source game servers. Self-hosting GMod gives full control over the addon ecosystem and community rules.

                    When Not to Use It

                    Avoid self-hosting GMod if you just want to play with friends casually — use the built-in friend invite system. Self-hosting is best when building a community server with specific addons, game modes, and an established player base.

                    PrismaTechWork Professional Help

                    PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.

                      Contact Us

                      Frequently Asked Questions

                      What is DarkRP and how do I set it up?

                      DarkRP is the most popular Garry's Mod game mode — a roleplay framework where players take jobs, earn money, buy properties, and interact in a simulated society. Install DarkRP from GitHub, configure jobs and salaries in DarkRP configuration files, and add addon packages for weapons, vehicles, and custom jobs from the Workshop.

                      What is ULX and why do I need it?

                      ULX (Ultimate Lua Extensions) is the standard admin mod for Garry's Mod servers. It provides a permission hierarchy (superadmin, admin, user), admin commands for kicking and banning players, access control lists, and a menu for GUI-based moderation. Install ULX and ULIB from the Workshop — almost all community servers use them.

                      How do Workshop addons work on a GMod server?

                      Add Workshop addon IDs or a collection ID to your server configuration. The server downloads addons via Steam and mounts them. Clients connecting to the server are prompted to download and subscribe to the same Workshop items. For faster client downloads, set up FastDL to serve addon content via HTTP.

                      What is FastDL and how do I set it up?

                      FastDL (Fast Download) is a web server that serves custom maps, sounds, and other game content to clients faster than the in-game download. Set up a web server (Nginx or Apache) serving the garrysmod content directory. Set sv_downloadurl in server.cfg to the web server URL. Clients then download content at full bandwidth speed.

                      How many players can a GMod server support?

                      GMod supports up to 128 players per server, though most servers run 30 to 64. Performance depends heavily on the game mode and addons — DarkRP with many active players and complex jobs can be CPU-intensive. For DarkRP with 50 players, use 4 CPU cores and 4 GB RAM minimum.

                      Can I run multiple game modes on the same server?

                      No — a GMod server runs one game mode at a time. To host multiple game modes, run separate server instances on different ports. Many communities run separate servers for each game mode (one for DarkRP, one for TTT) and use a website lobby to direct players.

                      What are Lua errors and how do I debug them?

                      Lua errors appear in the server console when addon scripts contain bugs or conflicts. Check the console log for error lines showing the file and line number. Common causes: outdated addons that reference removed functions, conflicting addons that override the same functions, and DarkRP configuration mistakes. Update or remove problematic addons.

                      How do I add custom sounds and music to my server?

                      Place sound files in the garrysmod/sound directory and reference them in Lua scripts. For client-side sounds, configure the sound files in Workshop addons and set up FastDL so clients download them. Custom ambient music and notification sounds are a common customization for DarkRP servers.