OS X MacRumors Q&D: Minecraft Server Setup Guide

Discussion in 'Mac and PC Games' started by Huntn, May 14, 2015.

  1. Huntn, May 14, 2015
    Last edited: May 25, 2015

    Huntn Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #1
    Q&D: How To Setup a Mac Minecraft Server
    modloader-for-minecraft-02-700x406.jpg

    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. ;) Please advise of any errors or suggestions in this thread or PM me. Thanks! guide location. -Huntn :D

    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



    _77605094_0210fd28-5f8b-41dd-a621-5558830c0316.jpg


    FAQs
    *Is Running a Minecraft Server Dangerous? From the standpoint of strangers accessing your computer, maybe. :p Honestly, I don’t know, but a server used for friends and family should include a Whitelist, covered in this tutorial. See How Safe Is It To Open Ports On Your Router?.
    *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:port”. See the Determining Your IP Address and Friends, How They Connect To Your Server sections.
    *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.

    1. Did You Install Java Runtime? If not, do so.
    2. Create a folder called Minecraft Server.
    3. 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:
    • 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:
    • 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:

    • 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:

    • 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.)


    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.-


    a09cc4ca9f2ad6ffb66f9602bd3739a5.jpg
    Rivendell


    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) :) Gamemode 0 = survival.


    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

     
  2. Solomani macrumors 68030

    Solomani

    Joined:
    Sep 25, 2012
    Location:
    Alberto, Canado
  3. Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #3
    Your welcome. Thanks.
     
  4. Huntn, May 15, 2015
    Last edited: May 15, 2015

    Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
  5. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #5
    Nice job. I've had a Mac Server running Minecraft for a little more than two years with no issues.

    I've found that Java8 runs a lot more stable and noticeably faster than 6.

    PS: just for fun, I rooted a Chrome Book, loaded Ubuntu and ran that as a test Minecraft server for a couple of months.
     
  6. Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #6
    About I don't know, say 6-9 months ago, I tried following an online tutorial or two and both were dreadful. That part where the server was to supposed to install and the server folder was supposed to populate with files, never happened. More evidence is the "ForThe Love Of God" thread. :) it was harder than it should be....

    Do you run it on Mac or PC? Do you use a start command? I can't get that to work as per the tutorials, so I DC on the .jar file to start up ther server.
     
  7. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #7
    I used a fairly sophisticated terminal command to start the MC server before 1.8. Since 1.8+ has come out the terminal command has become much simpler. No doubt it was a PITA to get up and running, the tutorials back then were few and far between and the ones that DID exist all seemed to add or miss one small but very important piece ( on purpose ).

    Thank you for the tutorial!
     
  8. Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #8
    Interesting, I'm not sure, but I don't think... I'm using any terminal command?? Just DC on the .jar file, unless something else I did, like try to create a terminal start command, made that work- don't know.
     
  9. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #9
    You can certainly double click on the .jar file or create a shortcut using Automator. Using a terminal command gives you access to a bunch of parameters that allow to tailor the MC server to run better/faster. That's why I use them.
     
  10. Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #10
    Do you have a link about what kind of settings? Funny you mention that. Tonight I played on the server for the first time seriusly and both me and friend we getting booted off the server about once every 30 minute with this message:

    Internal exception:Java.io.IOException:An existing connection was forcibly closed by remote host


    The server is still running and after being booted, we both can rejoin, but it's an annoyance. Any idea what that is about? Thanks!
     
  11. Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #11
    Update: In the server log I found this: Can't keep up! Did the system time change, or is the server overloaded? Running 21041ms behind, skipping 420 tick(s) Any ideas?
     
  12. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #12
    Can't keep up, means that your server is literally not keeping up. It cannot save and load the chunks fast enough. There are hundreds of things you can do to fix this.
    1) Latest MC server
    2) Java8
    3) DON'T RUN THE SERVER ON THE SAME MACHINE YOU ARE PLAYING ON
    4) More RAM alloted to MC server via command line startup
    5) Run MC in virtual memory
    6) Faster Hardrives ( SSD )
    7) Faster server CPU

    Many, many more things. These are in no particular order, just as they came to mind.

    Welcome to the beginning of MC server admin!
     
  13. Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #13
    Thanks for the help! I noticed that the message I mentioned was popping up when the display went to sleep. Soon after me and friend would be booted off. When I set my Mac display to stay on, the problem stopped happening. Curious that when I clicked a button on my Mac the display would pop back immediately, so I don't think it, the computer was sleeping, but?

    I do have java8. I've not been able to get the start command to work to assign memory to Minecraft. And I assume i got the latest server, but not sure about that. Where would that be found?
     
  14. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #14
    1) Java8 with Automator, a quick search yielded this:
    http://www.minecraftforum.net/forum.../194870-using-java-8-for-minecraft-on-the-mac

    This is the exact script I use for my MBPr client Minecraft ( basically, the system I play on)

    2) Latest server: https://minecraft.net/download

    3) I run the MacMini headless ( without a monitor ). It never sleeps. I log in with my MBPr and share screen to change settings, restart the server, set authorities.
     
  15. Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #15
    Thanks for the info! Of interest when I click the start command I all ready created, it tells me I need the Java development kit which is what you first link says to do... I'll report back.
     
  16. Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #16
    Thanks for the info! I've updated the Guide to include a Start Command. And although I stuck with my original tutorial, I included a blurb about using Automater to create a Start Command.

    However Honestly I'm not sure about the difference between the command in the script in my tutorial:

    And the Script in the Automater Link:
    Do you or anyone who is up on Terminal scripts know the difference and if it is significant in what it accomplishes?
    Thanks! :):)
     
  17. Dirtyharry50 macrumors 68000

    Dirtyharry50

    Joined:
    May 17, 2012
    #17
    I own Minecraft myself and got it because my nephew and his cousin played a lot so I figured I'd join them once in a while. Then I read about needing a legacy version of java on my Mac for the launcher to work and removed it.

    Last I knew, a new launcher that encapsulates java for Minecraft's use if I recall correctly was in development and I decided to just wait on that but I haven't followed up in some time to find out what if anything has resulted there.

    Maybe I should just install it via whatever is the recommended way currently, for the single player/online (not server) just to have some fun with it. I am more likely at this point to just play myself here offline anyway. I think my nephew has moved on to other things like Destiny on his console, etc.

    Is using an outdated java runtime still needed for the launcher to work?
     
  18. Huntn thread starter Suspended

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #18
    Actually I'm not sure. I know when I recently installed Minecraft on my Mac, a message said I needed Java Runtime v6 which I dutifully installed. But when I installed the Minecraft server, current online guides had me install the current Java Runtime version 8. The only way to test would be to try to run Minecraft without the older version of Java. My guess is that both versions can functionally exist on your Mac, but that's a guess. It's possible that v8 removes the older version.
     

Share This Page