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. For running on a Linux distribution, you must download the server files. See the Downloads section.

A server can also be used for standalone single-player gameplay. This offers the ability to adjust the in-game time at will.

Before You Host
The server runs on TCP port 7777 by default. If you are behind NAT (e.g. residential user), the port used must be port-forwarded in order for other players be able to join. If one can't forward a port, one may choose to use a VPN service like Hamachi or Radmin VPNinstead (although in those cases, every player needs to install the VPN software). The default max players is 8 (16 as of 1.4.0.1), but this can be changed during server start-up, as well as within the server configuration file (serverconfig.txt). Non-NAT connections(e.g. business or data center user) typically do not need port forwarding, but may need to allow the port through a firewall.

If running on a cloud service provider such as AWS or GCP, ensure port 7777 on TCP and UDP is open to allow connections to the server.

Public servers
Some active servers:


 * Dark Gaming - https://terraria-servers.com/server/90/ (IP: t.dark_gaming.com, Port: 7777


 * Eternia - https://discord.gg/S9azyx8 (IP: eternia.ga, PC Port: 7777, Mobile Port: 1111)


 * Aurora Gaming - https://aurora-gaming.org (IP: t.aurora-gaming.com, Port: 7777)
 * Pedguin's Minigame Server - https://pedguin.com (IP: pedguin.com, Port: 7777)
 * Capture the Gem, Spleef, Build My Thing, Penguin Party, Parkour, Who is the Killer, Terra Strike, Class Wars, Defend the Fortress, and Races; PvE events in the PvE lobby and Survival in the Survival lobby.
 * Must use a new Softcore character. Play as Guest or use /register "password".
 * Teeria Legends - https://www.teeria.eu (IP: t.teeria.eu, Port: 7777)
 * Terraria One - https://terraria.one (IP: terraria.one, Port: 7777)

Other servers can be found via these server lists:

Joining Servers
A server can be joined by selecting the Multiplayer option on the main menu, selecting a character, and then entering the server's IP and port.

Often different servers have different requirements for a player to join. Some servers will require the player to have a Softcore or Mediumcore player to play, and some may require that players be at a certain level of the game before joining. Often a public server will have a /register and /login system where the player must have a character with both a unique name and password.

Public servers also usually are run by a group of Administrators and/or Moderators who enforce or regulate rules. Often these rules will disallow mods and hacks, impersonation, and the like. Some servers may also have the capability to allow a player to play online with their singleplayer character without losing their singleplayer inventory.

A list of servers you have recently played will be saved under "Join via IP" in Multiplayer.

How to (Windows)
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

If you do not have steam: %programfiles(x86)\terraria or %programfiles%\terraria

If you use GOG: GOG Games\terraria

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

How to (Linux)
Prerequisites:

First we will install the tools we need to run the server. These are likely preinstalled on your distribution. For a debian based system (Ubuntu), run: sudo apt update && sudo apt install -y wget tmux unzip Starting the server:

See the Downloads section to get the link to the latest download. Then download the file: wget the_latest_link_here Unzip the file unzip terraria-server* Navigate into the directory you just unzipped. As of 1.4.0.4 the directory is called '1404'. This may change for future versions. cd 1404 Navigate to the Linux directory cd Linux Add executable permissions to the server binary sudo chmod +x TerrariaServer.bin.x86* Launch the server. The 64 bit version is TerrariaServer.bin.x86_64, the 32 bit version is TerrariaServer.bin.x86 ./TerrariaServer.bin.x86_64 Place your world files in the following location for the server to find them: ~/.local/share/Terraria/Worlds/ Launching in the background:

Tmux is a modern version of screen that allows multiple virtual terminal instances. We will use it to launch the server in the background.

Launch the server in a tmux session tmux In the tmux session, launch the server ./TerrariaServer.bin.x86_64 Now the server should start up as normal. To detatch from the tmux instance, leaving the server running in the background, use the following key combination  d You should now be back at the previous terminal instance. You can see that the tmux session is running in the background with tmux list To re-attach to the instance to edit or shut it down, just run tmux attach

Notes:

In some cases it is needed to export TERM variable in this way: export TERM=xterm

How to (RPI / Others OSes)
If you are using an operating system (Such as Raspbian or FreeBSD) that does not come with a prebuilt executable, you could use mono to start the server.

This could be useful if you want to host a server on a device such as a Raspberry Pi, or any device that does not run on the x86 architecture.

Prerequisites:

NOTE: If you are using a non-x86 Linux-based operating system (Such as Raspbian), the first few instructions should be the same as the one found here, up until the chmod command.

You would need to install mono and and any other required libraries (such as sqlite or screen) if it does not come preinstalled on your system.

Launching the server:

Download and extract the Terraria files following your system specifications. (For Raspberry Pi Users Follow The Linux Guide)

Navigate to the Linux directory.

Launch the server by using the following mono command: mono --server --gc=sgen -O=all ./TerrariaServer.exe

The server should run as expected.

Troubleshooting:

If you encounter an error saying "Your mono runtime and class libraries are out of sync.", navigate within the Terraria directory and remove monoconfig, mscorlib.dll, and any files that begin with "Mono" or "System".

Example instructions with Linux: rm System* rm Mono* rm monoconfig rm mscorelib.dll

WindowsBase.dll and FNA.dll should be the only .dll files in the directory

NOTE: This procedure will delete any other files starting with "Mono" or "System", so keep that in mind!

