A Terraria server uses one port, the game port, which is TCP 7777 by default. Vanilla, TShock and tModLoader all work this way. On PlayNHost your server has its own port, usually not 7777, already open, and players type it after the IP from the Play with friends card.
Which ports does a Terraria server use?
| Port | Protocol | Default | On your PlayNHost server | Where you see it |
|---|---|---|---|---|
| Game port: players connect here | TCP | 7777 | The Primary port | IP and Port on the Play with friends card, and Ports & Network |
| TShock REST API (TShock only, off by default) | TCP | 7878 | Not set up: the panel does not use it | tshock/config.json in Files |
The Official Terraria Wiki says the server runs on TCP port 7777 by default, and players join from Multiplayer with the server's IP and port. Terraria has no separate query port or remote console port, so the panel reads the player list from the Console: How to see who is online on your Terraria server.
How does each server type get its port?
All three types listen on the same Primary port, and the panel sets it before every start, so you never type it anywhere.
| Server type | How the panel gives it the port | What to know |
|---|---|---|
| Terraria Vanilla | Writes it as port in serverconfig.txt | A port you type in that file is replaced at the next start. |
| TShock | Starts TShock with the port | TShock prints Port overridden by startup argument. Set to and your port. The port in tshock/config.json is not used. |
| tModLoader | Starts tModLoader with the port | Players join with tModLoader, not plain Terraria, at the same IP and port. |
Changing the server type with Edit Server Type keeps the same IP and port, so players do not need a new address: How to switch your Terraria server to TShock or tModLoader.
Why is my Terraria port usually not 7777?
Each PlayNHost server gets its own port from the machine it runs on, so many servers can share one IP address. 7777 is the default for a server you run yourself. Your server's number is usually different, so players must type the port the panel shows. The Terraria Wiki gives the same advice: when a server uses another port than 7777, players connect to that port.
Where do I find the IP and port in the panel?
- Open your server in the panel. On the Overview page, find the Play with friends card.
- Copy the IP row and the Port row with the copy buttons next to them. Terraria asks for them on two screens, so give players both.
- For the full list, click Ports & Network in the left menu. Give this to your players shows the IP and port together, for example
203.0.113.10:25600. - Under All ports, the port with the Primary badge, described as The port players connect to, is the game port. It is the only port a Terraria server needs.
The server card on Overview also shows the address as Server Address. To check from the server itself on Terraria Vanilla or tModLoader, type port in the Console: the server prints the port it listens on. TShock has no port command in its Console; it prints Port overridden by startup argument. Set to and your port when it starts.
How do players connect to a Terraria server on PlayNHost?
Players choose Multiplayer, then Join via IP, pick a character, enter the IP, then the port on the next screen, and the password if you set one. On a tModLoader server they start tModLoader instead of Terraria. The full steps are in How to join your Terraria server.
Do I need to open ports on my router or firewall?
No. The machine your Terraria server runs on accepts connections from the internet on the ports the panel gives to servers, for both TCP and UDP, and your server's port is one of them. The panel says so under All ports: Every port accepts TCP and UDP. Your players' home routers let outgoing connections through, so they do not open anything either.
The port forwarding and firewall rules on the Terraria Wiki are for a server you run on your own computer. With a hosted server they are not your job.
What does the firewall not allow?
Only the ports listed under All ports reach your server from outside. That matters for one thing on Terraria: TShock's REST API. If you turn it on with RestApiEnabled in tshock/config.json, it listens on 7878 by default. Unless 7878 is listed under All ports, nothing outside can reach it. If your plan includes extra ports, All ports shows Add a port. Add one, stop the server, set RestApiPort in tshock/config.json under Files to the new port's number, and start the server again. If there is no Add a port button, your plan includes no extra ports, so open a ticket and say you need one for the TShock REST API.
Common Terraria port problems and fixes
Players get no answer after typing the IP and port
- Copy the IP and the Port again from Play with friends. A missing or wrong port is the most common mistake, and 7777 from a guide is not your port unless the panel shows it.
- Check that the badge says Online and that the Console shows
Type 'help' for a list of commands.Until then the server is still starting. - On a tModLoader server, players must join from tModLoader.
- School, work and public networks can block game ports. Ask the player to try another network.
Password and version problems are in Players cannot join your Terraria server.
I changed the port in a config file and nothing happened
That is expected. Before every start, the panel writes Terraria Vanilla's port into serverconfig.txt, replacing what you typed, and starts TShock and tModLoader with the port on their startup line. TShock uses that port, not the one in tshock/config.json. Leave port lines in config files alone: your server's port cannot be changed, and it never needs to be.
The TShock REST API does not answer
TShock's REST API is off by default and listens on port 7878, which outside players cannot reach unless it is listed under All ports. Add a port with Add a port under Ports & Network, stop the server, set RestApiPort in tshock/config.json to that number and start it again. If your plan has no Add a port button, open a ticket for one.
The Active players card says No answer from the server
This is not a port problem. Terraria has no query port, so the panel reads joins and leaves from the Console: The Terraria players card says No answer from the server.
Good to know
- Other errors are in Terraria server problems and fixes.
- The three server types are compared in Terraria server types compared: Vanilla, TShock and tModLoader.
- The Ports & Network page itself is explained in How to find your server's ports and IP address.



