TF2 is a multiplayer game where many users search browse the community server list to play. All TF2 servers are discoverable through this list. If you don't want random players joining your server, we highly recommend that you set a password. This will ensure only players that you have shared this password with will be able to connect.
How to Set a Password
- Navigate to your server control panel.
- Stop your server.
- Navigate to Files > Config Files.
- Open Team Fortress 2 Server Settings.
- Set the Password field to your new password.
- Click Save.
- Restart your server.
Setting a Temporary Password
Setting a password through your server settings will make your TF2 server private. However, this may not work for you if you wish to temporarily restrict your public server. Public servers can temporarily enable a password by executing a command through the control panel or RCON. Please note that cheats must be enabled for this method to work.
- Go to your server Console in your control panel.
- Enter
sv_password PASSWORD
- If you’d like to remove the password instead, you can use
sv_password ""
- If you’d like to remove the password instead, you can use
You can then use sv_password
to check that the password has been set properly and output the current password in the console.