01
The official server console
Re-Logic's dedicated server has no in-game admin role: admin commands are typed in its console, on the VPS, without a slash. With the terraria service from the guide creating a Terraria server, the console runs in a tmux session:
sudo -u terraria tmux attach -t terraria
Type your commands, then leave the console without stopping the server with Ctrl+B then D. To send a single command without opening the console, for example from a script:
sudo -u terraria tmux send-keys -t terraria save Enter
Connecting to the VPS is explained in connecting to a VPS over SSH. The help command shows the list of console commands; clear clears the screen.
Players only have chat commands, with no admin power: /playing (connected players), /roll (a number from 1 to 100), /p (message to your team), /me, /death and /alldeath (death counts), /help.
02
Players: playing, kick, ban and password
playing: shows the list of connected players;
kick Pseudo: kicks a player, who can come back;
ban Pseudo: bans a player, who sees a ban message when trying to return;
say Sauvegarde dans 5 minutes: sends a message to all players, shown in yellow in the chat;
password: shows the server password; password nouveau-mot-de-passe changes it;
motd: shows the welcome message; motd Bienvenue sur le serveur changes it.
Lifting a ban. There is no unban command: the official wiki says to delete the player's name and IP address from the banlist.txt file. To know where it is, set its path in serverconfig.txt, then restart the server:
banlist=/home/terraria/banlist.txt
Edit that file with the server stopped. For a lasting password or welcome message, also keep the password= and motd= lines of serverconfig.txt up to date: that is the file the server reads at startup.
03
The world: save, exit, time and water
save: saves the world. Do it before backing up the .wld file;
exit: saves the world, then stops the server;
exit-nosave: stops the server without saving. Everything since the last save is lost;
time: shows the in-game time;
dawn, noon, dusk, midnight: switch to dawn (4:30 AM), noon, dusk (7:30 PM) or midnight;
settle: settles all the water in the world, which stops flowing;
version, maxplayers, port: show the server version, the maximum number of players and the listening port.
maxplayers and port only display the value: to change it, edit maxplayers= or port= in serverconfig.txt and restart. Likewise, the seed is chosen with seed= in that file, when the world is created: it is not a console command.
An automatic backup is scheduled by sending save to the console, then copying the worlds folder (see scheduled tasks on a VPS). For a modded server, tModLoader's own settings are in Terraria tModLoader server.
04
TShock: a modified server, with accounts and groups
TShock is not an add-on to the official server: it is a different, open-source server, installed and updated separately, which follows new Terraria versions with a delay. Its installation is described in the guide creating a Terraria server. Its commands do not work on the official server.
- In its console, TShock accepts its commands with or without a slash, with full rights.
- In game, commands are typed in chat with
/. The . prefix runs the same command silently, without announcing it to other players.
- Accounts: a player creates one with
/register motdepasse, under their character's name, and logs in with /login. The first owner account is created with the /setup code shown at first startup.
Groups. Each account belongs to a group, which inherits its parent's rights. The groups created by default go from least to most powerful: guest, default, vip, newadmin, admin, trustedadmin, owner.
/user add Pseudo motdepasse admin
/user group Pseudo trustedadmin
/user password Pseudo nouveau-mot-de-passe
/user del Pseudo
/user requires the tshock.superadmin.user permission, which no default group has: type these commands in the console, or in game preceded by /sudo, which the owner group is allowed to use. To manage groups:
/group add moderateur
/group parent moderateur vip
/group addperm moderateur tshock.admin.kick tshock.admin.mute
/group delperm moderateur tshock.admin.mute
/group listperm moderateur
/group list
05
TShock: banning, kicking and managing the world
TShock bans are stored in its database, each with a ticket number:
/ban add Pseudo "Triche" 7d0m0s
/ban list
/ban details 12
/ban del 12
/ban add takes the player, a reason, a duration in the 0d0m0s format (days, minutes, seconds) and options. Without a duration, the ban is permanent.
- Without options, it bans the account, the device identifier (UUID) and the IP address at once (
-a -u -ip).
- For an offline player, target their account with the
-e option: /ban add "acc:Pseudo" "Triche" -e.
/ban del and /ban details take the ticket number shown by /ban list.
Other useful commands, each tied to a permission:
/who (or /playing): connected players; /who -i adds their number;
/kick Pseudo raison: kicks; /mute Pseudo raison: takes away chat rights;
/time day, night, noon, midnight or a time such as /time 18:00;
/save: saves the world; /off: saves and stops the server;
/serverpassword "mot de passe": changes the server password;
/whitelist 198.51.100.7: adds an IP address to the whitelist, which only applies if EnableWhitelist is true in config.json;
/reload: reloads the configuration and permissions; /help: the commands your group is allowed.
Keep few accounts in the admin groups, and back up the tshock folder (with tshock.sqlite, which holds accounts, groups and bans) along with the world.
06
On CloudFive
CloudFive has no ready-made Terraria plan: the official server or TShock is installed on a VPS, and you administer it as in this guide. The Ryzen VPS, from €5.99 per month, is well suited:
- an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage: the world simulation runs mostly on one core;
- a Linux container (LXC) with root access and a dedicated IPv4 address;
- basic anti-DDoS protection included (see protecting a game server from DDoS).
The servers are in France, monthly with no commitment, with support in French 7 days a week by ticket and on Discord. To choose the VPS size, see which VPS for a game server; for port 7777, game server ports.
07
Frequently asked questions
How do I become an admin on a Terraria server?
The official server has no in-game admin role: it is administered from its console, on the VPS. To have in-game admins you need TShock, a separate modified server, where you create an account in the owner or admin group with /user add.
How do I ban a player on a Terraria server?
On the official server, type ban followed by the player name in the console. To lift the ban, delete the player's name and IP address from the banlist.txt file. With TShock, use /ban add, then /ban del with the ticket number to lift it.
How do I change the time on a Terraria server?
In the official server console, type dawn, noon, dusk or midnight, and time to show the current time. With TShock, use /time day, night, noon, midnight or a precise time such as /time 18:00.
What is the difference between exit and exit-nosave in Terraria?
exit saves the world and then stops the server. exit-nosave stops it without saving: everything since the last save is lost. Use exit, or save before any operation.
Do TShock commands work on the official Terraria server?
No. TShock is a separate server, installed on its own, which adds its own commands such as /user, /group or /ban add. On the official server, only its console commands are available.