How can I host my own Minecraft server?
Method 1: Open to LAN
This method is useful if you and your boyfriend are on the same network (ie. both computers are connected to the internet using the same router). Open Minecraft, click Singleplayer
and enter the world you want shared. Press ESC and click on Open to LAN
, choose your desired settings, and click Start LAN World
. You will immediately see a message stating the following:
Local game hosted on port 12345
Take note of the port number, shown here as example 12345
(Hint: If you need to see it again, press T and you will see it there in the chat history). As long as this world stays open and running, it will be available for connection. If you need to exit the world and/or close Minecraft, you will need to Open to LAN again next time you play.
Open Minecraft on your boyfriend's computer and click Multiplayer
. Minecraft should automatically detect and display a list of open worlds on your local network. If your world appears in this list, select it and click Join Server
. You should now be playing in the same world. Anyone else who is on the same network and wants to join simply needs to enter Multiplayer, and the world should appear in their lists as well.
Troubleshooting
If the world did not appear in this list, you can try connecting directly to the host. Click on Direct Connect
and it will ask you for a server address. For this method, the address must be written in two parts:
[Local IP of host]:[host port number]
The port number we already have, from above. The local IP can be found by using the host computer to open this page. It will look something like this: 123.45.0.6
. Once you have these two numbers, type them into the Server Address box as such:
123.45.0.6:12345
and click Join Server
. If this method has worked, you should now be playing in the same world. Again, anyone else who is on the same network and wants to join simply needs to type the above address into their Direct Connect screen.
If none of this has worked at all, or someone wants to join your server from outside your local network, consider using Method 2 listed below to set up a standalone server.
Method 2: Standalone Server
This method is useful if you want someone to be able to connect to your server from anywhere in the world.
Start by downloading minecraft_server.jar from the official minecraft website. Place it in an empty folder somewhere on your computer and open it. It will generate a few files around itself, including one called eula.txt
. Open this file and follow the instructions inside to view Minecraft's End User License Agreement, and finish by changing the line eula=false
to eula=true
and saving the file. Now when you open minecraft_server.jar you'll see the world being created, and when it's done, it'll tell you so. As long as that program is open and running, your server will be available for connection.
Any computer on your LAN will be able to connect to this server now. Simply open minecraft, login and head into multiplayer. Click Direct Connect
and type in the LAN address (found here) of the computer where the server is running (the "host"), and hit Join Server
. To connect using a computer outside of the local network, use the host's external IP address instead (found here). To connect to a server running on your own computer, simply use the IP 127.0.0.1.
Troubleshooting
- If clicking
Join Server
doesn't go through on the first try, give it a couple more tries. - Make sure you have Java installed and configured on your computer. You can download Java here, and if your server still doesn't open properly, Java configuration instructions can be found here or here.
- Try changing your firewall settings (XP, Vista/7). The application you're adding is minecraft_server.jar, the port is
25565
(or port range25565
-25565
), and you want this on both TCP and UDP protocols (you may have to add a rule for each). - Try port forwarding on your router. If you have access to your router, open your router configuration webpage (um, what?) and find the Port Forwarding section (might be listed under Applications and Gaming). Use the same ports and protocols as above.
- Try setting the server to offline mode. Close the server for a moment. Go into the folder where Minecraft_Server.exe is sitting, and find the
server.properties
file (may simply appear asserver
). Open this with Notepad and changeonline-mode
from true to false. Save it, close it, and start the server again. - Try connecting the computers directly to one another, via ethernet cable. This one will work as a last resort, and is handy for laptops or desktops which are fairly close together. If you're picking up wireless internet or have a second ethernet port in your computer, you won't even have to sacrifice your internet connection.
- Instead of connecting by putting in your LAN address in the server IP box, put in "localhost" (without the quotes) in the server IP box and try to connect.
Updated answer as of 11/5/17
Here is the updated link to the tutorial on setting up a server on the wiki.
You can download the latest jar file from minecraft.net. It may download as a zip extension, in which case, you can change it to jar.
If you are interested in an alternative server which allows more configuration and the use of plugins, you can try bukkit, spigot, or paper spigot. Make sure to get the latest build for the version you play.
Setup of alternative servers is very similar to vanilla servers but adds more that can be done with plugins and more configuration files. Here is the wiki on setting up a Spigot server.
You can also use a single player world and Open to LAN.
The basics for starting the server are
- Put the jar file into a folder(as it will create files).
- Run the jar file. It will run and shutdown after creating files.
- Open eula.txt and change eula=false to eula=true and save.
- Open server.properties and configure to your liking.
- Run jar file again. It will create the world files.
You can now log in to the server. From the computer the server is running on you can use the IP:localhost to verify the server is running properly.
From here, it can be logged into from any computer on the network using the internal IP of the computer running the server. On some systems, you can use the name of that computer as the server IP address.
If you want to go online, you will have to port forward your router. Then other people will log in to your server using your external IP address. You can use whatismyip.com to obtain that IP address. You can also use a dynamic dns. This makes it so you don't have to give out an IP number but instead a web address which may be easier to remember. It also allows the server to change external IP numbers without requiring external player from having to go change the IP in their multiplayer list. Currently noip.com offers this service for free.
Here is a tool to see if your computer is up to the task of running a server for others to play on.
Another option is to use a server hosting service. This allows you to run the server on another computer. Several offer protection from DDoS attacks which is recommended if the server is to be public. Some offer subdomains which give the benefits of the dynamic dns.
Here are a few: mcprohosting.com, playpro.com, and currently server.pro even has a free option.
This is a rather old post but the other answers seem to have missed the obvious.
You are on a LAN network as you say, so you are both connected to the same router when playing. The one of you to host the server simply needs to create a new single-player world, load it up, open the menu, click "Open to LAN", choose the desired settings and your other half can join from the multiplayer menu at the bottom under "LAN Worlds". You will need to re-host the world every time you wish to play.