A Terraria dedicated server is the free TerrariaServer program running your world on its own, so friends can play 24/7 whether you are online or not. To host a Terraria server yourself, run TerrariaServer from your Terraria folder (or the 1.4.5.8 download from terraria.org) on a Windows, Linux or Mac PC with 2–4 GB of free RAM, forward TCP port 7777, and save your settings in serverconfig.txt. Below is every step, plus TShock, all-items servers, mobile players and the errors people actually hit.
Host & Play or a dedicated server: which do you need?
Use Host & Play if your group only plays when you do. It runs the world inside your own game, so it closes the moment you quit. Set up a dedicated Terraria server if friends play at different times, if you want the world reachable all day, or if you want TShock or tModLoader running. The server program has no graphics and is happy on a spare PC or a Linux box.
| Host & Play | Dedicated server | |
|---|---|---|
| Where the world runs | Inside your game | In TerrariaServer, a separate program |
| World online after the host leaves? | No: “Local player left. Autoshutdown starting.” | Yes, it keeps running |
| How friends join | Join via Steam (friends) or Join via IP | Join via IP, or Steam with -steam |
| Config file and console commands | No | Yes: serverconfig.txt and a console |
| TShock plugins or tModLoader server | No (tModLoader has its own Host & Play) | Yes |
Terraria server requirements
A vanilla Terraria server needs 2–4 GB of free RAM and a reasonably modern CPU, with no graphics requirements at all. It runs on Windows, Linux or macOS. TShock’s own docs ask for at least 1 GB. tModLoader is the hungry one: every mod adds memory, and a Calamity-sized mod list wants 6–8 GB. Large worlds cost more memory than small ones.
| Your server | RAM to start with |
|---|---|
| Vanilla, small or medium world, a few friends | 2 GB |
| Vanilla, large world, up to 16 players | 4 GB |
| TShock (vanilla plus plugins) | at least 1 GB; size it like vanilla |
| tModLoader with a handful of mods | 6 GB |
| tModLoader with Calamity or a big mod list | 8 GB or more |
Running the server on the same gaming PC you play on is fine for a small vanilla group, but the game and the server each need their own memory. For modded play the game client alone is heavy: tModLoader lists 6 GB as its minimum before you even start a server. Don’t want to dedicate a PC at all? Terraria server hosting starts at 2 GB and changes RAM in one click.
Download the Terraria server software
You probably have it already. Steam and GOG installs of Terraria include TerrariaServer.exe in the game folder. For another machine, or for Linux, download the PC dedicated server zip from terraria.org. The current build is 1.4.5.8 (terraria-server-1458.zip), with Windows, Linux and Mac folders inside. Both are free, and the server must match your players’ game version.
- Steam (64-bit Windows):
C:\Program Files (x86)\Steam\steamapps\common\Terraria\TerrariaServer.exe - GOG: the
GOG Games\Terrariafolder - terraria.org zip, Windows folder:
TerrariaServer.exe, an exampleserverconfig.txtandstart-server.bat - Linux folder: the
TerrariaServerlauncher script andTerrariaServer.bin.x86_64 - Mac folder:
Terraria Server.app
How to make a Terraria server on Windows
Double-click TerrariaServer.exe, press n to create a world, answer the prompts, and the server is live on port 7777. Retyping the answers on every start gets old fast, so the second half of this section moves them into serverconfig.txt and starts the server from start-server.bat, which also restarts it automatically if it stops.
First start: the setup prompts
- Run
TerrariaServer.exe. A console opens at Choose World: with your existing worlds numbered. Typenfor a new world (d <number>deletes one). - Answer Choose size, Choose difficulty, Choose world evil (Random, Corrupt or Crimson), Enter world name and Enter Seed (leave it blank for a random one). On 1.4.5 you can also toggle special seeds here.
- Pick the new world’s number, then answer Max players (press enter for 16), Server port (press enter for 7777), Automatically forward port? (y/n) and Server password (press enter for none).
- When the console says Listening on port 7777 and Server started, you are up. Type
helpfor the console commands.
Every start after that: a config file
- Keep the example
serverconfig.txtfrom the download as a reference and edit a copy next toTerrariaServer.exe. - Set at least these lines (remove the
#in front of each one you use):world=C:\Users\YOU\Documents\My Games\Terraria\Worlds\MyWorld.wld autocreate=2 worldname=MyWorld difficulty=1 maxplayers=8 port=7777 password=pick-something worldrollbackstokeep=2If no world exists at that path,
autocreatemakes one (1 small, 2 medium, 3 large). After that the same file just loads it. - Start the server with
start-server.bat. It runsTerrariaServer.exe -config serverconfig.txtin a loop, so a crashed server comes straight back.
Running two worlds? Give each server its own config file, its own world and its own port.
How to set up a Terraria server on Linux (and Docker)
On Linux, use the Linux folder from the terraria.org zip. Make the binaries executable, copy serverconfig.txt over from the Windows folder (the Linux folder doesn’t include one), fix the world path, and run ./TerrariaServer -config serverconfig.txt inside tmux or screen so it keeps running after you log out. Docker works too: TShock publishes an image, and tModLoader ships Docker files for modded servers.
unzip terraria-server-1458.zip
cd 1458/Linux
chmod u+x TerrariaServer TerrariaServer.bin.x86_64
cp ../Windows/serverconfig.txt .
tmux new -s terraria
./TerrariaServer -config serverconfig.txt
- Linux worlds live in
~/.local/share/Terraria/Worlds. The example config has a Windows path in it, so changeworld=before you start. - Run the server under its own user account, not root.
- If it dies at once and
client-crashlog.txtsays Magic number is wrong: 542, runexport TERM=xtermand start it again. - On a Mac, run
Terraria Server.app; worlds are in~/Library/Application Support/Terraria/Worlds.
Docker: the official zip has no Docker files. TShock publishes an image that runs vanilla worlds with its admin layer on top (port 7777 for the game, 7878 for its REST API), and tModLoader ships a docker-compose.yml in its DedicatedServerUtils folder for modded servers.
docker run -it -p 7777:7777 \
-v ~/terraria/tshock:/tshock \
-v ~/terraria/worlds:/worlds \
ghcr.io/pryaxis/tshock:stable \
-world /worlds/MyWorld.wld -autocreate 2
The serverconfig.txt file: the settings that matter
serverconfig.txt is the Terraria server config file: one key=value per line, and a # at the start turns a line off. The server reads it when it starts with -config, so stop the server, edit, and start it again. The world-creation keys only matter when the server builds a new world; everything else applies on every start.
| Key | What it does |
|---|---|
world |
Path to the .wld file to load (and where autocreate puts a new one) |
autocreate, worldname, seed |
Build a new world: size 1–3, its name and its seed |
difficulty |
New world’s mode: 0 Classic, 1 Expert, 2 Master, 3 Journey |
seed_drunk, seed_zenith, seed_remix … |
Special seeds for a new world, 1 to switch each on |
maxplayers |
1 to 255 players at once |
port, password, motd |
Listening port (7777), join password, welcome message |
worldpath, banlist |
Folder for world files; ban list file (default banlist.txt) |
worldrollbackstokeep |
How many rolling world backups to keep |
secure, upnp |
Extra cheat protection; automatic port forwarding through UPnP |
npcstream, slowliquids, priority |
Less enemy skipping for more bandwidth; calmer liquids; process priority 0–5 |
journeypermission_* |
Per Journey power: 0 locked, 1 host only, 2 everyone |
Where the server files are: worlds are saved to Documents\My Games\Terraria\Worlds on Windows, ~/.local/share/Terraria/Worlds on Linux and ~/Library/Application Support/Terraria/Worlds on Mac. banlist.txt sits in the folder you start the server from. Each world is a .wld file, so backing up a server means copying that folder.
Terraria server port: 7777, and how to open it
Terraria servers listen on TCP port 7777 by default, so a Terraria server is TCP, not UDP. That’s the server port: the number players type after the IP. To let friends outside your house join, forward TCP 7777 on your router to the server PC and allow it through the firewall. On cloud machines such as AWS, the wiki says to open 7777 for both TCP and UDP. Change it with port= or -port.
- Find the server’s local IP: run
ipconfigand note the IPv4 address (on Linux,ip addr). Reserve that address for the PC in your router so it doesn’t change. - Forward the port: in the router’s admin page, add a rule for TCP 7777 to that local IP. If your router supports UPnP, answering
yto Automatically forward port? can do this for you. - Allow it through the firewall: on Windows, in an administrator Command Prompt:
netsh advfirewall firewall add rule name="Terraria Server" dir=in action=allow protocol=TCP localport=7777On Linux with ufw:
sudo ufw allow 7777/tcp. - Find your public IP by opening any “what is my IP” site on the server PC. That plus the port is the address friends use.
How to find the server port later: type port in the server console, or check port= in the config. Is opening port 7777 safe? It only exposes the Terraria server program, not the rest of the PC. The downsides are that your home IP is visible to anyone you give it to, and some ISPs use CGNAT, which means no port forward will work at all.
How to join a Terraria server (PC, Steam and mobile)
On PC, choose Multiplayer, then Join via IP, pick a character, and type the server’s address and port at Enter Server IP Address and Enter Server Port. The host machine itself can use localhost. Steam friends can use Join via Steam if the server runs with -steam. Mobile players join from Multiplayer, then Online, by adding the server’s IP and port.
- Same house: use the server’s local IP (it starts with
192.168on most home networks). - Everyone else: your public IP and port, after the port is forwarded. Pin it in your group’s Discord so nobody has to ask twice.
- Steam: start the server with
-steam -lobby friends(or-lobby privatefor invite only). Anyone who isn’t on the host’s friends list sees Only the host’s steam friends may enter this server and should join by IP instead.
Can you make a Terraria server on mobile?
Not a dedicated one: the server software is for PC only. On a phone or tablet you can host a local game for people on the same network from Multiplayer, then Local, with up to 8 players (the device needs at least 1 GB of RAM). For an online mobile server, run a dedicated server on a PC or a host and have mobile players add it under Online.
Terraria crossplay servers
PC and mobile players can already share a dedicated server, because the two versions are kept at parity (the wiki notes this is probably unintentional). Console players can’t join PC servers yet. Re-Logic’s Crossplay Phase One, planned for 1.4.6, is meant to let console players join LAN games and dedicated servers over the internet; it has no release date yet.
Running a Terraria server 24/7
A 24/7 Terraria server is just a dedicated server on a machine that never sleeps, started from a script that restarts it if it crashes. On Windows that’s start-server.bat; on Linux, a tmux session or a service. Shut it down with the exit command, never by closing the window, because the server only saves on shutdown when you use exit.
- When nobody is online the server hibernates and time stops, so an empty server doesn’t burn through in-game days.
- Since 1.4.5.0 the server saves the world when the last player leaves, and
worldrollbackstokeepkeeps older copies of the world file. start-server.batrestarts the server whenever it stops, including afterexit. To stop for good, typeexit, wait for the save, then close the window while it says Restarting server…- Update when Terraria updates: players on a newer version can’t join an older server. Steam updates the bundled
TerrariaServer.exewith the game; for the zip, download the new one. Copy theWorldsfolder first.
Run a TShock Terraria server: admin tools, PvP and survival
TShock is a free, open-source server that runs vanilla worlds with an admin layer on top: player accounts, groups and permissions, protected regions, bans, warps, automatic backups and a REST API. That makes it the usual pick for public survival and PvP servers you run yourself. TShock 6.2.1 supports Terraria 1.4.5.8. Players need nothing extra; they join with the normal game.
- Download the latest release from TShock’s GitHub, unzip it into its own folder and run
TShock.Server.exe(TShock.Serveron Linux and Mac). Answer the same world prompts as vanilla. - Join the server, read the setup code in the console, and type
/setup 12345(your code) in game chat. - Create your owner account with
/user add yourname yourpassword owner, log in with/login yourname yourpassword, then type/setupagain to switch the setup system off. - Settings live in
tshock/config.json. Keeptshock.sqlitesafe: lose it and you set TShock up again.
Useful config.json settings: PvPMode (normal, always or disabled) for a PvP server, RequireLogin and SpawnProtection for a public survival server, BackupInterval (minutes, default 10) for backups in tshock/backups, and RestApiEnabled with RestApiPort (default 7878) for remote tools. The full command list, including admin and cheat commands, is in Terraria server commands.
Make your own Terraria free items server
A free items or all items server is a Terraria world where any item is easy to get, so people can build, test loadouts or mess with endgame stuff without grinding. Public ones come and go, but you can make your own in two ways: a Journey Mode world, where researched items can be duplicated without limit, or a TShock server, where admins spawn any item with /item. On 1.4.5 that’s 650+ more items than 1.4.4 had.
- Journey Mode: set
difficulty=3for a new world. Each item has to be researched a set number of times (1 for weapons and armor, 20 for potions, 100 for blocks), then it can be duplicated forever, and teammates share fully researched items. Use thejourneypermission_*keys to decide who can use godmode, time and spawn rate. Only Journey characters can join a Journey world. - TShock:
/item "terra blade"gives you an item,/give <item> <player>gives one to someone else, and thetshock.item.spawnandtshock.item.givepermissions control who may use each. This works on normal worlds and characters.
Modded servers: tModLoader and Calamity
Mods such as Calamity don’t run on the vanilla or TShock server. They need a tModLoader dedicated server, and every player needs tModLoader with the same mods. tModLoader is a separate install with its own worlds folder, and its stable releases are still built on Terraria 1.4.4, so 1.4.5 items and seeds aren’t in modded worlds yet. Setup, mod packs and the errors you’ll meet are covered in how to add mods to a Terraria server.
Common Terraria server problems and fixes
Most Terraria server problems are one of five things: the wrong IP, a port that isn’t forwarded, a version mismatch, another program holding port 7777, or a character that doesn’t match the world’s mode. The message on screen usually tells you which. Check the server console as well, because since 1.4.5.7 it logs players who disconnect before they finish joining.
| Problem | Most likely cause | Fix |
|---|---|---|
| Stuck on “Found server” | Another program is using port 7777 on the host (tModLoader’s guide names ASUS Armoury Crate) | Check Resource Monitor for anything on 7777, or start the server on another port |
| “Lost connection” right after joining | The server crashed, kicked you or dropped the connection | Read the server console; restart it with exit and start again |
| Stuck on “Starting server…” in Host & Play | The built-in server failed to start | Since 1.4.5 the game shows an error when this happens. Close any other Terraria server using the same port and try again |
| “You are not using the same version as this server.” | Client and server are on different versions | Update whichever side is behind |
| Can’t connect at all | Gave out a 192.168 address, port not forwarded, firewall, or CGNAT |
Use the public IP, forward TCP 7777, add the firewall rule |
| “Only Journey characters may enter a Journey world.” | Character and world modes don’t match | Use a Journey character, or a non-Journey world |
| Linux server quits with “Magic number is wrong: 542” | Terminal type | export TERM=xterm, then start again |
| Progress lost after a restart | The window was closed instead of using exit |
Always exit; restore from a rollback or backup |
Looking for public Terraria multiplayer servers to join instead? The official Terraria forums have a section for dedicated servers, and community server lists link to more. Each one sets its own rules and version.
Are Terraria servers down? There is no central Terraria server behind a dedicated server. If yours is unreachable, the cause is the machine, your network or your host. Only Join via Steam depends on Steam being online.
Skip the setup: rent a Terraria server
Running your own server means a PC that stays on, a port forward that survives router resets, and a config file you edit by hand. If you’d rather just play, Terraria server hosting on GameTeam is ready in minutes: vanilla or tModLoader, pay per GB of RAM from $0.49/GB a week with unlimited slots, and nothing to forward.
The built-in AI copilot handles the fiddly parts. Type “make a new large Master Mode world for 10 of us and put a password on it” and it writes serverconfig.txt and restarts, or paste “my friend gets You are not using the same version as this server” and it reads the log and tells you which side is behind.
FAQ
Can you make a Terraria server?
Yes. Anyone who owns Terraria on PC can run the free dedicated server that comes with the game, or download it from terraria.org. You need a PC that can stay on and a forwarded port, or a host.
Is making a Terraria server free?
The software is free. Running it costs a PC you leave on (and its power), or a hosting plan.
How much does it cost to make a Terraria server?
Nothing beyond hardware you already have if you host at home. Hosted, a 2 GB vanilla server on GameTeam is $0.98 a week and 4 GB is $1.96 a week, billed by the GB of RAM with unlimited slots.
How much RAM do I need for a Terraria server?
2–4 GB for vanilla, depending on world size. TShock needs at least 1 GB. Modded servers need more: 6 GB for a few mods, 8 GB or more for Calamity or a big list.
How do I find the IP for my Terraria server?
For players on your network, run ipconfig on the server PC and use the IPv4 address. For everyone else, use your public IP (“what is my IP”). On a hosted server, the address is in the control panel.
How many players can join a Terraria server?
Up to 255, set with maxplayers. The default is 16. Mobile local games are capped at 8.
