H3XED
Run a Minecraft Server on Your PC and Play with Friends over the Internet or a LAN

Run a Minecraft Server on Your PC and Play with Friends over the Internet or a LAN

Feb 6, 2018   PC Gaming   Nick Vogt   Comments (137)
Setting up a Minecraft server on your home Windows computer is fairly easy. With basic knowledge of computers and networking, you can be playing with friends over a local area network (LAN) or the Internet in minutes.

Note: This guide is for the Java version of Minecraft, which is the original version for PC. Each player that wants to connect must have purchased Minecraft for their PC from minecraft.net. The console and mobile versions are not compatible with the Java version, and for those you'll need to use Minecraft Realms.

Computer Performance Requirements
Make sure your computer has at least a 2 GHz dual-core processor, 2 GB of memory (RAM), and a fast Internet connection (if playing over the Internet). Depending on how many players you'll have on your server, you may need more power than that. Stopping as many running and background programs as possible will also help.

If your computer isn't up to the task, check out Amazon's top-rated gaming PCs. When looking for a PC, the processor and RAM are the most important components for the server, and the graphics card is important if you're intending to play Minecraft on the same computer as the server.


Step 1: Get the Latest Version of Java


Go to java.com/en/download and get the latest version of Java.


Step 2: Download the Minecraft Server


Download the latest version of the server from the official download page. It will be a jar file with the version in the file name. At the time of writing, it is minecraft_server.1.12.2.jar but may be a newer version when you're reading this. Put that downloaded file in a folder where you'd like to run the Minecraft server.

