KF2 Server Password and Access Control
Make your KF2 server private with a join password, restrict access with an IP whitelist, and separate your admin password from the public server password.
KF2 Server Password and Access Control
KF2 provides two separate password fields: one for player access and one for server administration. Keep them distinct.
Setting a Join Password (Private Server)
To require a password before players can join, edit KFGame/Config/LinuxServer-KFGame.ini:
[Engine.AccessControl]
GamePassword=YourJoinPasswordHere
AdminPassword=YourAdminPasswordHere
- GamePassword — shown to all players attempting to join. Leave blank for a public server.
- AdminPassword — used for in-game
adminloginand WebAdmin. Always set this, even on public servers.
After saving, restart the server. Players will see a password prompt when they try to connect.
Public Server (No Join Password)
Leave GamePassword empty:
[Engine.AccessControl]
GamePassword=
AdminPassword=YourAdminPasswordHere
The server will be visible in the server browser and joinable by anyone.
Changing the Password Without Restart (WebAdmin)
- Log in to WebAdmin at
http://YOUR_IP:8080 - Go to Administration → Passwords
- Update the game password and click Apply
The new password takes effect immediately without a server restart.
IP-Based Firewall Restriction
If you want to run a fully private server accessible only to specific IPs (e.g. a clan server), combine the join password with a firewall rule:
# Allow only specific IP range to connect on the game port
sudo ufw allow from 203.0.113.0/24 to any port 7777 proto udp
sudo ufw deny 7777/udp
This prevents connections even from players who know the password.
Banning and Unbanning Players
Via in-game console (while logged in as admin):
admin kickban PlayerName
Via WebAdmin:
- Log in to WebAdmin
- Go to Administration → Banned Players
- Add a player's SteamID64 to permanently ban them
- Remove the entry to unban
Best Practices
- Use a different password for
GamePasswordandAdminPassword - Rotate
AdminPasswordif you suspect it has been shared - For semi-public community servers: set
AdminPasswordonly, leaveGamePasswordblank - For clan/private servers: set both passwords and consider firewall restrictions