Downloads
The vanilla Terraria server software is included with the regular Terraria package (see above), but can also be downloaded:
 * Terraria Server 1.3.3.3
 * Terraria Server 1.3.4.4
 * Terraria Server 1.3.5.3
 * Terraria Server 1.4.0.1
 * Terraria Server 1.4.0.2
 * Terraria Server 1.4.0.3
 * Terraria Server 1.4.0.4

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 (Latest version 1.3.2.1; No longer maintained.)

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 the TShock readme.

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 friends / -lobby private - Allows only friends to join the server or sets it to private if Steam is enabled.
 * -ip  - Sets the IP address for the server to listen on
 * -forcepriority  - Sets the process priority for this task. If this is used the "priority" setting below will be ignored.
 * -disableannouncementbox - Disables the text announcements Announcement Box makes when pulsed from wire.
 * -announcementboxrange  - Sets the announcement box text messaging range in pixels, -1 for serverwide announcements.
 * -seed  - Specifies the world seed when using -autocreate

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:


 * world=C:\Users\Defaults\My Documents\My Games\Terraria\Worlds\world1.wld - Load a world and automatically start the server.
 * autocreate=3 - Creates a new world if none is found. World size is specified by: 1(small), 2(medium), and 3(large).
 * seed=AwesomeSeed - Sets the world seed when using autocreate
 * worldname=World - Sets the name of the world when using autocreate
 * difficulty=0 - Sets world difficulty when using -autocreate. Options: 0(normal), 1(expert), 2(master), 3(journey)
 * maxplayers=8 - Sets the max number of players allowed on a server. Value must be between 1 and 255
 * 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
 * banlist=banlist.txt - The location of the banlist. Defaults to "banlist.txt" in the working directory.
 * secure=1 - Adds additional cheat protection.
 * language - Sets the server language from its language code.
 * available codes:
 * en/US = English
 * de/DE = German
 * it/IT = Italian
 * fr/FR = French
 * es/ES = Spanish
 * ru/RU = Russian
 * zh/Hans = Chinese
 * pt/BR = Portuguese
 * pl/PL = Polish
 * upnp=1 - Automatically forward ports with uPNP.
 * npcstream=60 - Reduces enemy skipping but increases bandwidth usage. The lower the number the less skipping will happen, but more data is sent. 0 is off.
 * priority=1 - Default system priority 0:Realtime, 1:High, 2:AboveNormal, 3:Normal, 4:BelowNormal, 5:Idle
 * Journey mode power permissions for every individual power. 0: Locked for everyone, 1: Can only be changed by host, 2: Can be changed by everyone
 * journeypermission_time_setfrozen=2
 * journeypermission_time_setdawn=2
 * journeypermission_time_setnoon=2
 * journeypermission_time_setdusk=2
 * journeypermission_time_setmidnight=2
 * journeypermission_godmode=2
 * journeypermission_wind_setstrength=2
 * journeypermission_rain_setstrength=2
 * journeypermission_time_setspeed=2
 * journeypermission_rain_setfrozen=2
 * journeypermission_wind_setfrozen=2
 * journeypermission_increaseplacementrange=2
 * journeypermission_setdifficulty=2
 * journeypermission_biomespread_setfrozen=2
 * journeypermission_setspawnrate=2

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, when they try to login, will be displayed the message:You are banned for [duration]: [reason]- [modname]. 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
Below are instructions for a very basic LAN party setup. At the very least, all computers must be connected to the same network for this to work. If you feel so inclined, you can set the server to have a static LAN IP address, but that's not really necessary. Note that these instructions are targeted at people who have little to no networking experience, and just want to play games.
 * 1) Make sure that all computers are connected to the same network
 * 2) * Connect the computers to the network via ethernet if possible, since ethernet is almost always faster than wireless.
 * 3) * If you have a regular home router and want to connect many players, you can connect more computers to the network via ethernet by use of a switch. Simply plug any port of the switch into the router, and plug the rest of the computers (and the server) into the switch. If you don't have a switch, try to at least connect the computer running the server to the network via ethernet. If you can't do that, just make sure all computers are connected to the same wifi connection and it will probably work, just a bit more slowly.
 * 4) Get server information
 * 5) * First, make sure that the server is connected to the internet, or at least connected to your router. To test router connectivity, you can try logging into your router via web panel. Usually the router login information is printed on a sticker on the back of the router. If the page loads, great - just make sure the other computers are connected to the same network.
 * 6) * Windows:
 * 7) ** Open Command Prompt and run "ipconfig" to get information about your network. Record the IP address that appears after "IPV4 Address......" It should be something like 192.168.1.27, 172.16.0.55 10.0.0.42. This is the IP address you will use for joining on terraria. If the IP address starts with 127, look for one that doesn't. If it starts with 169, you're doing something wrong.
 * 8) *MacOS:
 * 9) **Open System Preferences > Network and record the IP Address. See above for what the IP should look like.
 * 10) *GNU/Linux:
 * 11) **Run "ifconfig" or "ip a" from a terminal window to get your local IP. See above for what the IP should look like.
 * 12) Connect the clients to the server
 * 13) * Open Terraria, click multiplayer, and connect to the IP address that you recorded from the second step.
 * 14) * You should be connected to the server!
 * 15) Troubleshooting (if something doesn't work)
 * 16) * Make sure that the firewall on the computer running the server is disabled, or at least allows traffic through on port 7777. Be sure to re-enable the firewall once again when you have the chance.
 * 17) * If your local IP address does start with 169, you should check your network settings to get connected to the internet.
 * 18) * The IP of the server may change, especially if the router restarts. If you are unable to connect to the server, go through step 2 once again to see if the IP has changed.
 * 19) ** If this becomes a recurring problem, you should look up "setting a static IP on (OS Name)", where OS Name is the name of the server's operating system.
 * 20) *If you set the port of the Terraria server to something other than the default of 7777, make sure that the clients are connecting to whatever port the server is configured to use.

History
Serveur