How to Make a Terraria Server (2026 Guide)
Set up your own Terraria dedicated server. Official download, serverconfig.txt, port 7777, Linux commands, tModLoader for Calamity and common fixes.
Updated Sep 30, 2026 · 6 min read
On this page
A Terraria dedicated server keeps your world online so friends can dig, build and fight bosses without the host keeping the game open through Host and Play. The official server is free, light on resources and runs on Windows, Linux and macOS. This guide covers vanilla and tModLoader servers from start to finish, and ends with a quicker option if you would rather not run it yourself.
Short on time? You can skip the download, serverconfig.txt, port forwarding and leaving your PC on. GamezServers Terraria hosting gives you a live server with its own IP and port in about 60 seconds, and our quick start guide shows every step.
What you need
- A PC or server that stays on. Windows, Linux and macOS are all supported.
- Modest RAM. Terraria is one of the lightest servers to run:
| Server | RAM for the server |
|---|---|
| Vanilla, small or medium world, up to 8 players | 2 GB |
| Vanilla large world, or tModLoader with a few mods | 4 GB |
| Calamity, Thorium or a big mod list | 6 GB |
- A world file, or let the server create a new one.
- Access to your router to forward one TCP port.
For more on sizing, see how much RAM a game server needs.
Step 1: Download the official server
Go to terraria.org and scroll to the footer, where you will find the PC Dedicated Server download. It is a zip file named after the version, and it must match the version your players run. After a game patch, download the matching new server, and remember to do it every time, or friends get kicked with a version mismatch. A hosted server updates from a panel instead.
Extract the zip. Inside are separate folders for Windows, Linux and Mac. Copy the one for your system into a folder such as C:\terraria-server or /home/terraria/server.
If you own Terraria on Steam, the Windows server is also already in your game folder as TerrariaServer.exe.
Step 2: First start
Windows: double click TerrariaServer.exe or start-server.bat. The console walks you through choosing or creating a world, the player limit, the port, whether to try automatic port forwarding, and a password.
Linux: make the server executable and start it:
chmod +x TerrariaServer.bin.x86_64
./TerrariaServer.bin.x86_64
The same prompts appear. When the console shows the server is listening on the port, it is running. Type exit to save and stop it.
Answering the prompts every time gets old, so the next step makes the server start on its own.
Step 3: Set up serverconfig.txt
The download includes an example serverconfig.txt. Each line is a key=value pair, and lines starting with # are comments. The settings most people use:
world=: the full path to the.wldworld file to load.autocreate=: create a world if the file does not exist.1small,2medium,3large.worldname=: the name for an automatically created world.difficulty=: for new worlds.0classic,1expert,2master,3journey.maxplayers=: the player limit.port=:7777by default.password=: leave empty for no password.motd=: the message players see on joining.worldpath=: the folder where worlds are stored.secure=:1turns on extra cheat protection.upnp=:1tries to forward the port automatically on routers that allow it.
A minimal config looks like this:
world=C:\terraria-server\worlds\MyWorld.wld
autocreate=2
worldname=MyWorld
difficulty=1
maxplayers=8
port=7777
password=changeme
motd=Welcome to our world
Then start the server with the config:
TerrariaServer.exe -config serverconfig.txt
On Linux use ./TerrariaServer.bin.x86_64 -config serverconfig.txt. On Windows you can put that command in start-server.bat so a double click does the rest.
Using an existing world
Your worlds live in Documents\My Games\Terraria\Worlds on Windows and ~/.local/share/Terraria/Worlds on Linux. Copy the .wld file into your server folder and point world= at it. Characters are not part of the world, each player keeps their own.
Step 4: Server console commands
Type these into the server console while it runs:
savesaves the world,exitsaves and shuts down.playinglists connected players.say <message>broadcasts to everyone.kick <player>andban <player>remove players.dawn,noon,duskandmidnightchange the time.helplists everything else.
Step 5: Open the port
Terraria uses one port: 7777 TCP. Forward it to your server's local IP in your router, and allow the server through Windows Defender Firewall or ufw. If upnp=1 worked, the router may already have done it for you, but it is worth checking. Our port forwarding guide walks through it. If your internet provider uses CGNAT, forwarding will not work at all, which is the point where many people switch to a hosted server with its own address.
Step 6: Let friends connect
- Launch Terraria on the same version as the server.
- Click Multiplayer, then Join via IP.
- Pick a character, then enter your public IP address.
- Enter the port,
7777, and the password if you set one.
Players on your home network use the server PC's local IP instead. Everyone needs their own copy of Terraria on PC. The world is only online while your PC is on and awake, so turn off sleep mode if friends play without you. Stuck on "Connecting"? See Terraria can't connect to server.
Running mods with tModLoader
Vanilla Terraria has no mod support, so modded servers run tModLoader, the free official modding platform, which is its own Steam app. Install it through Steam or from its GitHub releases, and set up your mods by playing with them enabled in tModLoader first. The server loads the mods enabled in the tModLoader Mods folder.
Start the modded server with start-tModLoaderServer.bat on Windows or ./start-tModLoaderServer.sh on Linux from the tModLoader folder. It uses the same serverconfig.txt format and the same port. Players join through tModLoader rather than regular Terraria, and it can download the server's mods for them when they connect. Big mods like Calamity use far more memory than vanilla, so give them 4 to 6 GB. Our guide on adding mods to a Terraria server covers mod packs and enabled.json in more detail.
Common problems
- Friends cannot connect but you can: port 7777 TCP is not forwarded, the firewall is blocking the server, or they are using your local IP instead of your public one.
- "You are not using the same version as this server": the server and players are on different Terraria versions. Download the matching server from terraria.org. See how to fix Terraria version mismatch.
- The server asks the setup questions every time: it was started without
-config serverconfig.txt, or theworld=path is wrong. - World lost after a crash: stop the server with
exitinstead of closing the window, which saves first. Keep copies of the.wldfile, Terraria also writes a.bakbackup next to it. - tModLoader players get kicked on join: their mod versions differ from the server. Let tModLoader sync the mods, or update both sides.
The easy way
Running Terraria yourself is simple enough, and now you know how. What wears people down is the ongoing part: your PC has to stay on whenever anyone plays, your home IP is shared with everyone who joins, port 7777 has to stay forwarded, and every patch means downloading a new server before friends can get back in. A hosted server does that part for you. Pick a plan, pay, and your world is online in about a minute with its own address, vanilla or tModLoader chosen from the panel, your own world uploaded in the browser and one click backups before every boss. You can split the bill with friends too. See Terraria server hosting for plans, or how to host a Terraria server for the walkthrough.
Skip the setup. Your Terraria server, live in 60 seconds.
Plans first month from $2.49. No command line, cancel any time.