Quick answer
A Terraria server uses TCP port 7777 by default (port= in the config, or -port). When friends can't join, check in this order: is TerrariaServer.exe actually running with the world loaded, is TCP 7777 forwarded to the right PC and allowed through the firewall, are friends using your public IP (plus the port if it isn't 7777), is everyone on the same version, and is everyone on the same game (vanilla Terraria and tModLoader can't join each other)? If your ISP uses CGNAT, port forwarding can't work; join through Steam or use a tunnel.
Ports
7777TCP: Game (port=in serverconfig.txt, or-port)
How to fix it, step by step
- Start the server and load a world. Run TerrariaServer.exe and follow the prompts, or
TerrariaServer.exe -config serverconfig.txt. On Linux, if it fails withMagic number is wrong: 542, runexport TERM=xtermfirst. - Forward TCP 7777. Reserve the server PC's local IP, then forward TCP 7777 to it.
upnp=1in the config can open it automatically on UPnP routers. If you run more than one server, give each its own port and config. - Allow TerrariaServer.exe through the firewall. Allow it on Private and Public networks in Windows Firewall.
- Share your public IP. Friends choose Join via IP and enter your public IP, and the port if it isn't 7777. Home IPs change, so re-check it if friends could join before and suddenly can't.
- Match versions and game type. Everyone needs the same version, and platforms don't always get patches on the same day. The server says "You are not using the same version as this server." on a mismatch. tModLoader players need the same tModLoader build and the same enabled mods; vanilla and tModLoader can't join each other.
- Test from outside, then check CGNAT. Test from a phone hotspot. If TCP 7777 is forwarded and outside players still can't connect, compare your router's WAN IP with your public IP (see the CGNAT guide).
What the symptoms usually mean
- "Found server" then nothing: TCP 7777 isn't reachable, the firewall blocks it, or the server isn't running.
- "Lost connection" while joining: a version mismatch, or vanilla vs tModLoader. Joining through Steam can hide a tModLoader mismatch behind "Lost connection"; join by IP to see the real error.
- Stuck at "Receiving tile data": a slow connection or large world, or a broken character file. Try a new character.
- Everyone drops at once in Host & Play: the host left to the menu. Use a dedicated server instead.
No port forwarding? Use Steam or a tunnel
Steam multiplayer (join a friend through Steam) avoids IP joins entirely. playit.gg lists Terraria on its free tier if you want a tunnel for IP joins.
Test it from the outside
Your own Wi-Fi can't tell you whether friends can reach the server. The free Server Doctor check contacts your server once from the internet, the way the game does, and tells you the most likely cause. The same check runs in Discord with /fix.
No PC to host 24/7?
Terraria servers are light, but your PC still has to stay on for friends to play, and CGNAT blocks home hosting entirely. A small hosted Terraria server is cheap and has its own public IP.
Related guides
- Friends can't join your Minecraft server? Here's the fix.
- Friends can't join your Factorio server?
- Valheim server not showing up, or friends can't join?
- Behind CGNAT? Host a game server without port forwarding.
- All guides
Sources: terraria.wiki.gg/wiki/Guide:Setting_up_a_Terraria_server · supercraft.host/wiki/terraria/connection_lost/ · playit.gg/
Still stuck? Get free help from real people in our Discord
Post your game, where it runs and what the check said in #help-forum. Other server hosts and the Server Doctor team can take a look. Free.