TShock's whitelist lists internet addresses, not player names. Add each friend's address with the whitelist command, then switch on Whitelist only on the config.json page and restart. Only listed addresses can join. For most groups of friends, a join password is simpler.
Add addresses
- Ask each friend for their internet address, or read it in the Console when they join: the line
is connecting...starts with it. - Open the Console tab and type
whitelistfollowed by the address, for examplewhitelist 203.0.113.20. TShock answersAddedand the addressto the whitelist. - Repeat for each player.
The list is the file tshock/whitelist.txt. You can also edit it in Files, one address per line.
Switch it on
- Open the Settings tab and click
config.jsonunder Config files. - Switch on Whitelist only.
- Click Save & restart.
Add your own address too, or you lock yourself out.
Things to know about addresses
- Everyone on the same home connection shares one address.
- Many home connections get a new address from time to time. A friend who suddenly cannot join may need their new address added.
Other ways to keep the server private
- A join password: How to set a password on your Terraria server.
- Players must log in on the
config.jsonpage, with accounts you create: How to manage TShock groups and permissions. - Bans for players who should not come back: How to kick or ban a player on your Terraria server.
Terraria Vanilla and tModLoader have no whitelist. Use a password there.





