Server


 * A Terraria server provides a platform for players to connect over the internet or other network for multiplayer games. Windows installations of Terraria include its server software.

= Pros and Cons of Servers = Running a server instead of just running the game standalone has the benefit of being able to adjust the time of day at will. This can be handy if you want to get rid of a timed event like a blood moon, and can be very useful when fishing. It's quick, easy, and reliable to run a multiplayer game with your friends/family once you get the port-forwarding worked out. The downside is that although the hosting computer can be a server and play at the same time, there will be a small amount of lag for the hosting computer's gameplay. You'll notice it most when fighting monsters. When you hit them they seem to warp closer to you and hit you. Using ranged/magic weapons mitigates this, and after you play for a while, you learn to compensate by changing positions before striking monsters. One of the recent 1.3 updates helped by changing the server's sync pacing to every few seconds. The monsters now 'warp' around regularly, keeping their relative position more or less up to date, whereas before the monsters would only update when you struck them.

= How To = By default, on a 32-bit Windows installation of Terraria, TerrariaServer.exe can be found at: %programfiles%\Steam\steamapps\common\terraria

On a 64-bit Windows installation, it can be found at: %programfiles(x86)%\Steam\steamapps\common\terraria

A player then may join the server from the game menu by choosing the Multiplayer option.

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 a VPN service like Hamachi or Tunngle instead (although in those cases, every player needs to install the VPN software). The default max players is 8, but this can be changed during server start-up, as well as within the server configuration file (serverconfig.txt).

Downloads
The vanilla Terraria server software is included with the regular Terraria package (see above), but can also be downloaded:
 * Terraria Server 1.3.0.8 (Windows)
 * Terraria Server 1.3.0.8 (Mac)
 * Terraria Server 1.3.0.8 (Linux)

Dedicated Server GUI is a third-party add-on for the vanilla server that offers graphical controls (the server is normally a command-line program):
 * Dedicated Server GUI.

Tshock and TDSM are third-party server packages that offer additional functionality, such as in-game commands, whitelists, player passwords, and a plugin interface for added features (such as factions):
 * Tshock
 * TDSM

Server files
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.

List of console commands
Once a dedicated server is running, the following commands can be run:


 * 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  -    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 to all players. They will see the message in yellow prefixed with  in the chat.
 * motd -             Print MOTD.
 * motd  -     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 a forward-slash is not required to precede the command, as some command interfaces require. For a list of Tshock commands, refer to this forum thread.

Command line parameters
The following is a list of parameters that can be entered when running TerrariaServer initially:


 * -config  - Specifies a configuration file to use (see Server config file below).
 * -port  - Specifies the port to listen on.
 * -players / -maxplayers  - Sets the max number of players.
 * -pass / -password  - Sets the server password.
 * -motd  - Set the server motto of the day text.
 * -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 additional cheat protection to the server.
 * -noupnp - Disables automatic universal plug and play.
 * -steam - Enables Steam support.
 * -lobby or  - Allows friends to join the server or sets it to private if Steam is enabled.

Server config file
It is possible to start the dedicated server using a configuration file that enters the above parameters automatically. The config file must be called using the -config parameter. The file can have any name, but must be in the same folder as TerrariaServer.exe. 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.

Comment lines can be included using the hash symbol (#). Lines that begin with # will be skipped entirely.

Banning and un-banning
The command "ban " 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 currently banned players. To un-ban a player, delete the player's name and IP address from the list.

System requirements

 * Windows Operating System
 * 500 MB free RAM for a small world (RAM depends on world size and number of players)
 * .NET Framework 4.0
 * XNA Framework

An easy method of installing .NET and XNA is to simply install the Terraria client, which should install both as part of its regular installation.

LAN

 * 1) Connect using a network cable (a switch can be used to increase the amount of players/laptops connected to the server).
 * 2) Right click the network icon on your toolbar and open Network and Sharing center.
 * 3) Click on the network connection (should say unidentified network).
 * 4) Open properties and highlight Internet Protocol Version 4 (TCP/IPv4) then click properties again.
 * 5) Set the IP addresses of all computers like so: IP address; 192.168.1.x0 (where x is the computer, ex. 192.168.1.10 for laptop running server then 192.168.1.20 and 192.168.1.30 ,etc. for all other computers. None of them can have the same IP address.
 * 6) The Subnet mask will populate itself
 * 7) The Default gateway has to be the same for all laptops! So you will put 192.168.1.10 (the laptop which is running the server)
 * 8) You will then save changes by exiting that window then go to the Status page and click on network properties.
 * 9) (IN PROGRESS eta 8/16/15)

History
also check out dearsoldiers server the builders workshop mk2 now it runs on tshock so play nice link is