Updates
25May-SIGNIFICANT. Updated Guide to Include a Start Command.
14May15- Guide Created.
15May- tweaked guide, fixed link, added info.
This is a Work In Progress Written by your friendly networking novice.
Links:
*Download Java.
*Download Java 8 Development Kit.
*Information and system requirements for installing and using Oracle Java on Mac OS X.
*How To Make A Minecraft Server 1.8.4 Mac OS X Tutorial Port Forwarding Included
*How to Accept EULA terms when installing a Minecraft Server
*Setup a Minecraft Server@Minecraft Gamepedia.
*How To Host A Minecraft Server- Mac and PC.
*Operator]Minecraft Operator
*Set Up a Server in Minecraft
*Failed To Load Operator List- Note ops.json file can’t be directly edited. OP’s are added to the server consol while the server is running. See OP section below.
*Portforward.com
*Difference Between Cable Modem and Router
*How To Open Ports for Router/Firewall@wikihow.com.
*Game Modes
*Server Properties
*Change Minecraft World Seed
*Minecraft World Seeds
*How To Change Your World Seed
*Seed Level Generation
*How To Whitelist Your Server
FAQs
*Is Running a Minecraft Server Dangerous? From the standpoint of strangers accessing your computer, maybe.
*Is a Mac Minecraft Server cross platform accessible? Yes!
*What is the Seed of a Current Game? To view the current world's seed, enter the command /seed. (Type “/” (no quotes) to start a command. A text window will appear.)
*Java of Java Development Kit? Java is required to run Minecraft/Server. The Minecraft Server can be run using Java, by clicking directly on the Minecraft.jar file, but my experience is that I needed the Java Development Kit, to launch the Server using the Start Command.
*Why do I care about a Start Command? I believe the Start Command assigns memory to a java application and may be used to setup other parameters (not covered in this tutorial). If not used, a default amount of memory is assigned. (unverified)
*Can a Minecraft Server and Minecraft Application be run on a single computer? Yes, if you have enough memory installed. Min 8GB reccommended.
*Should a Minecraft Server use a Whitelist? This is a security feature. The Whitelist grants permission to enter the server. For a server for personal use with friends, absolutely!
*What address do your friends use to connect to your server? Your “IP address
*What is the default method of accessing your router settings? In your browser url window, type in 192.168.1.1. User= Admin, Password= password.
Hosting a Minecraft Server and Playing Minecraft on a Single Computer
Yes it can be done if you have enough memory installed on your computer. I can’t give a definitive answer, but a minimum of 8GB RAM sounds good. The setup requires that the server be running. And to play on this server, you’ll have to launch the separate Minecraft application.
Install Mac Minecraft
I’m assuming you are all ready playing Minecraft, but if not, and you want to play on your server, you’ll need to purchase Minecraft for $26.95. You’ll have to establish a Minecraft Account. To proceed with installing Minecraft (NOT THE SERVER), install or download Mac Minecraft from Minecraft.net. When launching Minecraft for the first time, I got a message that I needed to install Legacy Java SE6 Runtime. Clicking on “More info” took me to the download site. Turn off any Java applications such as the Minecraft server before you install this or it will stall.
HOWEVER, actually I’m not sure if this is required because in the next section, I’ll have you download the Java Developer Kit which is currently (May2015) at version Java 8. If you don’t want extra stuff on your Mac, just try installing Java 8 in the following section. If you continue to get the message that you need Legacy Java, you can always download it later. Link above.
Install Java Runtime
Read the 25May15 Update this section before installing Java.
Minecraft Server requires Java Runtime. Although you might see info online that implies the MacOS includes Java Runtime and that Software Update keeps Java Runtime updated, if you have not installed it, you probably don’t have it. Check your System Preferences. If there is no Java Control Panel, it needs to be installed. After installation a Java Control Panel will appear in System Preference.
*Information and system requirements for installing and using Oracle Java on Mac OS X.
25May15 Update: I’ve discovered that despite online guides saying to install Java alone, when I try to run the start command (later discussed), I get a message that I need the Java 8 Development Kit which takes up considerably more disk space (approx 600MB), than straight Java. You can try to install Java alone (link below), and if you get the message about needing the Development Kit (later when clicking on the Start file), install the Development Kit or just install it now and forget about vanilla Java. Hopefully, I’m not driving your crazy with my indecisiveness.
*Java Runtime
CREATE THE SERVER
Disclaimer: I primarily used two sources: http://minecraft.gamepedia.com/Tutorials/Setting_up_a_server and https://www.youtube.com/watch?v=c_PoN3bozAY] to create a functional server.
- Did You Install Java Runtime? If not, do so.
- Create a folder called Minecraft Server.
- Download Server File: Minecraft.net. Under Multiplayer Server section, download this file: minecraft_server.1.8.4.jar and move the downloaded .jar file to your Minecraft Server folder.
CREATE THE START COMMAND
*You might find waching the Youtube Video to be helpful.
*As an alternative use This Link to use the Mac’s Automater program to create a Start Command. It uses a different script and I don’t know what significant differences there are between this and the script I use below.
- Open Text Edit (Applications>Text Edit). In Text Edit, Select “Format: Make Plain Text.”
- Go to this page: Tutorials/Setting Up a Server, scroll to the Mac OSX Yosemite Section and copy this script or copy (Command C) it from here and paste it in Text Edit (Command V).
Copied from web page:
#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms1G -Xmx1G -jar minecraft_server.jar nogui - Decide on amount of Server RAM (memory) to Allocate: Open the Apple Icon, select “About This Mac” to determine how much RAM your Mac has. Mine has 8GB and I elected to assign 3GB to my Minecraft Server. A rule of thumb is don’t exceed half your total memory, but if your Minecraft Server is performing poorly, you can consider opting the memory to it and see if that helps.
- Alter the above text as follows: The “1s” are changed to “3s” to allocated 3GB RAM to the Minecraft Server and change the name of the minecraft server to match the name of the .jar file you placed in Minecraft Server folder. It must match the file name you used! In my case it’s: minecraft_server.1.8.4.jar and looks as follows:
Start command altered for my Server:
#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms3G -Xmx3G -jar minecraft_server.1.8.4.jar - Save the Text Edit file (Command S) to your Minecraft Server Folder with the name “Start.command” (no quotes). Close Text Edit.
- Open The Terminal- (Applications>Utilities>Terminal) If not familiar, the Terminal is a application used to access the underpinnings of the UNIX Operating System that Mac is built on. For this case, it’s used to allow this script we’ve created to run, assign memory to the server and start it. If you’ve never seen the terminal , when launched a terminal window appears with a bunch of strange text similar to the following:
Last login: Thu May 14 09:20:21 on ttys000
JOHNs-MacBook-Pro:~ jbrown$ /Volumes/Seagate\ Drive/Minecraft\ Server/Start.command ; exit;
Last login: Sat May 23 17:14:36 on console
JOHNs-MacBook-Pro:~ jbrown$
Last login: Mon May 25 09:21:33 on ttys000
JOHNs-MacBook-Pro:~ jbrown$ - On the last line of this text by the $ sign will be a gray rectangle where text can be entered. Enter in “chmod a+x “ (no quotes, leave a space after the x) so it looks like this:
JOHNs-MacBook-Pro:~ jbrown$ chmod a+x - Drag the Start.command file you created into the Terminal window and drop it. The file remains in the Minecraft Server, but copies a path that points to the file and should look something like the following. Hit Return and if all goes well, it will execute and you’ll have another line appear with your name jbrown$ and no error codes. Close The Terminal. (Note: it will launch again in a minute as you follow this tutorial.)
JOHNs-MacBook-Pro:~ jbrown$ chmod a+x /Volumes/Seagate\ Drive/Minecraft\ Mac\ Test\ Server/Start.command
INSTALL THE SERVER
- Double click the Start command file you created.. If the message appears: file can’t be opened because it is from an unidentified developer, then right click on the file. A message will appear, “are you sure you want to open it?”, click on Open button. This starts the server install process.
- The Terminal will launch, after a couple of seconds the Minecraft Server window will appear briefly, more files will appear in the Minecraft Server folder, but then the Server window will disappear. Double click the “eula.txt” file and change “eula file=false” to “eula file=true”.
- Double click the Start Command file a second time. The Terminal will launch, after a couple of seconds, the Minecraft Server will launch, the server window opens up and populates with files. In the log section, you’ll see install progress and “done” when it completes. You now have a running server which can be joined, after the server is opened to the internet, designate yourself as an Operator/Admin, and establish Server Security (security recommended, but not required).
- Note, using the Start Command file, you’ll have both the Terminal and the Minecraft Server running. With this start method, if you close the Terminal, you’ll shut down your server.
- If you have issues with this Start Command, the Minecraft Server can be started by double clicking directly on the minecraft_server.jar file, but my understanding is that you’ll end up with the default memory assigned. -Not sure about this.-
Set Up Server Access From The Internet
I’m assuming you have a router and have not hooked your computer directly to your cable modem/modem. Port forwarding is not that hard to do, but it may seem challenging to figure it out if you are not familiar. Basically, you are opening a port for a game so your friends, can connect their Minecraft game through your router to your Minecraft server. If you do have your computer connected directly to your cable modem, I believe the principle of port opening on your cable modem is similar (if it includes a built in router). As you can tell, I’m not sure, but my understanding is that Port Forwarding primarily concerns a router, and this guide only addresses what I had to do.
*Difference Between Cable Modem and Router
*How To Open Ports for Router/Firewall@wikihow.com.
Speaking of Firewalls
Your Mac has a firewall. Check System Preferences. My understanding is that applications in the firewall are either allowed access or denied. I believe port forwarding must happen in your router and the process of port forwarding needs to happen because you are using a router. Of note, my Mac Firewall is on and I have an exception for Minecraft.
GATHER THE FOLLOWING INFO
*What Router Port Does Minecraft Use?
This can be verified by opening the Server Properties file with Text Edit in the Minecraft Server Folder. Scroll down the list. It should say: “server-port=25565”.
*What is my IP Address? (Something like: 88.119.282.101).
Simply google “What’s My IP address? Write this down. Note, this can change on you if you don’t have a static IP address. Before launching your Minecraft server, just google this again and if it has changed, give the new number to your friends.
PORT FORWARDING/OPENING
*Portforward.com
*How To Open Ports for Router/Firewall@wikihow.com.
*Access Your Router Settings
Access your router settings by typing 192.168.1.1 into your browser’s url window (Safari/Firefox). If you have not customized your router security, you can log into it most likely by using the following user= Admin, password= password. Otherwise use the custom password you created. Inside the router settings, will be a section to enable port forwarding.
Note: If you open Security Preferences> Network and you are connected to your router via ethernet, you’ll see both see both the network IP address for your router (most likely 192.168.1.1) and you’ll see the network IP address of your computer (for me it’s 192.168.1.10). Your router assigns this number to your computer. If you are connected via wifi, you’ll only see your computer’s network IP address. Note these numbers apply to your network only. This is not the IP Address, which we determined 2 steps ago, that your friends will use to connect to your server. IP Definition@ComputerHope.com.
As a general tip, break out your router manual/pdf or google your router model online. This YouTube Video covers port forwarding. Depending on your router brand, there may be also be info on setting up Game networking in its manual. The mechanics are fairly uniform regardless of which brand of router you have. Here is my example:
Port Forwarding on the Netgear N900 router
I typed in 192.168.1.1 into my browser url window. The Netgear Genie (Settings) appeared as a web page. I clicked on Advanced> Advanced Setup> Port Forwarding, and selected Add Custom Service. In the new Window, I used “Minecraft” for the Service Name, typed in the port it uses “25565” for both the start and ending port. Below this window is a list of my recognized devices, my MBP being one of them, where the Minecraft server resides. So I selected that and applied the setting.
*Friends: How they connect to your Server
Give friends your Minecraft Server Address. Combine the IP address (from above), with the Minecraft port so it looks something like this IP+Port, separated by a colon: “88.119.282.101:25565” (no quotes).
When your friends launch Minecraft, they would select “Multiplayer game”, “Add server”, type in any name associated with your server and the server address you gave them. If the server is available, it will show green. If not available, red type will state “Can’t connect o Server.
Minecraft Server Admin and Security
How To “OP” Yourself and Change Game States
*If you want to change the Server state from Survival to Creative, you need to be an “OP” Operator which enables Admin abilities.
*Gameplay Modes
*Failed to Load Operator List
Note: OPs must be added via the server Log and Chat console. This is accomplished by starting the server and in the server window on right side under Log and Chat, type in the command “op player name” (no quotes). Just in case it’s not obvious, replace “player name” with your Minecraft name. Look for a message in the log saying “Opped player name”. If it does not say this, it did not take. Check formatting and try again.
Change Game Mode:
*In the game type, test your OP status by typing “/gamemode 1” (no quotes) which will open a text box at the bottom of the game window, and if successful will result in a message that “gamemode has been updated”. See if you can fly... (DC space)
Minecraft Server Security
Create a Whitelist, a list of only the friends you want joining the server. In the Server Properties File is a Whitelist file that can’t be directly edited. It must be changed using the following commands when the server is running.
*While Server is running type in the Log and Chat window (of the server): “whitelist on” (no quotes).
*Add names to white list: “whitelist add username” (no quotes).
*How To Whitelist
How To Use a Saved Game World on Your Minecraft Server
Pull the default “World Folder” out of the Minecraft Server folder and tuck it away somewhere for safe keeping. Copy a saved Minecraft world folder (Where Are Minecraft Files Stored?) from your Minecraft folder and paste it into the Server Folder. “World” Edit it’s name to “World”. Launch the Minecraft Server, launch Minecraft, log into the server and check it out.
How to Change Server Seed
*Note: Under System Properties: Level Seed, I’m not sure about if a name or a number should be used to copy a seed, but I believe it’s a number.
*If a seed number is entered, the world file in the server should be removed. On launch of the server, the seed world will be created.
*What is the Seed of a Current Game? To view the current world's seed, enter the command /seed.
*How To Change Minecraft World Seed
*Server Properties
*Seed Level Generator
Last edited: