- For setting up a server see Guide:Setting up a Terraria server.
The server software of Terraria is run by the game itself. To run a dedicated server, one must run TerrariaServer.exe. One may also setup a server using TDSM or Tshock. This will allow players to use in-game commands, set a whitelist, set player passwords and add plugins to the server such as factions. Although TDSM or Tshock is recommended for most dedicated servers, it is not necessary. Click here to download TDSM b38 (updated 04/20/2013) or Tshock 4.0 or here to download Terraria Server 1.2 or try Dedicated Server GUI.
By default, on a 32 bit Microsoft Windows installation, the TerrariaServer.exe can be found at:
By default, on a 64 bit Microsoft Windows installation, the TerrariaServer.exe can be found at:
A player then may join the server from game menu, choosing Multiplayer.
The server runs on port 7777 by default and it must be port-forwarded in order for other players be able to join. If one can't portforward, one may choose to use Hamachi instead(altough every player needs Hamachi then). The default number of max players is 8 and can be changed during server start-up as well as within the server configuration file (serverconfig.txt).
The server will auto-save the world now and then and a password can be customized for the server. However, when shutting down the server without first using the "save" command, the server will not auto-save.
When you launch a server in the 1.2 update it will ask if you want to auto port forward, however, many users have not been able to auto-portforward.
 List of console commands
Once the dedicated server is running, various commands to alter certain aspects of the game dynamically and instantaneously can be run.
The following is a list of available commands for the dedicated server:
- help - Displays a list of commands.
- playing - Shows the list of players. This can be used in-game by typing /playing into the chat.
- clear - Clear the console window.
- exit - Shutdown the server and save.
- exit-nosave - Shutdown the server without saving.
- save - Save the game world.
- kick <player> - Kicks a player from the server.
- ban <player> - Bans a player from the server.
- password - Show password.
- password <pass> - Change password.
- version - Print version number.
- time - Display game time.
- port - Print the listening port.
- maxplayers - Print the max number of players.
- say <words> - Send a message to all players. They will see the message in yellow prefixed with <Server> in the chat.
- motd - Print MOTD.
- motd <words> - Change MOTD.
- dawn - Change time to dawn (4:30 AM).
- noon - Change time to noon (12:00 PM).
- dusk - Change time to dusk (7:30 PM).
- midnight - Change time to midnight (12:00 AM).
- settle - Settle all water.
Note that /[command] is not required to do the command, typing the command with no forward slash into the Command prompt will suffice. For a list of all Tshock command, please refer to this forum: Click here
 Command line parameters
The following is a list of available command line parameters:
- -config <config file> - Specifies the configuration file to use.
- -port <port number> - Specifies the port to listen on.
- -players <number> / -maxplayers <number> - Sets the max number of players.
- -pass <password> / -password <password> - Sets the server password.
- -motd <text> - Set the server motto of the day text.
- -world <world file> - Load a world and automatically start the server.
- -autocreate <#> - Creates a world if none is found in the path specified by -world. World size is specified by: 1(small), 2(medium), and 3(large).
- -banlist <path> - Specifies the location of the banlist. Defaults to "banlist.txt" in the working directory.
- -worldname <world name> - Sets the name of the world when using -autocreate.
- -noupnp - Disables automatic universal plug and play.
- -secure - Adds additional cheat protection to the server.
 Server files
Terraria comes with its own dedicated server files. They are stored in the root Terraria folder. The server consists of three files:
- TerrariaServer.exe - The main server file. Can be run stand-alone.
- serverconfig.txt - The server config files. Defines all parameters for the server (see below).
- start-server.bat - A Windows Batch file which starts the server using the serverconfig.txt file. Also contains a loopback to restart the server if it should crash.
 Server config file
It is possible to start the dedicated server using a server config file to define the above parameters automatically. The server config file can be defined using the -config parameter, it can be called anything but must be located in the same folder as TerrariaServer.exe for it to function. If a server config file is defined and the file is not located during the server boot, then the server will ask the user to input the parameters as it would if run without a defined config file.
The following is a list of available config commands:
- maxplayers=8 - Sets the max number of players allowed on a server. Value must be between 1 and 255
- world=C:\Users\Defaults\My Documents\My Games\Terraria\Worlds\world1.wld - Load a world and automatically start the server.
- port=7777 - Set the port number
- password=p@55w0rd* - Set the server password
- motd=Please don’t cut the purple trees! - Set the message of the day
- worldpath=C:\Users\Defaults\My Documents\My Games\Terraria\Worlds\ - Sets the folder where world files will be stored
- autocreate=3 - Creates a new world if none is found. World size is specified by: 1(small), 2(medium), and 3(large).
- worldname=World - Sets the name of the world when using autocreate
- banlist=banlist.txt - The location of the banlist. Defaults to "banlist.txt" in the working directory.
- secure=1 - Adds additional cheat protection.
The use of the hash (#) symbol in the server config file defines the entire line as a comment causing the server to skip past it.
 Banning and un-banning
The command "ban <player>" will ban the indicated player from the server. 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 banned players. To un-ban a player, delete the player's name and IP address from the list.
 System requirements
- Windows Operating System (Some methods using Tshock allow you to run on linux)
- Depending on the World at least 500 MB free RAM for a small world (to be verified on different Servers/Setups)
- .NET Framework 4.0 (easiest is to install Terraria Client on the Server)
- XNA Framework (easiest is to install Terraria Client on the Server)
- Servers are often made using Hamachi. This removes the need of having to port-forward, but is less secure than port forwarding.
- Apps can be installed onto your server.
- You can use a Terraria Server List to find more servers:
- 22.214.171.124: Fixed crashes when starting the dedicated server in a language other than English.
- Servers now listen to all IP addresses on the hosting PC, regardless of how many network connections are active.
- Typing "localhost" instead of your own local IP address will connect to your own same-PC server.
- The games default port is no longer ELEET (31337) it is now 7777.
- Client will now resolve a hostname into its IP address, for example, if randomsite.org ran a server, you could type randomsite.org as the IP address and be able to connect.
- Pre-Release: Introduced.