Terraria

Terraria

43 ratings
Step-by-step guide (with images!) on how to host a Terraria server without Hamachi!
By big pepe
A step-by-step guide explaining how to host a Terraria server without using Hamachi!
   
Award
Favorite
Favorited
Unfavorite
Introduction
Hello all,

I decided to write a detailed guide on how to host a Terraria server without using Hamachi, as I have successfully done so.

Going to keep this as detailed as possible, and do a step-by-step guide on how I did it.

Hope it helps!
Locate your Terraria folder
This may seem silly, but in order to host a server you need to locate your Terraria folder, because it contains the executable file that you need to run in order to host a server.

This is my location of the Terraria folder D:\SteamLibrary\SteamApps\common\Terraria

Your location might be under C:\Program Files (x86)\Steam\SteamApps\common\Terraria ... You get the idea.

The file you'll need to open AFTER PORT FORWARDING YOUR ROUTER is the one indicated below.

Setup a static ip
A very important step. In order to port forward your router, you need to correctly setup a static ip on your PC/Laptop. This will assign a unique ip to your computer when you connect to the internet.

Heads up, the following steps are for PC users. There is a way to setup a static ip and port forward using Mac OSX, and probably for Linux as well, but since Terraria is currently for PC (there are ways to play it on Mac/Linux, definitely), I'll be focusing on the PC static ip configuration.

Step 1: Go to start and search for cmd



Step 2: On the cmd window, type in ipconfig /all and press enter. Write down the lines I marked in YOUR command window, you'll need them for later. So, write down the IPv4 Address, Subnet Mask, Default Gateway and DNS Server.

Note: Ignore IPv6 Address, just write down IPv4 Address, we only need IPv4 Address.



Type exit in the window and press enter to close it.

Step 3: Open Start menu, and go to Control Panel and go to either View network status and tasks or Network and Sharing Center.



OR



Step 4: On Network and Sharing Center, click on Change adapter settings on the upper left corner of the window.



Step 5: There you'll see that you might have more than one internet connection, so make sure you identify which is the one you're connected to! When you identify it, right-click and hit Properties.



Step 6: Now, on the new window click on Internet Protocol Version 4 (TCP/IPv4) and then click on Properties on the bottom.



Then, you'll see this:



Step 7: Take note on what you see in this window, if you screw anything up just write what was on that window to revert the problem.

Now, notice that if this is your first time you should see marked Obtain an IP Address Automatically, if not, your connection has already a static ip.

Click on Use the following ip address and write down an ip address of your preference, however, the ip address has to be similar to the router's ip address but the last digits should be different. The ip address that you end up choosing must end with a number between 1 and 254, and it shouldn't be the same as your router's ip address!

Example: Router's ip address: 192.168.1.1 , Static ip address: 192.168.1.115

Look for the info that you wrote down previously from the cmd window (remember?) and fill in the subnet mask and default gateway with the info written down previously. Then, type in the Preferred DNS server and Alternate DNS server with the ones you wrote down previously.

Note: You may notice that in the image above I only have "Preferred DNS server", and this is because only one DNS server address was present in the cmd window, and everything worked fine. So if you only have one, that may work for you.

Congratulations! You have set up successfully a static ip address!

Note: If you can't connect to the internet, then go back to your network connection properties and change back everything to how it was.

Suggestion: WRITE DOWN THE DEFAULT NETWORK CONNECTION PROPERTIES! That way if something went wrong during this step, you can go back to the default properties and try again!
Port forward your router
This is the crucial step. In order to host your own server (of any game, really) you need to port forward your router.

Edit: If you have a router like mine, follow this, if not, locate your router in this handy site[portforward.com]

My router is a Linksys Wireless-N Broadband Route


You'll need to gain access to your router via a web browser entering the default ip. In my case it is 192.168.1.1, and probably it's the ip you'll need to use.

Once you pop that ip in and hit enter, a username and password page will show up. In most cases the user is "admin" and the password is "password", however this may vary from router to router. Google search your default router user/pass if those didn't work!

This should happen


Now once you're inside your router, head up to a section called "Applications & Gaming" and go to "Port Range Forwarding" or any similar way.