Copy the command from the official server download page (highlight it and copy it). It will look something like this (note also that the version may be newer than 1.12.2 when you're reading this):

java -Xmx1024M -Xms1024M -jar minecraft_server.1.12.2.jar nogui

Step 3: Run the Server


Open a Windows command prompt in the folder where you put the server jar file. To easily do this, hold down shift while you right-click in an empty space inside the folder:

Minecraft Server Command Prompt

Once in the command prompt, run the command from above (note that the location and version may be different for you). You can paste it in to the command prompt by right-clicking and choosing paste (ctrl+v does not work in command prompts).

The Minecraft server will create some files in the folder it resides in and you should receive an error message about the EULA:

Minecraft Server Command Prompt

You will have to open the generated eula.txt file and set:

eula=true
After doing that, run the command again. This time a new world should be generated and your server should be running:

Minecraft Server Command Prompt


Step 4: Server Commands


The server is controlled using server commands that you enter in the command prompt. View the basic server commands here and familiarize yourself with them. At the very least, know how to use stop, which safely closes down the server and saves the world.

Minecraft Server Command Prompt


Step 5: Connect to Your Server


Open the regular Minecraft game, click Multiplayer, then click Direct Connect. You'll be entering an IP address here based on where you are relative to the server computer.


On the same computer
If you're playing Minecraft on the same computer as the Minecraft server, enter 127.0.0.1:




On another computer in the network
If you're on another computer in the local network (connected to the same router), enter the local IP address of the computer that's running the server. To find this, go to the computer that's running the server and type ipconfig into a command prompt. The IP address should look similar to 192.168.1.1, though the last two numbers could be different.


(The above is an example IP address only)


Over the Internet
To connect to the Minecraft server over the Internet, you'll need to know the external IP address of the computer the Minecraft server is on. You can find it by browsing to whatismyip.com while on the Minecraft server PC. Just like the local IP address, it will be 4 sets of numbers separated by periods. It may look something like 65.214.224.57 but each set of numbers will be different.

If the computer that the Minecraft server is on is connected via a router to the Internet modem, which it should be for security reasons, then you'll have to make sure the router is properly port forwarding Minecraft Internet traffic to the computer that has the Minecraft server on it (even if you only have the one computer).

Port forwarding is something your router does so that it sends the right type of traffic to the right computer. Minecraft uses port 25565, so the router needs to be setup to send any traffic on port 25565 to the computer that has the Minecraft server.

Go to portforward.com, scroll down and select your router model. The model number is usually listed on the front or back of your router. If you are shown an advertisement for a port forwarding program, click "skip this advertisement" at the top.

Next, select the game you want to port forward for, which is "Minecraft Server" in this case. It may tell you that you need a static IP address. It's referring to the internal IP address. Every time a computer is connected to your router, or turned on, the router assigns it a local IP address. It usually stays the same but can sometimes change. So you may have to update the settings if you were to disconnect the computer from the router or shut it down. If you run Minecraft server a lot and shut down your computer often, you may want to look into giving your computers static local IP addresses.

Once you've forwarded port 25565 to the correct computer, you can test it at www.yougetsignal.com/tools/open-ports. Be sure to check for port 25565 (80 is the default port for website traffic). For additional troubleshooting, see the Minecraft server install wiki.

Keep in mind that both your external and local IP addresses may change when you shut down your computer or reset your modem. Each time you start your server, be sure to double-check your internal and external IP address, and update settings accordingly.

Now that your Minecraft server is properly setup, you can send your external IP address to your friends and have them connect to your Minecraft server over the Internet:


(The above is an example IP address only)
Share This Post
Twitter
Minecraft Guides & Games
The Complete Handbook
The Complete Handbook
See More Details
Construction Handbook
Construction Handbook
See More Details
Action Figure Set
Action Figure Set
See More Details
Top-Rated Gaming PCs
Top-Rated Gaming PCs
See More Details

Comments (137)

zZmanYTB   Jul 18, 2018
Stephen open powershell , it's a app exactly like cmd
zZmanYTB   Jul 18, 2018
''Hi'' Rename the file
zZmanYTB   Jul 18, 2018
Anonymous , if that is not showing than you will find ''Open Powershell window here'' which is the same thing
zZmanYTB   Jul 18, 2018
f0 in the folder with the server you will find server.propreties open with notepad , scroll down till you find online-mode: true. Delete true and type: false.
IanC   Jul 14, 2018
You can change the seed in the server.properties file
Nick_McStampy   Jun 29, 2018
Ok, thanks. Yeah, it's not there I guess it was deleted. BTW is there a way to change the name or seed?
Nick   Jun 28, 2018
The server world is created in the same folder as the server.jar file (it is a folder named "world"). It's generally a good idea to create a backup copy of this folder often. If it was deleted, the next time the server runs it will generate a new world (with the folder name "world").
Nick_McStampy   Jun 27, 2018
Hey, long time, no talk. Anyways, how do get the info for the world back? The world and files disappeared after crashing, gave me a new world but same inventory so what do I do?
Nick   May 23, 2018
If you don't want to download Java then you can use Minecraft Realms for multiplayer.
Dolphinbill5   May 23, 2018
Anyway we can do it without downloading a virus?
Alexis   May 19, 2018
im on MacBook Air
Alexis   May 19, 2018
HELPPPPPP, me and my friend want to play Minecraft together but im on computer and she's on iPhone and we can't figure out how to join one or the other plzzzzzz help
f0   May 06, 2018
can i run it on a cracked minecraft? ive tried, and it says 'failed to verify username'
muhammad fiqri   Apr 30, 2018
minecraft
Anonymous   Apr 26, 2018
The "Open command window here" button isn't showing. whyy...?
silver   Apr 22, 2018
Hi, thanks so much for this guide, but I'm still having some difficulty. I followed all port-forwarding instructions, got a static IP address. I can access the server through "localhost," but I'm unable to get friends on non-local servers to connect. Port-checker websites do say that port 25565 is closed on my IP; is this a Firewall issue? I can't access my Firewall info; when I go to "allow an app to run through firewall," Java is not listed as an option. I can't find the Firewall services on my router's settings page ANYWHERE (I'm using a Netgear Nighthawk X6 R8000). I'm also running Norton, is this a problem? (The error code friend received when he tried to connect is "io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information:" Thanks!
DutchScary   Apr 21, 2018
thanks for this help. I'am so happy now : )
Me is you   Apr 14, 2018
When I clicked the download link it gave me a file named server not minecraft_server.1.12.2 so when I did the command it didn’t work
Nick_McStampy   Apr 06, 2018
thanks, and I sent you a google hangouts thing, by the way, hope that was ok with you I meant to ask but I clicked the wrong thing.
Nick   Apr 06, 2018
Here's some info on changing the server port: bukkit.org/threads/how-to-change-your-minecraft-server-port.119864/ And here's how to run two different server instances: www.minecraftforum.net/forums/support/server-support/server-administration/1892550-multiple-worlds-server-at-the-same-ip
Nick_McStampy   Apr 06, 2018
Thank you for the response!
Nick_McStampy   Apr 06, 2018
Thank you. Could you do a tutorial on making a Minecraft server that listens to a different port and the internet connection setup thing? (P.S. didn't know what to call it so don't judge my terminology, please.😜 )
Nick   Apr 06, 2018
I'm not sure if you can do a second setup on the same computer. It would depend on if you can run a separate instance of the Minecraft server that listens to a different port, I think. I haven't researched into it but that may be a place to start. If you're in different cities you'll have to connect over the Internet. The setup is a little more difficulty but not too bad. You could also just give in and use Minecraft Realms, which costs money but will be much simpler.
Nick_McStampy   Apr 06, 2018
Two main questions: Q1) Is it possible to do a second setup of this on one computer? Q2) How can I and my cousin connect when he is in New York and I'm in Fayetteville? One side question: Q3) when will I get any answers?
Nick_McStampy   Apr 03, 2018
Is it possible to do a second setup of this on one computer?
michael   Mar 21, 2018
how i play?
person   Mar 21, 2018
how do i add more ram
Hi   Mar 16, 2018
When I clicked the download link it gave me a file named server not minecraft_server.1.12.2 so when I did the command it didn’t work
Stephen   Mar 11, 2018
I don't have the option to open the command window it just says open Windows Powershell
Z1RO   Mar 11, 2018
My friend cant join :(
Wyattstubbs   Feb 05, 2018
Who gots server 1.29 join me my name is on minecraft is theonlyome&12
Wyattstubbs   Feb 05, 2018
Who want to plwy with me my server is 1.2.9. Anybody plz play with me
ELIJAH WEATHERSPOON   Feb 04, 2018
IM TRYING TO PLAY MINECRAFT WAAAAAA
king   Feb 04, 2018
hi
Burger_burglar   Feb 03, 2018
This is easy, me and my friend just started playing together doing this, well explained, i give it that :)
brooklyn taare   Jan 31, 2018
i really wanted to play it but i can not download
jerome fakhoury   Jan 19, 2018
i also wanted to get a laptop and a mouse for my laptop
jerome fakhoury   Jan 19, 2018
i really want to play with my sisters online i wanted to play minecraft because I don't have the app
catmonster873   Jan 14, 2018
i need help and im trying to play with my friend and plz help january 14,2018
Emelda   Jan 08, 2018
Animals
Sammy   Jan 07, 2018
I did not fully get it but I think it will be good.
Jake   Jan 05, 2018
Dam mincraft is fun
Mkm   Jan 03, 2018
I want to play freaking Minecraft online did is Nov help
Imp 178   Jan 03, 2018
I am not an imp actually ok but I want to know why when I type ipconfig into the command prompt of the server and it says unknown command? help, please!!!!!
uni the kitteh   Dec 28, 2017
what should i be doing in a less techy way
Jeff the killer   Dec 14, 2017
THX IT HELPED ALOT!!!!
limaj246   Dec 13, 2017
hi lets play minecraft i play on ps3
Adam   Dec 12, 2017
I'm having significant problems playing this game with my friend via the internet. Why's it got to be so bloody complicated? The first time we opened my ports and I did the static IP address stuff, it eventually worked, the whole nightmare only taking half an hour. However we spent two hours on it yesterday and she just could not connect to me no matter what.
Treazure 😎😎   Oct 15, 2017
I want to play Minecraft now
Ian   Oct 13, 2017
Hi guys if you want to join in phone just download the blockman multiplayer for mcpe
MAP   Oct 07, 2017
can anyone help? Please
Poo   Oct 06, 2017
I love minecraft S
Matthew Cantu   Aug 30, 2017
i need help can anyone help
Nastase Damian Stefan   Aug 08, 2017
25565 bro
Kim Syverson   Jun 18, 2017
how get minecraft
Minh Anh   Jun 16, 2017
no
Sandhy YT Drake   Jun 16, 2017
i think its to easy for me
Antonio Nardone   Jun 05, 2017
This doesn't work D: I can join but others can't ! ''connection timed out''
Oshay Chavarin Oshaychavarin   May 24, 2017
can i join to play with you guys please
Les Washington   May 15, 2017
hi
Natalie Sutherland   Mar 25, 2017
i love minecraft
Wyatt Wayne   Dec 22, 2016
This Was Super Helpful!!! Now me an my Friend can play minecraft together
Putu Jerry   Dec 12, 2016
. Thanks Minecraft Duh i with me child i have child 2
Merina Fernando   Nov 27, 2016
hi
David Glassman   Oct 30, 2016
i love mincraft! its the best!
Solongo Monhtor   Oct 24, 2016
minecraft pe ??????
Nick Vogt   Aug 29, 2016
That's a version 6 IP address. Should work the same, though I have no experience using it with Minecraft.
Edwins Bazile   Aug 28, 2016
it says my ip is 2601:18d:4201:5c3:f177:5e22:b9c2:f2f1
Nick Vogt   Jul 06, 2016
"localhost" refers to the computer you're currently on. If you're connecting to a server that is running on the same computer, then you can use "localhost" or 127.0.0.1, they are interchangeable here.
Yesenia Alamo   Jul 05, 2016
Ok I went to a different video and I downloaded it and it told me to put the ip as localhost I did it but what's the ip? I'm so confused is someone knows pls reply
Sharifi Brown   Jun 27, 2016
hey i am new so if you guys can help me plz do
Tolen Bajubair   May 18, 2016
I really need someone to ply minecraft pc or xbox 360 with me becuase Im feeling soo lonley I am 11 i started playing minecraft a year ago and Iam a girl and i play only with girls thank you
Julie Emery   May 08, 2016
This does not help because it's on my phone
Kayla N Batstone   May 06, 2016
I LOVE IT I DID IT WITH JESS WITCH IS APHMAU
Carsy Lacson   Mar 27, 2016
it says java.net.COnnectException; connectionrefused: nofurtherinformation WHAT DO I DOO
Hailey Mitchell   Dec 13, 2015
i don't no what to uese for it at all sorry but i don't no.
Hailey Mitchell   Dec 13, 2015
hey does any boady whant to play mincraft with me toaday
Renalty de Lima   Nov 14, 2015
onde baixa aaaaaaaaaaaaa
Nick Vogt   Nov 12, 2015
You may have to search Google for help on your specific router. Find out the exact model and search for port forwarding.
Steven Sandoval   Nov 12, 2015
Nick Vogt portforward.com does not have my router. What do I do now?
Nick Vogt   Nov 11, 2015
If he's connecting over the Internet, he'll have to put in your IP address (and your local network needs to be setup to properly port forward Minecraft connections).
Steven Sandoval   Nov 11, 2015
If I am going to have my computer host the server while playing on it, what does my friend put into the direct connect to connect to my server?
Logan Kern   Oct 19, 2015
How can i change what the world is like.
Chiwaii Farms   Sep 16, 2015
Windows ten edition, phone versions and ios versions r compoaatible due to the latest update. I have tried it without the cross platform (normal one) and i still had the same problem ;-:
Nick Vogt   Sep 14, 2015
Your router is set up to use 10.0.0.x for DHCP, which shouldn't be an issue (you'll just be using that instead of 192.168.1.x). I am not sure why it isn't working for you, but I have no experience with cross platform Minecraft. I'm not sure that they are compatible.
Chiwaii Farms   Sep 14, 2015
I have followed everything correctly, but the only difference between urs and mine is that my ip for my pc is 10.0.0.( ) i wont tell the last two numbers. Its the same as my default gateway cept for the last part. I want to run the server on my pc and play it on my kindle ( i hve a cross platform server if that helps) and whenever i trt to connect it says cannot load world etc
Nick Vogt   Aug 31, 2015
If your computer is powerful enough, you definitely can. You can run a Minecraft client as well as the server, or anything else your computer if up for.
Starla Watson   Aug 31, 2015
if i put a minecraft server on my computer can i still use my computer for other things or is going to only be for minecraft???????
Zara Bashaeva   Aug 27, 2015
aj get a minecraft
Zara Bashaeva   Aug 27, 2015
i wil
Shiniest Popplio   Jul 30, 2015
i will
Bonnie Reynolds   Jul 20, 2015
want to play minecraft but nothing is working
Dellys Haynes   Jul 07, 2015
Minecraft is awesome
Malik Flame   Jun 27, 2015
me
Ball DeAbate   Jun 16, 2015
i have pc version
Ball DeAbate   Jun 16, 2015
how wants to be my freind
Tam Nguyen   Jun 15, 2015
I LOVE THIS WEBSITE
Kenzie Kbbsl   Apr 24, 2015
ha who noes ben
Bret Bruce   Apr 22, 2015
you gay son
Kyle William McComsey   Apr 07, 2015
i will join that server
Hussain Aledrus   Apr 01, 2015
stupid
Hussain Aledrus   Apr 01, 2015
I got ps3
Hussain Aledrus   Apr 01, 2015
what
Sidii Yaqub   Mar 20, 2015
ITS A LAN SERVER
Sidii Yaqub   Mar 20, 2015
join this server 108.170.49.140:25700
Jacqueline Ezell   Mar 18, 2015
i love u
Silvestre Sebastian D'Amore   Feb 10, 2015
does this work with friends around the globe? or just within range of ur own house
Anthony Sebastian   Dec 29, 2014
Excellent Minecraft wiki! I was able to easily setup a server and play with my friends following your steps! Thanks!
Kevin McDermitt   Dec 07, 2014
Great "how-to"...thanks for putting this together!
Kristina Lovelace Hawkins   Dec 01, 2014
I'm going to play right now
Jodie Andrea Green   Feb 12, 2014
I don't know how
Nicholai Vince Pancho   Mar 13, 2013
can someone give me a ip number and i will join the server
Dylan Sinclair   Jan 02, 2013
nevermind my bad
Dylan Sinclair   Jan 02, 2013
how do ur friends connect
Yon Stackz   Dec 21, 2012
let play minecraft
Julie Kumm   Oct 24, 2012
can i play minecraft
Adam Ryan Scott Konkle   Sep 28, 2012
i like this games vere much
Tyler Felts   Sep 20, 2012
does anybody have mincraft
Melissa Costa   Sep 07, 2012
One friend can connect to my server, while another friend cannot. However the friend that cannot connect to my server can connect to other servers. So..... help? Anyone?
dokstein   Aug 20, 2012
This is great info and worked beautifully for me to set up a minecraft server for my son to play with his friends. The only things that are missing in these instructions are: (1) That I had to open up my Windows (XP, fyi) firewall on the machine I was running minecraft on. The symptom of this was that when we tried to do a direct connect to the server, the connection timed out. The solution was to bring up Control Panel / Security Center, click Windows Firewall under "Manage security settings for:", select the Exceptions tab, click "Add Port...", and then enter a name (anything - I picked "Minecraft") and 25565 for the port number. The instructions for this would be similar, though different, for other Windows versions, commercial firewall products, etc. Also (2), I believe only users with premium Minecraft accounts will be able to connect to a remote server.
David Artavia   Jul 10, 2012
no lo entiendo deberia estar en espaol y yo digo en la computadora para que sepan y no puedo ir al inicio
Charudaththa Thenuwara   Jun 22, 2012
It says cannot verify Username, does this work on Mineshafter?
Jackie Almstad-Heenan   Jun 13, 2012
too hard 4 me (
Suttree Lowery   Jun 12, 2012
:T i think I'm the only person who this didn't work for.
Sean Ukno Miller   Jun 04, 2012
none of this will work on both ends??? please help
Stephany Paredes   May 26, 2012
this guide is so amazing, i spent hours looking at videos and other tutorials how to set LAN and Internet...and finally this tutorial helpped with both!! thank you soooo much~!!! ugh you saved me and my fiance from wasting time sleeping when we could be playing minecraft!!
Melanie Marasco   Apr 28, 2012
Thanks bro for the instructions
Melanie Marasco   Apr 27, 2012
sup
Keaton Slowiak   Apr 11, 2012
i cant play with my friend how do i do that
Collin F Mesa   Apr 08, 2012
Badass. :D
Dylan Thomson   Apr 04, 2012
what changes does it do to the computer
Rifshad Mohamed   Mar 24, 2012
dfddd
John Clark   Mar 11, 2012
trey you need to run the jar file when u join
Trae Rohleder   Mar 02, 2012
I NEED A MINECRAFT SERVER BUT PLAYERS CANT JON MY SERVER THE IP IS 127.0.0.1 :25566 AND MY USER IS ROLLYONE I CAN CONNECT BUY PLAYERS CANT HELP PLEASE ON MINECRAFT-SERVER.JAR
jack.kivleyhotmail.com   Feb 01, 2012
I hve a stupid 2wire router!
Saadat Alam   Dec 04, 2011
danm i dont have minecraft
Hit Halder   Dec 04, 2011
TANKSSSS BROOOOOOOOO
Share This Post
Twitter
Minecraft Guides & Games
The Complete Handbook
The Complete Handbook
See More Details
Construction Handbook
Construction Handbook
See More Details
Action Figure Set
Action Figure Set
See More Details
Top-Rated Gaming PCs
Top-Rated Gaming PCs
See More Details
H3XED © Nick Vogt   RSS   Policies   Twitter