How to Host a GMod Server: A Complete Guide for Beginners

How to Host a GMod Server: A Complete Guide for Beginners

Setting up a dedicated Garryโ€™s Mod server can enhance your gaming experience by allowing you to play with friends and customize your game environment.

Prerequisites

To set up a private Garryโ€™s Mod host, you need a virtual private server (VPS) with sufficient resources. While there are no official minimum requirements, we recommend a system with at least a multi-core CPU, 4 GB of RAM, and 10 GB of storage space. You must be able to access the server remotely using an SSH client like PuTTY or Terminal and ideally understand basic Linux commands and system management. Alternatively, use Hostinger Game Panel hosting, which lets you easily install and maintain a dedicated server for various games without commands.

How to Make a GMod Server Using <a href=โ€https://hostinger.com?REFERRALCODE=1CRYPTO99โ€ณ rel=โ€sponsored noopenerโ€ target=โ€_blankโ€>Hostinger</a> Game Panel

The Hostinger Game Panel allows you to set up and manage a dedicated server for games easily. This method saves time and minimizes errors by eliminating command-line operations.

After purchasing a plan, complete the onboarding tasks like setting a new password and selecting a data center. Choose the closest one to your player base for minimal latency. The Hostinger Game Panel hosting is instantly ready after onboarding. Follow these steps to install a Garryโ€™s Mod host:

  • Log in to hPanel and click VPS at the sidebar.
  • Click Manage on your Game Panel hosting.
  • In the VPS Overview menu, click Manage panel.
  • Enter account details and hit Login.
  • Click Create new instance.
  • Select Garryโ€™s Mod from the application list and hit Create Instance.
  • Double-click the new instance and go to Configurations โ†’ Security and Privacy โ†’ Generic Config.
  • Select the server IP address with eth0, preferably an IPv4 address like 185.185.185.185.
  • Return to your instance and hit Start.

During the first launch, wait until Game Panel downloads the component files. This process should take a few minutes, depending on your internet connection. Once ready, connect to your Garryโ€™s Mod dedicated server:

  • Double-click your Garryโ€™s Mod instance and obtain the endpoint from the Connection info section.
  • Open the Steam client and start Garryโ€™s Mod.
  • Open the command console by hitting the tilde (~) button on your keyboard.
  • Enter the command: connect 185.185.185.185:27015, replacing the IP and port with your endpoint.

Change server settings by double-clicking your Garryโ€™s Mod instance โ†’ Sidebar โ†’ Configuration in the Hostinger Game Panel without commands.

How to Manually Host a Garryโ€™s Mod Server

Hosting a GMod server manually is more complex but allows for different software or operating systems. This tutorial uses Debian 12.

1. Connect via SSH and Create a User

Connect to your VPS using PuTTY, Terminal, or Browser terminal. Log in as root, then create a superuser to minimize risks:

adduser gmod-admin

Enter a password and details, then add the user to the sudo group:

usermod -a -G sudo gmod-admin

Switch to the new user:

su gmod-admin

Change to the new userโ€™s directory using cd.

2. Download and Install SteamCMD

SteamCMD is the command-line version of the Steam game client. Install it on your system:

  • Install dependencies:
sudo apt install software-properties-common gcc-multilib
  • Enable the non-free repository:
sudo add-apt-repository non-free
  • Enable support for the 32-bit package:
sudo dpkg --add-architecture i386
sudo apt update -y
  • Install SteamCMD and libraries:
sudo apt install steamcmd libtinfo5:i386 libncurses5:i386 -y
  • Confirm installation by running:
steamcmd

If your command line changes to Steam>, SteamCMD is running properly.

3. Download GMod Server Files

Within SteamCMD, install GMod server components:

  • Optional: Change directory for installation.
force_install_dir path/to/dir
  • Login anonymously:
login anonymous
  • Download server files:
app_update 4020
  • Exit SteamCMD:
quit

By default, components are in Steam/steamapps/common/GarrysModDS. Update components with app_update, but note it may overwrite settings.

4. Configure the Server

Install a text editor like Nano to edit server.cfg:

sudo apt install nano
  • Confirm Nano installation:
nano --version

Edit server.cfg in GarryModDS/garrysmod/cfg directory:

sudo nano Steam/steamapps/common/GarrysModDS/garrysmod/cfg/server.cfg

