Open Settings, Game Settings, type a password in Password (Terraria Vanilla) or Server Password (TShock and tModLoader), and restart the server. Players then type it when they join. Leave the field empty to run a public server that anyone with the address can join.
Set the password
- Open your server in the panel and click the Settings tab.
- Click Game Settings in the Server Settings card.
- Type the password in Password or Server Password, then click outside the field or press Enter.

- Click Restart now in the banner, or restart the server yourself. The new password applies from the next start.
To make the server public again, empty the field and restart.
What the password may contain
| Server type | Field | Rules |
|---|---|---|
| Terraria Vanilla | Password | Plain letters, numbers, spaces and punctuation, 64 characters at most. No accented letters, emoji, double quotes or backslashes. |
| TShock | Server Password | No double quotes or backslashes, 20 characters at most. |
| tModLoader | Server Password | No double quotes or backslashes, 20 characters at most. |
If the panel refuses a password, it says why: The panel will not save your Terraria world name or password.
Share it
The Play with friends card on Overview shows the password in its Password row, and Copy invite message puts it in the invite. Someone on your team without the View startup permission sees Hidden for your account, and their invite says It has a password: ask me for it. See How to invite friends to your Terraria server.
Good to know
- On Terraria Vanilla, the Console command
passwordfollowed by a new password changes it only until the next restart. The panel setting wins at every start. - The password has to match exactly, capitals included.
- On TShock you can also make every player log in to their own account, or allow only listed addresses: How to change TShock settings on your Terraria server and How to use a whitelist on your TShock server.
- A password keeps strangers out. To remove someone who is already in, see How to kick or ban a player on your Terraria server.





