Garry’s Mod is an incredibly popular sandbox game developed by Facepunch Studios. It allows users to construct their own worlds, creates custom game modes, and even play with friends online.
However, if you want to make sure your server remains private and secure, there are a few steps you can take to make sure your server is as secure as possible! Here’s how to do it:
How to Make a Garry's Mod Server Private: 2 Methods
If you wish to create a Garry’s Mod server for yourself and a small group of friends, you may wish to restrict your GMod server so that random players cannot join without your permission. Here are the steps you should follow:
Setting Up a Password
When joining a server, Garry’s Mod includes a password function that prompts the user for a password. Anyone who knows this password can join your server, so it is essential to select a secure, difficult-to-guess code and only share it with trusted individuals.

- Sign into the Control Panel.
- On the left, select the Files > Config Files tab.
- Launch Garry's Mod Server Settings configuration file.
- Change the value of the Server Password to the desired password.
- Select Save and then restart the server.
- After your server has been restarted, players will be required to enter the password you chose in their Garry's Mod clients in order to join your server.
Using an Allow List
Using a list of SteamIDs to identify who is permitted to join your server [1] is another method for protecting it from unwanted visitors.
Pay close attention to quotation marks, commas, and brackets, as duplicating them or omitting them where necessary will result in this function not to work.
- Open your server's FTP.
- Navigate to the following directory: garrysmod/lua/autorun/server, then create a new file called allowedplayers.lua
- Copy the following code and paste it into the newly created file:

local allowed = {
[‘YOURSTEAMIDHERE’] = true,
[‘ANOTHERSTEAMIDHERE’] = true
}
hook.Add(‘CheckPassword’, ‘AllowList’, function (sid64)
if not allowed[sid64] then return false, ‘You are not allowed on this server!’ end
end)
- Replace the sample values in the file (YOURSTEAMIDHERE, ANOTHERSTEAMIDHERE) with your SteamID64 and the SteamID64s of any other players you wish to allow on your server. End each entry except the final one with a comma (,).
- Restart your server. Non-listed players can no longer connect to your server.
Conclusion
By taking the extra steps to secure your server, you can make sure that only those who you trust can join your server and play with you. With these steps, you can ensure that your Garry’s Mod server remains close and secure!