Skip to content
🧮 Is Lifetime with ZapX Pass worth it? Work it out for your own servers in 30 seconds. Open the Lifetime calculator →

Terraria: Whitelist

Learn how to protect access to your Terraria server with a server password and bans, and set up a true whitelist with TShock.

26 November 20263 min read42 Views0 helpful

Don't have your own server yet? Host your Terraria server with ZAP-Hosting from €4.49 / month.Or try 3 days from €0.81

Introduction

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.

Without TShock: Protect access with a server password

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.

Info

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.

Without TShock: Remove and ban players

In the Console tab, enter these commands without a / in front:

  • playing shows 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.

With TShock: Set up a whitelist

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.

Warning

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.

  1. Stop your server.
  2. In the Files tab, open tshock/whitelist.txt and enter each allowed IP address on a separate line. You can also add entire network ranges, such as 198.51.100.0/24. Lines starting with # are comments.
txt
# Eigene IP
203.0.113.25
# Freund
198.51.100.10
  1. Open the tshock/config.json file and set EnableWhitelist to true in the Settings section:
json
"EnableWhitelist": true,
  1. Save both files and start your server.

With TShock: Manage the whitelist

To add more players, enter this command in the Console tab while the server is running:

Code
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.

Check the whitelist

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.

Summary

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! 🙂

Free tools

Terraria Tools

View all

FAQ

Frequently asked questions

No. The standard Terraria server and tModLoader don't have a whitelist. You can protect access by setting a password in the Server Password field under Startup Parameters in the Configuration tab. You can only get a true whitelist with TShock.
Stop the server, add the allowed IP addresses (including your own) on separate lines in tshock/whitelist.txt, set EnableWhitelist to true in the Settings section of tshock/config.json, and start the server.
While the server is running, enter whitelist <IP address> in the Console tab. TShock applies the entry immediately and saves it to tshock/whitelist.txt.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.