> Intel // field guide_
How to Host a Terraria Dedicated Server: Setup Guide
Want your friends to be able to join your Terraria world without you having to be in-game? Hosting a Terraria server gives you control over your multiplayer world, from world settings to player limits to backups. This guide walks you through setting up and running a Terraria dedicated server, either on your own PC or with a host.
Why Host a Dedicated Terraria Server?
Terraria's built-in "Host & Play" option works, but it has limits:
- The host must stay online: if the host quits, the world closes
- Performance depends on the host's PC: the game and the server share one machine
- Admin tools are limited: managing troublemakers is awkward
A dedicated server runs separately from anyone's game. You get a world that can stay online all the time and server console commands for kicking, banning and saving.
Option 1: Hosting From Your PC (Local Server)
Before you start: this method needs your PC to run the Terraria server program the whole time people are playing. It works well for small friend groups but isn't ideal if you want the world online 24/7.
Step 1: Find the Terraria Server Files
If you own Terraria on Steam, the server is already installed:
- Open your Steam library
- Right-click Terraria → Properties → Installed Files → Browse
- Look for TerrariaServer.exe in the Terraria folder
- If it's missing, verify the game files through Steam
You can also download the dedicated server files from the official Terraria website (look for the "Dedicated Server" link at the bottom of the page). That download includes Windows, macOS and Linux versions.
Step 2: Create a Server Configuration File
The server can ask you questions every time it starts, but a serverconfig.txt file saves time. Create one in the same folder as the server:
- Open Notepad (or another text editor)
- Copy this basic configuration:
world=C:\Users\YOU\Documents\My Games\Terraria\Worlds\MyWorld.wld
autocreate=2
worldname=MyWorld
difficulty=0
maxplayers=8
port=7777
password=YourSecurePassword
motd=Welcome to our server!
banlist=banlist.txt
secure=1
language=en-US
upnp=1
- Save the file as serverconfig.txt
- Make sure the file extension is .txt, not .txt.txt
What these settings mean:
- world: the full path to the world file to load
- autocreate: creates the world if it doesn't exist: 1 (small), 2 (medium), 3 (large)
- worldname: the name used when auto-creating a world
- difficulty: 0 (Classic), 1 (Expert), 2 (Master), 3 (Journey); used when creating a world
- maxplayers: maximum players, from 1 to 255
- port: the port players connect to (7777 by default)
- password: leave blank for no password, or set one for a private server
- motd: message of the day shown to players
- banlist: the file the server uses to store bans
- secure: adds extra cheat protection
- language: the server's language code
- upnp: tries to forward the port automatically on routers that support UPnP
The Terraria wiki's server guide lists every option.
Step 3: Port Forward Your Router
For friends outside your home network to connect, you usually need to port forward, which tells your router to send Terraria traffic to your PC. If upnp=1 works on your router you may not need this, but it often doesn't.
- Find your router's admin page (often 192.168.1.1 or 192.168.0.1; check the label on the router)
- Log in with your admin credentials (change the default password if you haven't)
- Find Port Forwarding (sometimes under Advanced, NAT or Virtual Server)
- Create a new rule:
- External port: 7777
- Internal port: 7777
- Protocol: TCP
- Device/IP: your PC's local IP address (run
ipconfigin Command Prompt to find it)
- Save, and restart your router if prompted
The exact menus differ by router. Our port forwarding guide is written for Minecraft, but the router steps are the same; just use port 7777.
If you'd rather not touch your router, a hosted server avoids port forwarding entirely.
Step 4: Launch Your Server
Open Command Prompt and go to your Terraria folder, for example:
cd "C:\Program Files (x86)\Steam\steamapps\common\Terraria"Start the server with your config file:
TerrariaServer.exe -config serverconfig.txtWhen the server finishes loading, it shows that it's listening on the port
Find your public IP address (search "what is my IP" in a browser) and share it with friends
Friends join from Multiplayer → Join via IP, enter your IP and port 7777
Keep this window open. When you close it, the server shuts down. Type exit in the server console to save and stop the server cleanly instead of just closing the window.
On macOS or Linux, use the dedicated server download from terraria.org and run the TerrariaServer script from a terminal. You may need to make it executable first with chmod u+x TerrariaServer*.
Step 5: World Setup on First Launch
If you start the server without a config file (or without autocreate), it walks you through setup in the console:
- Choose an existing world, or create a new one
- Pick world size (small, medium or large) and difficulty
- Name the world
- Set max players, port and password
The world is saved as a .wld file. By default on Windows that's in Documents\My Games\Terraria\Worlds.
Option 2: Renting a Server
If running a server from your PC sounds like a hassle, especially for a world that should always be online, renting from a game server host is the simpler route.
Why Choose Managed Hosting?
- Always online: the server runs without your PC being on
- No port forwarding: players connect to the host's address
- No config files to write by hand: settings are in a control panel
- Backups: depending on the host, your world is backed up automatically
- Support: someone to ask when something goes wrong
With a host, you typically use a web panel to:
- Start, stop and restart your server
- Change difficulty, password and other settings
- Upload an existing world or download your world file
- Use the server console
- Switch to tModLoader if you want mods
Understanding Terraria Multiplayer: Crossplay and Compatibility
One of the most common questions is whether Terraria has crossplay.
The short answer: only in limited ways.
Platform notes
- PC (Steam and GOG): can join dedicated servers by IP. Steam players can also join friends through Steam.
- Consoles: play online with players on their own platform. They can't join a PC dedicated server.
- Mobile: mobile versions have their own multiplayer. Cross-device play between mobile and PC has been possible in some versions, but it isn't something to count on, so test it before you rely on it.
- Versions must match: everyone connecting has to be on the same game version as the server. After a Terraria update, update the server too.
If your group is split across platforms, check the Terraria wiki for the current state of crossplay before setting up a server.
Host & Play vs Dedicated Servers
Host & Play (from inside the game):
- One player hosts while playing
- The world closes when the host quits
- Performance depends on the host's PC and connection
- Easy to set up
Dedicated server:
- Runs separately from anyone's game
- Players can come and go; the host can log off
- Better suited to bigger groups
- More setup if you run it yourself (or use a host)
Advanced Server Configuration
Once the basics work, you can fine-tune the server.
Saving
The server saves the world automatically at dawn each in-game day. To save on demand, type save in the server console. To shut down, use exit, which saves first. Closing the window without saving can lose recent progress.
Difficulty
Difficulty is chosen when a world is created:
- Classic (0): the standard experience
- Expert (1): tougher enemies and better loot
- Master (2): harder still, with extra rewards
- Journey (3): lets players adjust difficulty and use creative-style powers
Changing difficulty in serverconfig.txt only affects new worlds. It won't convert an existing world. Journey worlds also have journeypermission_ settings that control who can use each Journey power.
Managing Players
Use the server console:
playinglists connected playerskick <player>removes a playerban <player>bans a player and adds them to your banlist filepassword <new password>changes the server password
Vanilla Terraria has no whitelist. A server password is the simplest way to keep a server private. Server mods such as TShock add whitelists, permission groups and server-side characters.
Network Settings
npcstream controls how NPC updates are sent. Lower values reduce enemies "skipping" around on screen but use more bandwidth; 0 turns it off. The default is fine for most servers.
Troubleshooting Common Issues
"Connection Failed" or "Cannot Connect"
Check your port forwarding:
- Use an online port checker and test port 7777 while the server is running
- If it shows closed, the port forward isn't working
- Make sure the internal IP in your router rule matches your PC's current IP
- Restart your router and server
Check your firewall:
- Go to Windows Defender Firewall → Advanced Settings
- Create an inbound rule allowing TerrariaServer.exe or port 7777 (TCP)
Lag and Performance Issues
- Reduce max players to lower load on your PC
- Close background apps to free up CPU and RAM
- Check your upload speed: multiplayer depends on your upload, not just download
- Use a smaller world if memory is tight
If self-hosting keeps causing lag, a hosted server takes the load off your home PC and connection.
Server Crashes or Unexpected Shutdowns
- Check free disk space: world files grow over time
- Test the world in single-player to see if the file is corrupted
- Read the server output for errors right before the crash
- Restore a backup if the world is damaged
FAQ: How to Host a Terraria Server
Can I host a Terraria server on a Mac?
Yes. The dedicated server download on terraria.org includes a macOS version, and the Steam version on Mac includes the server too. Run the TerrariaServer script from a terminal.
Do I need a static IP to host a Terraria server?
No, but it helps. If your home IP changes, friends need the new one. A dynamic DNS service can give you a hostname that follows your IP.
What's the maximum number of players on a Terraria server?
The maxplayers setting goes up to 255. The practical limit depends on your hardware, upload speed and world size.
How do I back up my world?
Copy the .wld file (on Windows, in Documents\My Games\Terraria\Worlds by default) to a safe place. Stop or save the server first so the file is up to date.
Can I move my single-player world to a server?
Yes. Copy the .wld file to the server's Worlds folder and point the world setting at it.
Is password protection secure?
It keeps random players out. For more control, keep your server address private and use bans for troublemakers. TShock adds a whitelist if you need one.
What happens if my internet goes out?
The server drops offline and players are disconnected. Anything since the last save can be lost. This is one reason people move to hosted servers.
Can I run a Terraria server on a Raspberry Pi?
The official server is built for x86-64 PCs, so it isn't a simple option on ARM boards like the Raspberry Pi. A spare PC or a hosted server is easier.
The Bottom Line: Hosting a Terraria Server
There are two paths:
- Self-hosting from your PC: free, but you handle setup, uptime and your home network
- Renting from a host: less setup, always online, and no port forwarding
For casual groups playing a few hours a week, self-hosting is fine. If you want a world that's always online, a hosted server removes most of the hassle.
Terraria Hosting With EZ Game Host
EZ Game Host offers Terraria server hosting with 3 backup slots, world file uploads, password protection, Journey mode support and console access. tModLoader is listed from the Standard plan up. Every plan includes 24/7 support, and you choose your server region at checkout. Plans start at $12/month; see the Terraria plans.
Additional Resources
Intel
Related guides
- Best Terraria Server Hosting: How to Compare Hosts in 2026How to find the best Terraria server hosting in 2026: compare resources, tModLoader support, backups, location, support and pricing for any group.
- tModLoader Server Hosting: Run a Modded Terraria ServerHow to run a tModLoader server: installing mods, a starter mod list, avoiding lag and crashes, and what to look for in modded Terraria server hosting.
- Game Server Support Ticket: Send Evidence That HelpsWrite a useful game server support ticket with exact errors, timestamps, reproduction steps, and relevant logs while keeping credentials private.