Sunday, 20 February 2011

Setting Up A Minecraft Server on a Mac (Mac OS X)

I've never done a 'how-to' but I noticed that there currently isn't a lot of information on creating a Minecraft server if your machine runs Mac OS X.

Here's what you need to know.

Firstly, if you are using a router you need to make sure you use port forwarding to ensure that port 25565 is open; this is the default port Minecraft uses. This is very important. If you don't take this step you are going to have a very lonely time on your server as it will just be you standing around looking at cross-eyed animals.

  • Download the minecraft_server.jar from here
  • Create a new folder and pop the aforementioned file in it
  • Open Textedit, change the format to plain text
  • Type the following:

#!/bin/bash
cd "`dirname "$0"`"
java -Xmx1G -Xms1G -jar minecraft_server.jar
  • Save as 'start.command' and put it in the same folder as the .jar
  • Open Terminal and type or paste 'chmod a+x' into it (without the inverted comas), followed by a space.
  • drag and drop the 'start.command' file onto the terminal and hit enter
  • Double click the 'start.command' file to generate a new world

This will generate several files including a properties file. By editing the details of this file you can specify mobs, pvp, etc. Don't change the world name unless you are sure you know what you are doing as this tells the server what your world is called and if its unable to find a world folder with that exact name it will make a new one.

I learned this the hard way, so you don't have to...



Minecraft man approves this message

27 comments:

  1. When I click on start.command it says I don't have appropriate access privileges and to choose file-get info to change it. I did that but it only says I can read and write, and won't let me change to execute. Running 10,6 Snow Leopard.

    ReplyDelete
  2. Hey

    If you followed the step:

    Open Terminal and paste 'chmod a+x' into it

    It should work. You might have forgot that step.
    I think you need to be on an admin account too

    ReplyDelete
  3. Hello,

    Thanks for your article, i've been looking for this… But when i double-click on the 'start.command', it simply opens the textedit file. I thought i had followed all the steps properly, any idea?

    When you say "paste 'chmod a+x'", do i need to type in the 's?

    ReplyDelete
  4. Im having the same problem as s, whenever i try to double click start.command it says i don't have the appropriate access priveleges and then tells me to go to file > Get Info to see more. The thing is, theres only one account on my computer, and if I'm not the admin, who is and how do i access that "invisible acoount"

    ReplyDelete
    Replies
    1. U need a space after the command then u drag the text edit in

      Delete
  5. for all the people that are complianing here is the answer fist you type chmod a+x(THENPUTASPACEHERE) and then drag your start.commmand on the terrminal NOT THE MINCRAFT JAR FILE THING

    ReplyDelete
  6. I've completed all the steps and i can get it running. i need to know how to find the ip.

    ReplyDelete
  7. so i have to buy the game to do this?

    ReplyDelete
  8. My mac worked, but when i double clicked on server.properties it said There is no application set to open the document “server.properties”. same with server.log. Also, when i tried to open up my server with the ip as 25565 nothing came up. It just said loading... and never came up. On the minecraft server thing it said WARNING Failed to lad ban list. It also said that for ip ban list, operators list, and white-list. What should I do?

    ReplyDelete
  9. mine says:

    182 recipes
    27 achievements
    2012-04-05 13:49:22 [INFO] Starting minecraft server version 1.2.5
    2012-04-05 13:49:22 [INFO] Loading properties
    2012-04-05 13:49:22 [INFO] Starting Minecraft server on *:25565
    2012-04-05 13:49:22 [WARNING] **** FAILED TO BIND TO PORT!
    2012-04-05 13:49:22 [WARNING] The exception was: java.net.BindException: Address already in use
    2012-04-05 13:49:22 [WARNING] Perhaps a server is already running on that port?

    ReplyDelete
    Replies
    1. Ok, so you open up activity monitor. Then you scroll down to java and you press on it and then press "quit process"

      Delete
  10. how do you find the ip address?

    ReplyDelete
  11. hey guys it just says "unable to access jarfile minecraft_server.jar"
    logout.

    and then [process completed]

    ReplyDelete
  12. i dont see the server properties

    ReplyDelete
  13. everything is working and my minecraft server came up but how do i get the server ip so i can share it?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?

    ReplyDelete
  14. mine says i dont have the right access privileges! HELP!!!!

    ReplyDelete
  15. the When I dragged the server/minecraft server.exe folder it says blah blah blah Permission denied.
    help me!!!

    ReplyDelete
  16. I realised my guide contained an error. This is fixed now and should be correct. Any questions feel free to ask.

    ReplyDelete
  17. Use Port Map if you don't know your ip adress

    ReplyDelete
  18. I dont get it. i did all the instructions. But i dont see any new files, nor do i know where to look for the world name. Whats happening?

    ReplyDelete
  19. how can i make people owner/co-owner

    ReplyDelete
  20. I dont know how to find the IP address

    ReplyDelete