Hosting your own Terraria server lets you and your friends play together in a persistent world, even when you’re offline. You’ll set up the server software on your computer, configure it, and then connect. This guide covers both the classic PC method and the newer Steam-based hosting, so you can pick what works best for you.
What You’ll Need
- A copy of Terraria (the game) – the server software is free, but you need the game to play.
- A computer that can run the game (any modern PC or laptop will do).
- At least 1 GB of free RAM for the server, plus what the game itself uses.
- Optional but recommended: a stable internet connection with a decent upload speed (5 Mbps or more for several players).
- If you want friends to join from outside your home network, you’ll need to set up port forwarding on your router (details in the steps).
Step-by-Step
- Install Terraria. If you haven’t already, install Terraria through Steam or another platform. The server files are included in the game’s installation folder.
- Locate the server files. On Windows, right-click Terraria in your Steam library, select Manage → Browse local files. On Mac, right-click the game in Steam and select Properties → Local Files → Browse. You’ll see a folder named
DedicatedServerUtils(Windows) orMacServer(Mac). - Run the server executable. Inside that folder, double-click
TerrariaServer.exe(Windows) orTerrariaServer(Mac). A command-line window will open. - Choose a world. The server will ask if you want to use an existing world or create a new one. Type
nfor new, then follow the prompts to set the world size (small, medium, large) and difficulty (classic, expert, master). - Set the maximum players. When prompted, enter the maximum number of players (default is 8, but you can set it higher or lower).
- Set the server port. The default port is 7777. Press Enter to accept it unless you have a reason to change it.
- Set a server password (optional). Type a password if you want only friends to join, or press Enter for no password.
- Wait for the server to start. You’ll see a message like “Server started” and a prompt that says
Server started, awaiting connections.... Leave this window open – it’s your server console. - Connect from the same computer. Launch Terraria, select Multiplayer → Join via IP, and enter
localhostor127.0.0.1as the IP. Enter the port (7777) and password if you set one. - Connect from other computers on your local network. On other PCs, use the same steps but enter the host computer’s local IP address (e.g., 192.168.1.10). You can find your local IP by typing
ipconfigin Command Prompt on Windows orifconfigin Terminal on Mac. - Enable port forwarding for friends over the internet. Log into your router’s admin page (usually at 192.168.1.1 or 192.168.0.1). Find the port forwarding section, create a rule that forwards TCP and UDP port 7777 to your computer’s local IP address. Save and apply.
- Find your public IP. Go to a site like whatismyip.com to see your public IP. Give that IP and the port to your friends, and they can join using the same steps as above.
- Use the console commands. While the server is running, you can type commands like
saveto save the world,kickto remove a player, orexitto shut down. Typehelpto see the full list. - Stop the server properly. When you’re done, type
exitin the server window. This saves the world automatically.
Common Mistakes
- Forgetting to port forward. If friends can’t join from outside your network, port forwarding is almost always the issue. Double-check the rule and that your computer’s IP hasn’t changed (set a static IP if needed).
- Using the wrong IP. Local friends need your local IP (192.168.x.x), not your public IP. Online friends need your public IP, not localhost.
- Closing the server window. The server only runs while that command window is open. If you close it, the server stops.
- Not saving before quitting. If you force-close the window, you may lose progress. Always type
exitto save. - Firewall blocking. Windows or Mac firewall may block the server. When prompted, allow access, or add an exception for TerrariaServer.exe.
Tips
- Set a static IP on your host computer to prevent port forwarding from breaking after a router restart.
- Use a password even for small groups to avoid random players joining.
- Back up your world files regularly. They’re in
Documents/My Games/Terraria/Worlds(Windows) or~/Library/Application Support/Terraria/Worlds(Mac). - Run the server on a separate machine if you have one, so the game and server don’t compete for resources.
- Use the Steam multiplayer option instead of IP if you want an easier setup – just invite friends through Steam, but note that the world is tied to the host’s game session.
Troubleshooting
Friends can’t connect from the internet. First, verify port forwarding is correct. Then check your public IP – it may have changed. Also, some ISPs block incoming connections; if so, you might need a VPN or a service like Hamachi (but that’s a separate setup).
Server won’t start. Make sure you’re running the correct executable for your OS. On Mac, you may need to right-click and select “Open” the first time to bypass Gatekeeper.
Game lags. The server and game on the same machine can cause lag. Close other programs, lower the world size, or reduce the max players. Also, check your internet upload speed – if it’s low, fewer players can join smoothly.
Can’t see the server on your local network. Some routers have “AP isolation” enabled, which blocks device-to-device communication. Check your router settings and disable it if needed.
World corrupted after a crash. Restore from a backup. If you don’t have one, the game may create a backup automatically in the Worlds folder – look for files with a .bak extension.
Frequently Asked Questions
Can I host a server without port forwarding? Yes, you can use a VPN like Radmin VPN or Hamachi to create a virtual LAN, then friends join via your virtual IP. This bypasses port forwarding entirely.
How many players can join? The server supports up to 255 players in the code, but in practice, 8-16 is the sweet spot for performance. The default max is 8.
Do I need a powerful computer? Not really. A basic dual-core CPU and 2 GB of RAM can handle a small server. The game itself is more demanding than the server.
Can I run the server on a dedicated machine like a Raspberry Pi? Yes, there are community guides for running Terraria on Linux, but it’s more advanced. The official server files are Windows/Mac only, but you can use a compatibility layer like Wine.
How do I update the server? The server files are part of the game installation, so updating the game via Steam also updates the server files. Just restart the server after an update.
Can I have multiple worlds on one server? No, the official server runs one world at a time. To switch worlds, you need to stop the server and start it again, choosing a different world.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Turn Off Backup Encryption in iTunes?
- Campus Tech Innovation Hubs: What They Are
- Poco C51 Airtel Prepaid Locked Variant India?
- Jenkins vs GitHub Actions: Which CI/CD Fits Your Team?
- Shared VPS Hosting: Is It Better?
- Disk Defrag Pro: What It Does and Whether You Need It