Running a Terraria server 24/7 lets you and your friends build, explore, and fight bosses whenever you want, without needing one player to keep their PC on. This guide walks you through setting up a dedicated server on a separate machine (or a cheap VPS) that stays online around the clock. You’ll need a copy of Terraria (to get the server files), a computer that can stay on, and a bit of patience for port forwarding.
What You’ll Need
- A Windows, macOS, or Linux computer that can stay powered on 24/7 (a spare PC, an old laptop, or a cloud VPS).
- A copy of Terraria on Steam (to download the dedicated server files).
- Access to your router’s admin page (for port forwarding).
- A static IP address or a dynamic DNS service so players can find your server.
- Optional: a free account on a dynamic DNS provider like DuckDNS or No-IP.
Step-by-Step
- Install the server files. On the machine that will host the server, install Terraria via Steam (or copy the server files from another PC). The dedicated server executable is located in the game’s installation folder. On Windows, it’s usually
C:\Program Files (x86)\Steam\steamapps\common\Terraria\TerrariaServer.exe. On Linux, it’s~/.steam/steam/steamapps/common/Terraria/TerrariaServer. - Run the server for the first time. Launch
TerrariaServer.exe(or the Linux binary). It will ask you to select a world. Choose “New World” and give it a name and size. The server will generate the world and then start listening on port 7777 by default. - Configure the server settings. After the first run, a
serverconfig.txtfile is created in the same folder. Open it in a text editor. Setworld=to the path of your world file (e.g.,world=C:\Users\YourName\Documents\My Games\Terraria\Worlds\MyWorld.wld). Setmaxplayers=to your desired number (e.g., 8). Setport=7777. You can also set amotd(message of the day),password, anddifficulty(0=classic, 1=expert, 2=master, 3=journey). - Start the server with the config file. On Windows, run
TerrariaServer.exe -config serverconfig.txt. On Linux, run./TerrariaServer -config serverconfig.txt. This will load your world and start the server automatically. Keep this terminal window open. - Keep the server running after you log out. On Windows, you can use a tool like NSSM (Non-Sucking Service Manager) to run the server as a Windows service. On Linux, use
screenortmuxto keep the server running in the background. For example,screen -S terraria, then start the server, then detach with Ctrl+A then D. - Set up port forwarding. Log into your router’s admin page (usually at 192.168.1.1 or 192.168.0.1). Find the “Port Forwarding” or “Virtual Server” section. Create a rule: external port 7777 to internal IP (the host machine’s local IP, e.g., 192.168.1.100) port 7777, protocol TCP and UDP. Save the rule.
- Find your public IP. Go to a site like
whatismyip.comon the host machine to see your public IP. Share this IP with friends (e.g.,203.0.113.5:7777). If your IP changes, set up a dynamic DNS hostname and use that instead. - Test the connection. On another computer, open Terraria, select “Multiplayer” → “Join via IP”, and enter your public IP and port. If it connects, you’re done. If not, check the troubleshooting section.
- Automate restarts (optional). For a truly 24/7 server, you might want to schedule daily restarts to clear memory leaks. On Linux, use cron; on Windows, use Task Scheduler. For example, a cron job that restarts the server at 4 AM.
Common Mistakes
- Forgetting to allow the server through the firewall. Windows Firewall or your VPS’s firewall may block port 7777. Add an inbound rule for TCP/UDP 7777.
- Using the wrong IP. When joining, players must use your public IP, not your local IP (like 192.168.x.x).
- Port forwarding to the wrong device. Make sure the internal IP in the port forward rule matches the host machine’s current IP. If the host uses DHCP, it can change; set a static IP on the host.
- Not using the config file. Running the server manually each time is error-prone; the config file ensures world and settings are loaded automatically.
- Closing the terminal window. If you close the console, the server stops. Use a service or screen/tmux.
Tips
- Use a VPS for reliability. A cheap cloud VPS (like from DigitalOcean, Linode, or AWS Lightsail) is often better than a home PC because it has a static IP and is always online. You can run the Linux server there.
- Back up your world regularly. Copy the
.wldand.bakfiles to another location daily. Corrupted worlds are a real risk. - Set a password. If you’re playing with friends, set a password to keep random people out.
- Monitor server logs. The console shows player joins, errors, and saves. Check it occasionally.
- Update the server. When Terraria updates, you’ll need to update the server files too. On Steam, just update the game; on a VPS, re-download the server files.
Troubleshooting
- Players can’t connect. First, check that the server is running (you see “Server started” in the console). Then, verify port forwarding: from the host machine, go to
canyouseeme.organd check port 7777. If it says “Connection timed out,” your port forward rule is wrong, or your ISP blocks inbound connections (some do). If it says “Success,” the issue is on the player’s side (they entered the wrong IP/port). - Server crashes on startup. Check the world path in the config file. If the path is wrong, the server will exit. Also, make sure you have write permissions to the world folder.
- High ping or lag. This is usually a network issue. If on a home connection, ensure no one is downloading large files. On a VPS, choose a location close to your players. Also, reduce
maxplayersif too many are on. - Server runs but world doesn’t load. If you see “World not found,” the
world=path is incorrect. Use the full absolute path, and on Windows, escape backslashes (e.g.,C:\Users\...\world.wld). - Cannot join from the same network. Some routers don’t support NAT loopback. Try joining from an external network (e.g., use your phone’s mobile data) to test. If that works, it’s a router limitation.
Frequently Asked Questions
Do I need a powerful computer to run a Terraria server?
No. Terraria is lightweight. A single-core CPU with 1-2 GB RAM can handle 8 players. Even a Raspberry Pi can run it.
Can I run a server on the same PC I play on?
Yes, but it will use some CPU and RAM. For 24/7, it’s better to use a separate machine so your gaming isn’t affected and the server stays up when you’re not playing.
How do I make my server visible to players without port forwarding?
You can use a tunneling service like playit.gg or ngrok, which gives you a public address without port forwarding. Note that these services may have latency or require a client running.
What is the default port for Terraria?
7777 (both TCP and UDP). You can change it in the config file, but then players must use the new port.
How do I update my server without losing my world?
Your world files are stored separately (in Documents\My Games\Terraria\Worlds on Windows). Updating the server executable won’t delete them. Just replace the server files with the new version.
Can I run multiple worlds on one server?
You can run multiple server instances on different ports, each with its own world. Just create separate config files and run multiple processes.
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
- Tongue Escape Codes: What They Are0.20 movements/s
- Claude Code Workflow Habits Worth Trying
- HDMI 2.1 Explained: Why It Matters for Gaming
- Veeam Plugin for VMware Cloud Director: How It Works
- Best Path of Titans Server Hosting: Top Picks
- Oppo First Foldable: 120Hz Display & Snapdragon 888