A whitelist is an access list that determines who can join your server. The standard Terraria server (Vanilla) and tModLoader don't have a built-in whitelist. You can protect access with a server password and ban unwanted players through the console.
You can only get a true whitelist with TShock, a server package for Terraria that you can upload to your Terraria server at ZapX. The TShock whitelist uses IP addresses. TShock isn't available for tModLoader.
Open your game server and go to the Configuration tab. Under Startup Parameters, enter a password in the Server Password field, save your changes, and restart the server. From now on, only players who know the password can join your server.
You can also change the password in the Console using password <new password>. However, this change only applies until the next restart, because ZapX rewrites the server settings from the startup parameters each time the server starts. To change the password permanently, use the Server Password field.
In the Console tab, enter these commands without a / in front:
playingshows all connected players.kick <player name>removes a player from the server.ban <player name>bans a player.
Banned players are listed in the Files tab in the config/banlist.txt file. To lift a ban, delete the player's name and IP address from the file, then restart the server.
For instructions on installing TShock on your Terraria server, see Become a server admin (TShock). Once TShock has started, it creates the config.json and whitelist.txt files in the tshock folder.
Once the whitelist is enabled, TShock disconnects any player whose IP address isn't on the list. So add your own IP address before enabling the whitelist.
- Stop your server.
- In the Files tab, open
tshock/whitelist.txtand enter each allowed IP address on a separate line. You can also add entire network ranges, such as198.51.100.0/24. Lines starting with#are comments.
# Eigene IP
203.0.113.25
# Freund
198.51.100.10
- Open the
tshock/config.jsonfile and setEnableWhitelisttotruein theSettingssection:
"EnableWhitelist": true,
- Save both files and start your server.
To add more players, enter this command in the Console tab while the server is running:
whitelist 198.51.100.20
TShock applies the entry immediately and saves it to tshock/whitelist.txt. There is no command to remove an entry. To remove someone from the whitelist, delete their line from tshock/whitelist.txt, then enter reload in the console. This makes TShock reload the whitelist and config.json.
Try connecting from an IP address that isn't on the list. TShock should disconnect you with the message “You are not on the whitelist.” If all players can still join, check that EnableWhitelist is set to true and that TShock loaded when the server started, as shown in the Console.
You can find every command for your Terraria server in our overview of Terraria server commands.
On the standard Terraria server and with tModLoader, you can protect your server with a server password and ban disruptive players through the console. If you need a true whitelist, install TShock and manage the allowed IP addresses in tshock/whitelist.txt.
If you have any other questions or run into problems, our support team is here to help every day! 🙂
