The Server Can Not Be Found
Setting up your own server to play Minecraft takes a little time, but it's worth the effort to play with your friends in a secure setting. Read on to learn how to make a Minecraft server for Mac, Windows, and Linux.
What You'll Need
- The Minecraft server software.
- A desktop computer or a high-end laptop.
- A wired Ethernet connection.
- A web host.
How to Host a Minecraft Server
Depending on your computer's capabilities, you may or may not be able to host a server and play Minecraft on the same device. It's recommended to use a remote hosting service for your server. The official Minecraft Forum has a list of free and premium hosting services. Some, like Server.pro, allow you to make a Minecraft server for free, but most web hosting companies charge a monthly fee.
Hosting your own server can open your computer to outside attacks. Using a premium hosting provider helps you avoid such risks.
Setting Up Port Forwarding
If you just plan to play with friends on a local network, you can disregard this section; however, for the rest of the world to access your server, you must enable port forwarding on your router. Since every router is different, consult your router's manual for more specific guidance on setting up port forwarding. Nonetheless, you can follow the same steps regardless of which OS you are using.
Setting up port forwarding opens your network to outside security risks.
-
Visit your router's homepage by entering your default gateway IP address into a web browser's search bar. See How to Find Your Default Gateway IP Address.
-
You'll be prompted to enter a username and a password. Consult your router's manual or look up your router on PortForward.com to find the default username and password. This information might also be found on the router itself.
-
After your router reboots, locate the Port Forwarding section on your router's homepage. It may be under advanced settings. Check the router's manual for help if necessary.
-
From here, you can set up rules for port forward. Depending on your router, you might have to select a button that says Add or something similar to proceed. Name the rule "Minecraft."
-
In the two port fields, enter the default Minecraft server port: 25565.
-
Enter your computer's static IP address in the IP or Address field.
-
Select both the TCP and UDP protocols. You may see a drop-down menu or boxes you can check.
-
Click Save orApply.
-
After your router reboots, your server should be accessible to players around the world.
How to Create a Minecraft Server for Windows
The screenshots and instructions below refer to Windows 10. Other versions of Windows have different interfaces, but the steps for setting up the server are the same:
-
Download and install the newest version of Java.
-
Download the Minecraft server software. The file has the extension .jar.
-
Create a new folder on your desktop or wherever else you desire and name it "minecraft_server." Drag the .jar file into it.
-
Double-click the .jar file. The server should start up, but you'll receive an error message. Close the server window if it doesn't close automatically.
-
Some configuration files will have appeared in your folder. Open the file named eula.txt. If asked which program to open it with, choose your text editor, such as Notepad.
-
In the editor, find the line eula=false and replace it with eula=true, then save the file and close it.
This step prevents the server from closing automatically. If you receive an error message, you can still run your server as an administrator. Just right-click the .jar file and select Run as administrator.
-
Double-click the server file again. This time, your server should start up successfully, and more files will appear within the folder. When you see a "Done" message in the server window, type "stop" in the text box and press Enter. The server should close.
-
You can technically run your server now, but you'll want to adjust the default memory settings and create a launch file if you plan to play with others. To do so, create a new .txt file in Notepad by selecting File > New. Type the following:
java -Xmx3G -Xms1G -jar server.jar
-
Go to File >Save As and name the file "run.bat."
-
Select Save as type, then select All Files.
-
Choose your minecraft_server folder for the location and select Save. Whenever you want to launch your server, just double-click the run.bat file you created.
-
You can now invite other Minecraft players to join your server. They just need to know your public IP address, or your local IP address if you're playing on the same network.
-
To check if your server is accessible, enter your public IP address into the Minecraft Server Status Checker. Your server will only be publicly available if you previously set up port forwarding. To look up your public IP address, simply enter "my IP address" into Google.
How to Set Up a Minecraft Server for Mac
To run a Minecraft server on a Mac, you must have macOS 10.8 or later. To upgrade your OS, visit Apple Support.
-
From the Apple menu, go toSystem Preferences and look for the Java icon. Open it to launch the Java Control Panel.
-
Click the Update tab, then selectUpdate Now.
-
When the installer window appears, selectInstall Update >Install and Relaunch.
-
Download the Minecraft server software.
-
Create a new folder named "minecraft_server" and drag the server software file into it.
-
Open a new .txt document by going into your Applications folder and double-click the TextEdit icon.
-
Once in TextEdit, select Format >Make Plain Text > OK.
-
Type the following into the document:
#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms1G -Xmx1G -jar {server file name} nogui
Just replace {server file name} with the name of the server file.
-
Save the file in the folder containing your server's .jar file and name it "start.command."
-
Open the Mac terminal by going to Applications > Utilities, then double-click theTerminal application.
-
In the terminal window, type "chmod a+x" (without the quotation marks) followed by a single space, and then press Enter.
-
Drag and drop the start.command file you created into the terminal window, then press Enter again.
-
Now you can open the start.command file to run the server. When you double-click the file, a new window will open, and you might see some error messages. Don't worry about them; the server should now be ready to play Minecraft.
-
Invite others to join your server by sharing your public or local IP address. Enter your public IP address into the Minecraft Server Status Checker to confirm it's accessible to the outside world. Find your public IP address by entering "my IP address" into Google.
How to Set Up a Minecraft Server on Linux
It's possible to make a Minecraft server with any Linux distribution. The steps below are for building a Minecraft server for Ubuntu 16.04. Set up is done entirely through the command terminal.
Since you want as much free RAM as possible, you should use an outside hosting service to run your server. Set up an account with one of the services listed on the Minecraft Forum before you begin building your server.
-
Connect to your hosting service via SSH by entering the following into your command terminal:
ssh username@ipaddress
Replace "ipaddress" with your host's IP address and username with your username. You may be asked to enter your password for your hosting service. Follow the prompts to complete the process.
-
Install Java by entering the following into the command terminal:
sudo apt-get update
sudo apt-get install default-jdk
If prompted, enter Y when asked to authorize installation.
-
Install Screen to keep your server running when you're not connected. Enter:
sudo apt-get install screen
-
Create a directory for your server files and open it by entering the following:
mkdir minecraft
cd minecraft
-
Install wget. Enter:
sudo apt-get install wget
-
Download the Minecraft server files using the wget command. Enter:
wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar
Consult the Minecraft download page to make sure the above URL is up-to-date.
-
Accept the end-user license agreement with this command:
echo "eula=true" > eula.txt
-
Run Screen by entering:
screen -S "Minecraft server 1"
-
Start your server with the following command:
java -Xmx512M -Xms512M -jar minecraft_server.jar nogui
Feel free to adjust the -Xmx and -Xms settings to allocate more memory for the server if your host will allow it.
-
You can confirm that your server is accessible by entering the IP address into the Minecraft Server Status Checker.
How to Connect to Your Minecraft Server
If you're hosting your own Minecraft server, the server window must remain open for others to access it.
-
Open Minecraft and log in to your Minecraft account.
-
SelectMultiplayer from the Minecraft menu.
-
SelectAdd Server in the lower-right of the screen.
-
Give your server a name.
Remember the whole world can see it, so don't use any vulgar or offensive language.
-
Enter your host's IP address into the Server Address box. If you're hosting the server, enter your private IP address, which is different than your public IP address.
-
Select Done at the bottom of the window.
-
Select your server's name when it appears at the top of the screen, then select Join Server.
-
Assuming you properly prepared you router, players from around the world can now connect to your server by opening Minecraft, navigating toMultiplayer >Direct Connect and entering your public IP address. Alternatively, players on your Wi-Fi network can simply enter your private IP address.
You might need to disable your computer's firewall before others can connect to your server locally; however, doing so can leave your computer vulnerable to outside attacks, so only share your private IP address with individuals who you trust.
-
You're done!
Thanks for letting us know!
Source: https://www.lifewire.com/how-to-create-a-minecraft-server-4173678