First things first…
Ok, So you want to start a minecraft server. Well theres some stuff you need to do first to let your friends connect, if you want to run a minecraft server for just you and the people on your WiFi/house, then this tutorial isn’t for you. Secondly this tutorial will not require Hamachi.
What you need to do
Firstly, you will need a minecraft server, either bukkit or vanilla, I will be using vanilla, but you can use any minecraft server so long as it works. (first make sure that you follow any instructions that any non-vanilla installations tell you, this is most important. this includes how to make a run file)
Firstly you need to have already done these things.
- Created a run.bat file or run.sh file (not needed for forge or vanilla)
- Tested that you can connect to your server on your own computer ( you can do this by connecting to ‘localhost’ on your own computer, please note that trying this on any other computer will not work)
- Have your router admin and password ready.
- Have access to the internet. (please note this tutorial will likely not work in an office or building with multiple vlan’s and networks. ignore this if you are unsure
Now that you have those things we need to make sure everything is 100% ready, so lets start.
Getting a Minecraft server and connecting to it on your computer
Before we try to let friends connect we better check that we can.
First, start your minecraft server, if you don’t have one, you can download it here or if you are not on windows or aren’t sure, download it here. if you are not using minecraft_server.exe then you will need to make a run.bat file you can do this by making a text file called run and then saving it as run.bat with the contents below. put these in your downloads folder in a folder called minecraft server.
java -Xmx1024M -Xms1024M -jar minecraft_server.jar
Now you have that, lets make sure we can connect on our own computer. (if you are trying to connect on another computer, this step will not work)
- Start the minecraft server, it should look like this (if you are not seeing this, or it opens then suddenly closes, read the troubleshooting section!!! it is likely because you have not accepted the eula, change the word ‘false’ to ‘true’ in your file called eula.txt)or thisif your server does not look like this, then check the troubleshooting section at the bottom of the page
- DO not skip the above section, your server WILL not work without these steps
- Now we need to connect to our server. Connect to ‘localhost’ in your minecraft game.and when you connect you should see this.
congratulations, you have successfully connected to your own minecraft server.
- Now you have done this you can move onto the next step to allow your friends to connect, if you couldn’t connect, something is wrong, check the troubleshooting section.
Who am I?
Now that you have setup your minecraft server, you need to let others connect, before you can do this you need to do a few things. Firstly you need to click this link, this will tell you your WAN IP, which you will need later. write this down or leave the tab open, it should look like this,
keep those numbers, you will need them later (YOURS WILL be different to the one in the tutorial)
you also need your LAN IP.
- On your keyboard press the WIN + R keys at the same time.
- in the box type ‘cmd’
- you should have seen theseafter you have the black box, you don’t need the white one, it should close automatically when you click ok.
- Now type ‘ipconfig’
and press enter, you are looking for one with the words default gateway, but you will also need IPV4 address.
you now know your default gateway and LAN IP.
After this tutorial, you should have exactly 3 numbers, all of witch you WILL need.
your LAN IP, your WAN IP and your default gateway.
they should look something like this, but may also be vary different
LAN IP : 192.168.1.3
WAN IP : 220.127.116.11
DEFAULT GATEWAY : 192.168.1.1
You need these three numbers, without them you cannot continue.
Letting friends join! (Port forwarding)
Now that we have the numbers from the previous step, lets put them to good use, open your web-browser and type in the numbers in the address bar, (do not Google the numbers, that’s not what you want silly).
now you need to login, if you dont know your login, you need to Google your make and model of your router for the default passoword, if that didn’t work, it may be that someone else changed it, ask someone in your household who set it up or check the troubleshooting section.
Once you have logged in, go to the port forwarding section on your router, if you cannot find it then google the make and model of your router followed by how to port forward. Once you have reached the port forwarding section, add your minecraft server by entering the following
Service Port (sometimes just called port) : 25565
IP Address (THIS IS WHERE YOU ENTER YOUR LAN IP, that we got earlier, my'n is this) : 192.168.1.3
*Internal Port (optional, may also not exist) : 25565
Protocol : ALL (or in my case TCP and UDP)
Status : Enable
then you can check that your port forwarding has worked by going here and typing 25565 as the port number (make sure your server is running or this test wont work).
you should see
Success: I can see your service on 18.104.22.168 on port (25565)
Your ISP is not blocking port 25565
Congratulations, you have successfully configured and allowed your minecraft server to be used over WAN, your friends can now connect to your minecraft server using your WAN ip, which in my case is ‘22.214.171.124’.
While you are still logged into your router, it is a good idea to statically assigning your computer’s IP address to prevent it from breaking, you can do this by going to the address reservation tab in your DHCP settings and adding your computers LAN ip to the list and selecting your computer from the connected clients.
TroubleShooting / OOPS, it broke
|It says ‘java.net.ConnectException: timed out: no further information:’||Ok, it looks like you cannot connect you your server, here are some possible solutions|
|I don’t see the boxes in the who am I section.||Ok, it looks like your run file is not working correctly, try double clicking the jar file, did that work? if not you may need to re download it.|
|It says Failed to bind port!||Ok, it looks like youve opened your server more than once, even though you may only see one server running, double clicking the file can also run the server, if you know how to go into task manager and end the task, or if you dont, restart your pc. If none of those work, you may have something already using the port your trying to connect to.|
|How do I op myself.||Simple, click on the server box and type, you can use commands in there.|
|it says ‘Error: I could not see your service on 126.96.36.199 on port (25565)’||(the IP may be different) It looks like you have not configured port forwarding correctly, or your minecraft server is not running, you computer may also be blocking the port, google how to allow a mincraft server through a firewall. you may also be running on a different port, look in your server for the line Starting minecraft server on *:25565, is this correct? make sure that your port numbers are accurate.|
|I don’t know my router login is it the same as my WiFi password?||No, but try it anyway.|
|I don’t know my router login||It’s usually unchanged form the default. Look at the router, is the login information on the box? Sometimes it is a random set of letters and numbers look on the router it’s self for information. Ask family if they know or consult your ISP for help. It may also be ‘admin’ ‘admin’ or ‘admin’ ‘password’ for the login username and password. Google the make and model of your router for help. If you still cannot find it ask someone else to do it for you. Do not reset the router if you don’t know how to set it back.|
|It says Error: unable to access jarfile!||It looks like your runfile is not configured correctly, the name of the file should be exactly the same as the name of the server.jar file. so if your file is called ‘minecraft_server1.7.10.jar’ then your run file should be ‘java -Xms2024M -Xmx2048M -jar minecraft_server.1.7.10.jar nogui’|
|The server does not run!||There may be a file called eula.txt, change the word ‘false’ to ‘true’. this is because minecraft has changed their eula.|
|My server has lots of errors!||Yep, because bukkit was taken there are some now, also when starting for the first time it may have to create some files necessary to start that can cause errors, just restart and you should be good to go.|