Now you'll need to add the following ports "7777" to "7777" and choose both protocols (TCP/UDP), and then enter your last digits of your STATIC IP.

On "Application Name" you may write whatever you want, something like "Terraria" works.

Here's a screen of my setup


Save everything and close the browser.

Congrats, you've (hopefully) successfully port forwarded Terraria!
Hosting time!
Now that all the dirty work is done, it's hosting time.

Open "TerrariaServer.exe" file and load up the game.


Choose the world you'd like, enter the amount of players to join*, enter the server port (enter for 7777), then "Automatically forward port? (y/n)? HELL NO! Just type "n" and hit enter. Set up a server password if you prefer that.

Once the server is loaded, it should look like this:


Note: Running a server takes up quite an amount of RAM memory, so if you have low RAM, try hosting for lower amount of players.

Now, it's time to join up and let your pals know! For you to join go to "Multiplayer" in-game, and then "Join" and type "localhost". You, and only you, may join the server typing "localhost". Your friends however, need your ip address!

To check yours, go to www.ipchicken.com, or just google search "what's my ip address" and that address you'll have to share with your friends.

If all was done correctly, the server cmd window should look like this


CONGRATULATIONS. You've successfully hosted a Terraria Server!



Feel free to comment and ask questions! I'm always glad to help out and answer questions.

Cheers!
76 Comments
Wolliver Jan 29, 2016 @ 1:14pm 
I haven't changed my router since I last port forwarded, so I haven't done the port forwarding steps again, but I did do the static IP steps again. I'll see if this works later when my friends are on. Thanks a lot for the help!
big pepe  [author] Jan 29, 2016 @ 6:19am 
My question is: how can your IP be changed by the game updating?

Do the following:

(1) Go to 'Start' and search 'cmd, then press enter.

(2) Type in 'ipconfig /all' and search for your 'IPv4 address' and it should be a series of numbers (nothing too complicated); generally like this '192.xxx.x.xxx', if next to it it says 'Preferred', then that is the static IP that you set up.

Question: Did you change your router by any chance? If you did, then you need to do these steps again (the ones in the guide) but according to your router (the port forwarding part).
Wolliver Jan 26, 2016 @ 7:30pm 
Normally, I would start a game with the command prompt console thingy, and it always worked. Once 1.3 came out, my IP inexplicably changed to a very complex code that won't work when anyone tries to enter it. However, when I use the Host & Play feature on the main menu, and invite people through Steam, they are able to join no problem. When I do Host & Play, it's only the game itself running, no console is open.
big pepe  [author] Jan 26, 2016 @ 6:24pm 
@Bohemond of Antioch I am not sure what to address that issue with (I haven't hosted a Terraria game in quite a while). It seems a little weird though that you were able to host a game setting up a static ip on your router and computer, and now it's not working since version 1.3; Maybe there's something that does not allow hosting games via this method anymore?

When you host and play, do you have a command prompt window running the server or is it all via the game? In the past, if you had that window open, the server would be running, and you could switch out characters without restarting a world.

Hope this helps, and I'm curious also on what the answer to this would be.
Wolliver Jan 25, 2016 @ 4:20pm 
I should say that also, when I look up my IP, it's a completely different number than it was before, with a bunch of Xs and stuff.
Wolliver Jan 25, 2016 @ 4:19pm 
Over a year ago I followed this guide, and it worked perfectly, but ever since 1.3 came out it's never worked when I manually host, only via host & play on steam. I want to be able to switch out characters without having to restart, what do I do?
big pepe  [author] Oct 15, 2015 @ 6:22am 
@CyberPixie Fake IP? I think you need to use your static IP.
freezy.bh Oct 13, 2015 @ 3:15pm 
I have put another IP adress on my server, that means i can host the server for strangers by this fake IP???
mello Dec 21, 2014 @ 5:02pm 
@(U + Th)/He, yes i did everything. i portforwarded it, i set the static ip correctly, my friend still cant join tried hamachi but it wont work too
big pepe  [author] Dec 21, 2014 @ 6:16am 
@how2bang Well, is your friend trying to connect to your server? Did you port forward correctly? Did you set the static ip correctly?