Adding a password to your Garry's Mod Server
How to add a password to your Garry's Mod Server
Sometimes you want privacy, and that's understandable whether it's a private server or a development server! Adding a password is the best way to ensure no one can join you uninvited!
Setting a password is very quick and painless and we'll quickly go over how to do it!
Permanent password
Permanent does not mean it can't be removed, it simply means the password will stay on the server as long as it stays in the server.cfg
First we'll have to navigate to the server.cfg
file found in /garrysmod/cfg/server.cfg
.
You can find it either using SFTP or the Physgun Gamepanel File Manager!
- Go ahead and open the file and inside you should see an option named
sv_password
this is the option we'll edit to add a password. - To edit the password simply add anything inside the quotes such as
sv_password "verysecurepassword"
and then save the file.
sv_password ""
Temporary password
Temporary password means after the server restarts the password will no longer be on the server, this is done by using a command instead of using the server.cfg
Setting a temporary password is very easy, simply navigate to the Physgun Gamepanel Console.
- Once you are in the console type
sv_password "anything here"
- Press enter and your temporary password will be applied!
server.cfg
You're done!
Whether you used the temporary password or permanent password that is all there is to it! Very simple and easy to do!
sv_password
into the consoleUpdated on: 20/04/2023
Thank you!