Running a different on a GMod server

Hello, I am HeyBanditoz, and I am wondering if there is a way to switch a port of a dedacated server, I’ve been trying but I can’t find a way, I am trying to make GMod work on port 25565, any help would be awesome.


The old Garry’s Mod wiki is down, but I think it was something like -port porthere on the command line for the server to change the port.


The option you’re looking for is “-port <portnumber>” or alternatively “+hostport <portnumer>”

Both of these can be used in your server startup line.
You can also use “hostport <portnumber>” as a cvar command while your server is running.

Thanks, now, do my friends connect with the server browser or do they have to do it with the ‘connect’ command in the console?

If your server is set up correctly it should show up in the server browser.
The “connect” command also works.
Additionally, they can add your server IP + port to their favourites for easy access.

I’ve tried everything I can think of, and it is not working. Can someone give me a TEXT tutorial on hosting a GMod Dedicated server on a different port with the new steampipe system? That would be appreciated.

Never mind! I know what I did wrong.

Solved. Had to enable Both UDP and TCP on my router. Thanks for your help!