How to make a LAN server in GMod
Type sv_lan 1 in the server console for a LAN-only server that skips Steam and accepts local players only. Keep sv_lan 0 for internet servers.
sv_lan
Toggles LAN-only mode, where the server skips Steam authentication and accepts only local network players.
sv_lan <0|1> Examples
sv_lan 0 Normal internet server.
Values
| Value | What it does |
|---|---|
| 0Default | Off |
| 1 | On |
Arguments
0|1Required- 1 for LAN only, 0 for internet.
What it does
With it on, the server does not register with Steam and only players on the same local network can join. Leave it at 0 for any internet server.
The game's own description: Server is a lan server. ( no authentication, no non-class C addresses ) Use 'hide_server' cvar to hide the server from the server browser.
Good to know
- To keep an internet server out of the browser while still allowing direct connects, use
hide_serverinstead.
Run it on your server
On a SLASHPLAY server, type it in the Console tab of the server page; the reply shows right under it. A value set there lasts until the server restarts. To keep it, add the line to garrysmod/cfg/server.cfg. New to this? Start a GMod server first.
Your own
GMod server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.