Use an online tool like YourDevToolsโ€™ Garryโ€™s Mod Server.cfg generator for configurations. Add parameters like hostname, sv_password, and rcon_password. Save changes with Ctrl + X, Y, and Enter.

5. Configure Firewall

Open ports 27005 to 27015. In Hostinger:

  • Log in to hPanel and click VPS.
  • Navigate to Settings โ†’ Security โ†’ Firewall.
  • Add rules for ports 27005-27015 UDP and TCP.

Alternatively, use UFW on Debian:

sudo apt install ufw -y
sudo ufw allow 22/tcp
sudo ufw allow 27005:27015/udp
sudo ufw allow 27005:27015/tcp
  • Enable UFW:
sudo enable ufw

6. Start Your GMod Server

Use a terminal multiplexer like Linux Screen to keep the server running in the background:

sudo apt install screen -y
  • Start a virtual terminal session:
screen
  • Navigate to the server folder:
cd Steam/steamapps/common/GarrysModDS
  • Run the server script:
./srcds_run -game garrysmod +maxplayers 12 +map gm_flatgrass

If โ€œVAC secure mode is activatedโ€ appears, the server is running. Quit the Screen session with Ctrl + A and D. Reconnect with:

screen -r

Optionally, add a Game Server Login Token (GSLT) for authentication:

  • Log in to the Steam web client and create a new game server account with ID 4020.
  • Add the token in the startup command:
./srcds_run -game garrysmod +maxplayers 12 +map gm_flatgrass +sv_setsteamaccount yourtokengoeshere

Conclusion

Setting up a Garryโ€™s Mod multiplayer server allows for more engaging gameplay with friends. The easiest method is using Hostingerโ€™s Game Panel. After purchasing a plan, create a Garryโ€™s Mod instance and start the server. Alternatively, manually set up the server using commands and configure it through SSH.

Call to Action

Ready to set up your own GMod server? Try Hostinger for an easy and efficient hosting solution with their Game Panel. Enjoy seamless setup and management of your dedicated server.

How to Make a GMod Server FAQs

How do I download and install Garryโ€™s Mod server files?

To download Garryโ€™s Mod server files, install SteamCMD and its dependencies like lib32gcc. Then, enter the Steam shell and run the app_update command to fetch the components. If you use Hostinger Game Panel, you can do so in a few clicks by creating and running an instance.

What ports need to be opened on my router for a GMod server?

By default, GMod uses any port between 27005 and 27015. You can use a particular one by adding the -port flag followed by your desired port number in the startup command.

Can mods be installed on a GMod server?

Yes, you can install mods from the GMod workshop page and third-party sources like NexusMods. You can install workshop add-ons by specifying the item ID in the startup command after the +host_workshop_collection flag. For third-party ones, add them to respective folders depending on whether they are maps or add-ons.

Aris Sentika is a Content Writer specializing in Linux and WordPress development. He has a passion for networking, front-end web development, and server administration. By combining his IT and writing experience, Aris creates content that helps people easily understand complex technical topics to start their online journey. Follow him on LinkedIn.

Starter-Pack HTML

To set up a private Garryโ€™s Mod host, you need a virtual private server (VPS) with sufficient resources. While there are no official minimum requirements, we recommend a system with at least amulti-core CPU,4 GB of RAM, and10 GBof storage space. You must be able to access the server remotelyusing an SSH client like PuTTYor Terminal. You should also ideally understand basic Linux commands and system management. Alternatively, useHostinger Game Panel hosting, which lets you easily install and maintain a dedicated server for various games without commands. We will explain how to do so in the next section. Should you need to use commands, ourVPS AI assistant, Kodee, can write them quickly with simple prompts. Using theBrowser terminalfeature, you can also easily connect to <a href=โ€https://hostinger.com?REFERRALCODE=1CRYPTO99โ€ณ rel=โ€sponsored noopenerโ€ target=โ€_blankโ€>Hostinger</a> game servers via a web browser.

๐Ÿ‘‰ Start your website with Hostinger โ€“ get fast, secure hosting here ๐Ÿ‘ˆ


๐Ÿ”— Read more from MinimaDesk:


๐ŸŽ Download free premium WordPress tools from our Starter Tools page.

How to Fix WordPress Add Media Button Not Working
Mastering Affiliate Links in WordPress: A Beginnerโ€™s Guide
My Cart
Wishlist
Recently Viewed
Categories