The console takes plain commands
Once a dedicated server is running, its console accepts the commands on this page, and the wiki states the one rule worth knowing first: "Note that a forward-slash [/] is not required to precede the command, as some command interfaces require." Type ban, not /ban. Two commands help you find your feet: help "Displays a list of commands.", and playing "Shows the list of players" — which players can also run by "typing /playing into the chat" in game, the one place a slash does belong (Server).
Banning a player
The command is ban <player name>, documented in the wiki's console list as "Bans a player from the server." The same page's banning section says it in its own words: "The command ban <player> will ban the indicated player from the server." A banned player who tries to log in is shown the message "You are banned for [duration]: [reason]- [modname]." (Server)
Bans are written to banlist.txt in the Terraria folder, as our setup guide puts it in its day-to-day section. The lighter tool is kick <player name>, "Kicks a player from the server." — a kick is the command for now and the ban is the command that lands the player in the ban list, which is the whole difference between them. Use playing first to confirm the exact player name the console sees.
Unbanning is a file edit, not a command
There is no unban console command — the wiki's command list has none, and our setup guide says so plainly. The wiki's Banning and un-banning section gives the whole procedure instead: a banned player "may then be un-banned by editing the file "banlist.txt," which is located in the Terraria folder. This document contains a list of all currently banned players. To un-ban a player, delete the player's name and IP address from the list." (Server)
So the routine is: stop the server — exit, the safe way out — open banlist.txt in a text editor, delete the player's name and IP address, and start the server again. The wiki's instruction names the name and the IP address together, so delete both for the player you are lifting, and touch nothing else in the file: it is a plain list of the currently banned, not a config file with settings in it. Keep a copy of it before the first time you edit it, the way you would any file you have not read before; our backup checklist is the wider habit.
Passwords: show it, change it, set it for good
The console pair is short. password on its own is documented as "Show password." and password <pass> as "Change password." — typed at the console with no leading slash, like every command above (Server).
For a password the server starts with every time, the place is serverconfig.txt. The wiki's config list documents the line as password=p@55w0rd* — "Set the server password" — and the shipped example file carries it commented out as #password=p@55w0rd, so you remove the leading #, the marker in front of every shipped line except priority=1, and set your own value. The same setting exists as a command-line switch: -pass <password> / -password <password>, "Sets the server password." (Server) Our password and whitelist guide covers how to share one safely, and the serverconfig.txt reference has the full key table your password= line sits in.
banlist=: naming the file yourself
The ban list's location is a setting. The wiki's config list documents banlist=banlist.txt as "The location of the banlist. Defaults to "banlist.txt" in the working directory." — and the command-line parameter -banlist <file path> carries the same words, so the file can be named and placed either way (Server). Unless you have set either one, the banlist.txt the banning section places "in the Terraria folder" is that default, in the working directory you launch the server from. When the server program is updated, the setup guide's update routine copies serverconfig.txt — and banlist.txt if you keep one — from the old folder, because those files are yours, not the program's.
The admin commands at a glance
Every description in this table is the wiki's own wording for the command (Server):
| Command | What the wiki says it does |
|---|---|
help | "Displays a list of commands." |
playing | "Shows the list of players." In game, players type /playing into the chat. |
clear | "Clear the console window." |
save | "Save the game world." |
exit | "Shutdown the server and save." |
exit-nosave | "Shutdown the server without saving." |
kick <player name> | "Kicks a player from the server." |
ban <player name> | "Bans a player from the server." |
password | "Show password." |
password <pass> | "Change password." |
motd | "Print MOTD." |
motd <message> | "Change MOTD." |
say <message> | "Send a message to all players." Players see it in yellow, prefixed with <server> in the chat. |
version | "Print version number." |
TShock has a different console
The commands on this page belong to the vanilla dedicated server. TShock is a separate server distribution with its own account and permission system, and the wiki's own pointer for it sits at the end of the command list: "For a list of Tshock commands, refer to the TShock readme." TShock also keeps its settings in a config.json inside its tshock folder, as our serverconfig reference notes — the ban and password handling there is TShock's own, not the vanilla pair on this page.
Where to read next
The setup guide walks the whole server install and its day-to-day section is where these console commands live; the serverconfig.txt reference covers every key your password= and banlist= lines sit beside; password-protect or whitelist your server compares the join password across seven games; and if the player who cannot get in is not banned at all, the Terraria server not connecting guide is the diagnosis page.
If you would rather have a server that stays online without running it yourself, ForgeWorld Gaming’s Terraria plan is Terraria Standard, 4 player slots, CA$8.99/month; the availability page shows whether orders are currently open. Other sizes and tiers are not available yet. Your server is set up automatically after payment. Current plans and prices are on the Terraria availability page.