0%
Loading...
NolimitHost

How to Make a Garry's Mod Server Private

Last updated: May 6, 2026

Making your Garry's Mod server private gives you full control over who can join. This guide covers three methods: hiding your server from the server browser, adding a password, and setting up a SteamID64 whitelist for the strongest security. You can use them on their own or combine them — the recommended setup is at the bottom of this guide.

Method 1 — Hide the Server from the Browser

Hiding your server means it won't appear in the public server list. Players can still join using a direct IP, but random players won't stumble on it.

Via the NolimitHost Game Panel

  1. Log in to the NolimitHost Game Panel and click on your Garry's Mod server from the dashboard.
  2. In the left sidebar, go to Startup and find the additional startup parameters field.
  3. Add -nomaster to the startup arguments.
  4. Restart the server (press Restart, or Stop then Start) so the new setting takes effect.

Via VPS Startup Command

If you're running on a VPS, add -nomaster to your start command:

./srcds_run -game garrysmod +map gm_flatgrass +maxplayers 16 -nomaster

Players can now only join using connect ip_address:port in the in-game console.

Method 2 — Add a Password

A server password requires anyone joining to enter the correct password before connecting.

Stop the server first: Always stop your server before editing server.cfg so the running server doesn't overwrite your changes. Start it again afterwards to apply the password.
  1. Log in to the Game Panel and open your server. In the left sidebar, go to Management > File Manager and navigate to garrysmod/cfg/.
  2. Open server.cfg — the main configuration file for your server — and add or edit the following line:
    sv_password "YourStrongPassword"
  3. Save the file and start (or restart) the server.

Anyone trying to connect will be prompted for the password. To remove the password, set sv_password "".

Method 3 — SteamID64 Whitelist (Strongest)

A whitelist blocks everyone except the specific Steam accounts you approve — even if someone has the password. This is the best option for private development or closed community servers. A SteamID64 is a unique permanent number that identifies a Steam account.

Stop the server first: Stop the server before adding the whitelist file, then start it again afterwards. The whitelist only takes effect once the server reloads its Lua files on startup.
  1. In the File Manager, navigate to garrysmod/lua/autorun/server/. If the server folder does not exist, create it.
  2. Create a new file named whitelist.lua and paste the following:
    if not SERVER then return end
    
    local WHITELIST = {
        ["76561198000000001"] = true,
        ["76561198000000002"] = true,
        -- add more SteamID64s here
    }
    
    hook.Add("CheckPassword", "SteamID64Whitelist", function(steamID64)
        if WHITELIST[steamID64] then
            return true
        end
        return false, "You are not whitelisted on this server."
    end)
  3. Replace the placeholder SteamID64 values with the actual SteamID64s of players you want to allow. You can find any SteamID64 at steamid.io.
  4. Save the file and start (or restart) the server.

Recommended Setup for a Truly Private Server

For maximum security, combine all three methods: hide from the browser, set a password, and use the whitelist. This prevents discovery, casual entry, and even access from players with the password who aren't on the list.