Where the server already is
On Windows, TerrariaServer.exe sits in the game folder. The Terraria Wiki lists the usual paths: %programfiles(x86)%\Steam\steamapps\common\terraria on a 64-bit install, %programfiles%\Steam\steamapps\common\terraria on 32-bit, GOG Games\terraria for a GOG copy. If none of those match, right click Terraria in Steam, then Properties, Local Files, Browse local files.
Four files matter in that folder:
TerrariaServer.exe, the server itself, which runs stand-alone.serverconfig.txt, which holds every setting.start-server.bat, which launches the server using that config and, in the wiki's words, "contains a loopback to restart the server if it should crash".start-server-steam-friends.bat, which behaves like Host and Play through the console, so Steam friends can join.
Linux, in five steps
On Linux the server files are a separate download from terraria.org. The wiki's own sequence, with wget, tmux and unzip installed first:
- Download the archive, for example
wget https://terraria.org/api/download/pc-dedicated-server/terraria-server-1458.zip. unzipit and change into the numbered folder it creates, then intoLinux.chmod +x TerrariaServer.bin.x86*.- Run
./TerrariaServer.bin.x86_64for the 64-bit build. - Put your world files in
~/.local/share/Terraria/Worlds/so the server can find them.
Run it inside tmux so closing your terminal does not close the server. Start tmux, launch the server inside it, detach with Ctrl+b then d, and come back later with tmux attach. The wiki notes that some systems need export TERM=xterm first.
serverconfig.txt, the settings that matter
Point the server at a config file with -config <file path>. The file can have any name, and relative paths resolve against the folder holding TerrariaServer.exe. If you name a config file and the server cannot find it at boot, it falls back to asking you the questions by hand, which is the usual reason a carefully written config appears to do nothing.
| Setting | What it does |
|---|---|
world= | Full path to a world file. Loads it and starts the server. |
autocreate= | Creates a world if none is found: 1 small, 2 medium, 3 large. |
worldname=, seed= | Name and seed used when autocreate makes the world. |
difficulty= | 0 normal, 1 expert, 2 master, 3 journey. |
maxplayers= | Between 1 and 255. The default is 16, and was 8 before 1.4.0.1. |
port= | 7777 by default. |
password=, motd= | Join password and message of the day. |
worldpath= | Where world files are stored. |
secure=1 | Adds extra cheat protection. |
npcstream= | Lower values reduce enemy skipping and send more data. 0 is off. |
Lines beginning with # are skipped entirely, so keep your old values commented rather than deleting them. Every one of these settings also exists as a command-line switch, including -players, -pass, -world, -autocreate, -secure, -noupnp and -steam.
Ports
The server runs on TCP port 7777 by default. Behind a home router, that port has to be forwarded before anyone outside your network can join. The wiki's alternative for people who cannot forward a port is a virtual network tool, with the honest caveat that every player then has to install it too. On a cloud provider the advice is different: open 7777 on both TCP and UDP, and remember that a data centre connection usually needs a firewall rule rather than a forwarding rule.
Running it day to day
The console takes plain commands with no leading slash. The ones worth learning early are save, exit (which shuts down and saves), exit-nosave, playing, kick, ban, password and motd. Note that exit is the safe way out. Closing the window is not.
Bans are written to banlist.txt in the Terraria folder. To lift one, stop the server and delete the player's name and address from that file. There is no unban command.
TShock, when vanilla is not enough
TShock is a separate server binary that replaces the vanilla one and adds accounts, permissions, server-side characters and a plugin system. Its own documentation covers current versions; older guides that tell you to install Mono are out of date, because TShock now runs on .NET and no longer needs it.
The documented install is short. Install the .NET runtime, download the latest stable release, and unzip it so that everything lands in one folder. Run TShock.Server.exe, or ./TShock.Server elsewhere, and it creates a tshock folder for its database and configuration. Then join your own server, read the setup code out of the console, and run four commands in chat:
/setup [code]to make yourself temporary admin./user add [account] [password] ownerto create your real account./login [account] [password]to sign in to it./setupagain to switch the setup system off.
Two files in the tshock folder are the ones to back up: config.json and tshock.sqlite. The documentation is blunt about the second one. Lose tshock.sqlite and you have to set TShock up again from scratch. Plugins go in the ServerPlugins folder, and upgrading is a matter of merging a new release over your existing install, leaving the tshock folder alone.
Self-hosting or renting
Terraria is one of the easier servers to self-host, and if you have a machine that stays on, it is genuinely free. You keep the world file, you can copy it anywhere, and the config is a single readable text file.
What it costs is availability and attention. The machine has to be awake whenever anyone wants to play, and it should not be the computer you are playing on. Some home connections will not accept incoming connections at all, which no port forwarding will fix. Every crash, update and restart is yours to notice. And a Terraria world is one file, which makes it easy to copy and easy to lose.
Renting moves those chores rather than removing them. The world, the difficulty, the plugin list and the backups you actually keep are still your decisions.
Where RadarHost fits
RadarHost rents Terraria servers hosted in Beauharnois, Quebec, Canada. There are three plans, Standard, Premium and Diamond, priced in Canadian dollars, with no setup fee and cancel any time. Renting changes who keeps the machine on, not how the game runs or how the settings above work. After payment, our team reviews the order and emails setup details or next steps within 24 hours. Current plans and prices are on the Terraria availability page.