Dedicated Server

Dedicated Server Information is listed below.

Dedicater 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 standalone.
 * serverconfig.txt - The Terraria Server Config files. Defines all parameters for the server.
 * 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.

Command Line Parameters
The following is a list of available command line parameters:


 * -config  -				Specifies the configuration file to use.
 * -port  -				Specifies the port to listen on.
 * -players / -maxplayers  -	Sets the max number of players
 * -pass / -password  -	Sets the server password
 * -world  -				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 	-			Specifies the location of the banlist. Defaults to "banlist.txt" in the working directory.
 * -worldname 	-		Sets the name of the world when using -autocreate.
 * -secure	-				Adds addition cheat protection to the server.

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 TerririaServer.exe for it to function. If a server config file is defind the the file is not located during the server start up then the server will ask the user to define the parameters much as it would if it was run without a server config file defined.

The following is a list of available server config commands:


 * maxplayers=8 - Set’s 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 addition cheat protection.

The use of the hash (#) symbol in the server config file defines the entire line as a remark causing the server to skip past it.

Dedicated Server Commands
Once the server is running you can use various commands to alter certain aspects of the game dynamically and instantaneously.

The following is a list of available server commands:


 * help -            Displays a list of commands.
 * playing -         Shows the list of players
 * clear -            Clear the console window.
 * exit -             Shutdown the server and save.
 * exit-nosave -      Shutdown the server without saving.
 * save -             Save the game world.
 * kick  -    Kicks a player from the server.
 * ban  -     Bans a player from the server.
 * password -         Show password.
 * password  -  Change password.
 * version -          Print version number.
 * time -             Display game time.
 * port -             Print the listening port.
 * maxplayers -       Print the max number of players.
 * say  -     Send a message.
 * motd -             Print MOTD.
 * motd  -     Change MOTD.
 * dawn -             Change time to dawn.
 * noon -             Change time to noon.
 * dusk -             Change time to dusk.
 * midnight -         Change time to midnight.
 * settle -           Settle all water.