Terraria

How to Host a Terraria Server for Your Friends

Host & Play versus a dedicated server, the questions TerrariaServer.exe asks, a ready serverconfig.txt and the console commands you will actually use.

TheGameHosting Team 8 min read
Two monitors, keyboard and mouse on a gaming desk with green lights, a setup you can use to learn how to host a terraria server
One PC at home can run the Terraria server, as long as it stays on. Photo: Shixart1985, CC BY 2.0

Here is how to host a Terraria server for your friends: run TerrariaServer.exe (it ships with the game on Windows, or download the PC Dedicated Server from terraria.org), pick or create a world, set the max players, keep port 7777, add a password, then forward TCP port 7777 on your router. Friends open Multiplayer, choose Join via IP and type your public IP and port. Everyone has to be on the same game version as the server.

Below you will find when Host & Play is enough, the exact questions the server asks, a ready serverconfig.txt, the console commands you will use, what to know about versions and crossplay, and how the same setup looks on a hosted server where the world stays online when your PC is off.

Host & Play or a dedicated server?

Terraria gives you two ways to play together. Host & Play runs the world from the host's game: you open Multiplayer, choose Host & Play, pick your character and world, and friends join through Steam or with Join via IP. The official wiki is clear about the catch: the world shuts down when the player who hosted it leaves. A dedicated server is a separate program that only runs the world. It needs no graphics, no player has to stay connected, and it keeps going while everyone logs on and off.

Host & PlayDedicated server
Who runs the worldThe host's gameTerrariaServer.exe on a PC or a hosted server
When the host quitsEveryone is kicked and the world closesNothing happens: the world keeps running
SetupA few clicks in the game menuA console program plus a config file
Admin toolsBasicConsole commands: kick, ban, save, password, MOTD
Best forOne evening with friendsA shared world people play on their own schedule

If your group plays at different times, or you are tired of being the one who can never log off, go for the dedicated server.

How to host a Terraria server on your PC, step by step

Step 1: Get the dedicated server

On Windows, the server is already in your Terraria install folder: in Steam, right-click Terraria, then Manage, then Browse local files, and you will see TerrariaServer.exe. The other option is the PC Dedicated Server download on terraria.org. Right now it is version 1.4.5.8, a zip with three folders:

  • Windows: TerrariaServer.exe, an example serverconfig.txt and start-server.bat.
  • Linux: make TerrariaServer.bin.x86_64 executable with chmod +x and run it. The wiki suggests running it inside tmux so it keeps going after you close SSH.
  • Mac: a Terraria Server.app. On Apple Silicon Macs it needs Rosetta 2.

Step 2: Start it and answer the questions

Double-click TerrariaServer.exe. Without a config file, the console walks you through the setup:

The console asksWhat to answer
Choose World:The number of an existing world, or n for a new one. A new world also asks for size, difficulty, world evil, name and seed.
Max players (press enter for 16):Your group size. The server accepts 1 to 255.
Server port (press enter for 7777):Press Enter to keep 7777.
Automatically forward port? (y/n):y tries UPnP on your router. The wiki warns it does not always work.
Server password (press enter for none):Set one unless you want anyone with the IP to join.

When you see Listening on port 7777 and Server started, the world is live. Your worlds are the same .wld files the game uses: on Windows they are in Documents\My Games\Terraria\Worlds, and on a Mac in ~/Library/Application Support/Terraria/Worlds.

Step 3: Open TCP port 7777

Friends on your home network can join right away with your PC's local IP. Friends over the internet need TCP port 7777 forwarded on your router to your PC's local IP, and allowed by that PC's firewall. If automatic forwarding failed, do it by hand. The router screens are the same ones we walk through in our guide to port forwarding a Minecraft server; only the port changes, 7777 TCP for Terraria instead of 25565.

Step 4: Invite your friends

Each friend opens Multiplayer, chooses Join via IP, picks a character, types your public IP, then the port (7777) and the password. Characters stay on each player's own computer; the world is what lives on the server. If someone gets You are not using the same version as this server., they or you need to update.

Skip the questions with serverconfig.txt

Answering the same prompts every time gets old. The Windows server comes with an example serverconfig.txt, and start-server.bat already runs TerrariaServer.exe -config serverconfig.txt and restarts the server if it crashes. Remove the # in front of the lines you want. A simple setup for friends:

Code
world=C:\Users\YOU\Documents\My Games\Terraria\Worlds\Friends.wld
autocreate=2
worldname=Friends
difficulty=1
maxplayers=8
port=7777
password=change-me
motd=Welcome back. Do not cut the purple trees!
secure=1
language=en-US
SettingWhat it does
worldPath to the .wld to load; the server starts without asking
autocreateCreates the world if it is missing: 1 small, 2 medium, 3 large
worldname / seedName and seed for a world made by autocreate
difficulty0 Classic, 1 Expert, 2 Master, 3 Journey (only for new worlds)
maxplayersPlayer limit, 1 to 255
port / password / motdPort (7777 by default), join password and message of the day
secure1 adds extra cheat protection
languageServer language, such as en-US or es-ES
upnp / worldpath / banlistAutomatic port forwarding, worlds folder and ban list file

Every setting also exists as a launch option, such as -port 7777, -maxplayers 8 or -password. The full list is in the Server page of the official Terraria wiki.

Terraria server console commands

Type these in the server window, without a slash:

CommandWhat it does
helpLists every command
playingShows who is online
saveSaves the world now
exit / exit-nosaveStops the server with or without saving
kick <player> / ban <player>Kicks or bans a player
password / password <pass>Shows or changes the password
motd <text> / say <text>Changes the message of the day or messages everyone
dawn, noon, dusk, midnightChanges the time of day
version / seedPrints the server version or the world seed

Always use exit, not the window's close button, so the world saves before it stops.

Versions, crossplay and who can join

The server and every player must run the same version. Terraria updates through Steam, so after a patch, update the server too (download the new zip from terraria.org, or your install folder already has it). The current PC server is 1.4.5.8.

On crossplay, keep expectations simple. The official wiki says players on different platforms generally cannot play together, that Android and iOS can play with each other, and that PC and mobile meeting on a dedicated server works only because the versions match and is likely unintentional. Plan your server for PC players; if your group mixes in phones or consoles, test it before you promise anything.

Vanilla, TShock or tModLoader?

  • Vanilla: the official server above. Players join with the normal game.
  • TShock: a community server built on the vanilla one that adds groups, permissions, anti-grief tools and plugins, while players still join with the normal game. Version 6.2.1 supports Terraria 1.4.5.8.
  • tModLoader: for mods such as Calamity. Everyone needs tModLoader with the same mods as the server. We cover it in how to make a tModLoader server.

How to host a Terraria server on TheGameHosting

Everything above works, but the world only exists while your PC is on, and your friends connect to your home IP. On a hosted server the steps are shorter, and you can compare both routes in hosting a server on your PC or online (it uses Minecraft, but the trade-offs are the same). Our Terraria server hosting page lists what each plan includes.

  1. Go to Pricing and choose a plan. Terraria needs 1 GB of RAM, so the 2 GB plan at $1.90 USD/month runs it; give tModLoader worlds more.
  2. Pay. Your server is ready in about 60 seconds. If it came with another game, switch it to Terraria with Game Changer.
  3. Open Startup to set the startup values, such as the world name, player limit and password. Anything not listed there goes in the config file in Files.
  4. To bring your own world, stop the server and upload the .wld from Documents\My Games\Terraria\Worlds through Files or sFTP, then point the server at it.
  5. Make a copy in Backups before a boss attempt or a game update.
  6. Share the address and port shown in the panel. The server already has a public IP: nothing to forward on your router.

Skip the setup: keep your Terraria world online

Hosting a Terraria server at home is a good weekend project, but it ties the world to your PC, your router and your power bill. A TheGameHosting server runs on AMD 9950X/7950X3D CPUs with DDR5 RAM and NVMe storage in Dallas or Amsterdam, with DDoS protection, unlimited slots, one-click backups and 24/7 support by chat, email and tickets. Terraria starts on the 2 GB plan at $1.90 USD/month, and the same plan can switch to another game with Game Changer whenever your group wants a break. Pick a size in Pricing and use code FULL2026 at checkout for 15% off for life.

FAQ

What port does a Terraria server use?

TCP 7777 by default. You can change it with port= in serverconfig.txt or with -port; forward whichever port you choose to the PC running the server.

Does the host have to stay online for others to play?

With Host & Play, yes: the world shuts down when the host leaves. With a dedicated server, no: the world runs on its own while players come and go, as long as the machine running it stays on.

How many players can join a Terraria server?

The dedicated server accepts a maxplayers value from 1 to 255, and the setup prompt suggests 16. In practice the number you can handle depends on the machine's RAM and CPU.

Can mobile or console players join a PC Terraria server?

Do not count on it. The official wiki says different platforms generally cannot play together; PC and mobile sometimes meet on a dedicated server when the versions match, which the wiki calls likely unintentional.

Is my character saved on the server?

No. In vanilla Terraria each player's character stays on their own computer and only the world lives on the server. Back up the world .wld file; players back up their own characters.

How much RAM does a Terraria server need?

Terraria needs at least 1 GB, so it runs on our 2 GB plan. Large worlds, more players online and tModLoader mods need more. See Terraria server hosting for every size.

Hosting for these games

Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.

All posts