Minecraft package for Synology NAS

UPDATE – The instructions and notes on this page apply to both the Minecraft and the CraftBukkit packages hosted on my repo. Now works on QorIQ CPU Synology models!

Minecraft is an intriguing game. I only recently bought it after a friend had recommended it. There’s a lot to like: the striking retro visual style, the mellow sporadic music, exploring the procedurally generated world, the logical way items are crafted, multiplayer collaboration, and emergent gameplay. Notch its creator certainly deserves the fortune he’s now sitting on. I thoroughly recommend you watch this short documentary all about it.

Minecraft Package Info

Right after I released the Java package for Synology a couple of people mentioned that they wanted to use it for installing a Minecraft server. Now that I have the game, I decided to try that too. I had assumed that the ARM CPUs would not be capable of running it, and the first tests seemed to confirm this. I decided it would be worth creating a package nonetheless since the Intel CPU NAS units would be ok, especially with their extra RAM. However, with a little performance tuning it actually runs acceptably (no lag when mining blocks) on my ARM powered DS111 which only has 256MB. The CPU load is 100% for a while at first, but soon after playing it settles down to around 60%. I have briefly tested with two players connected and after a bit of lag at first (one second delay to mine a block) it does seem to settle down.

Minecraft running showing draw distance and server load

Minecraft showing draw distance and server load running on a Synology DS111

 

Installation

  • This package is not CPU specific. If you have Java it will run. At the moment that means ARM, Intel and QorIQ PowerPC processors, but not the older PowerPCs.
  • In the User Control Panel in DSM, enable the User Homes service.
  • Install the package directly from Package Center in DSM. In Settings -> Package Sources add my package repository URL which is http://packages.pcloadletter.co.uk. You will need to install either one of my Java SE for Embedded packages first (Java 6 or 7).

Notes

  • The package fetches the minecraft server jar file from Mojang as it is installed. I am complying with their wish that no one redistributes it.
  • The server daemon script checks the amount of system RAM and scales the Java heap size appropriately. It also applies a few performance tweaks to Java to try to reduce garbage collection latency.
  • The first time you run the server it will create a new world, which can take a few minutes. You cannot interrupt this but you can check on progress by repeatedly viewing the Log tab.
  • Because the time investments in playing Minecraft can be so considerable, when you uninstall the package it will back up the world folder and settings to /volume1/public/minecraftworld.todaysdate.bak to prevent accidental deletion.
  • The package supports upgrades to future versions while preserving the world folder and server settings.
  • If you want to transplant an existing world folder into the server, copy it to /volume1/@appstore/Minecraft. You will also need to run chown -R minecraft /volume1/@appstore/Minecraft to grant ownership of the files to the daemon user.
  • The first time you run the package, the server config file /volume1/@appstore/Minecraft/server.properties is generated. The next time it is launched, my script reduces the default draw distance for ARM CPUs from 10 chunks to 7. This was appropriate for my DS111 to prevent latency when mining blocks, but you may wish to reduce this further on the J series NAS units which have less RAM and slower CPUs. Other server files (white-list.txt etc.) are found in the same folder. For CraftBukkit the files are in the folder /volume1/@appstore/Craftbukkit/server.properties (note the capitalization – the CraftBukkit project seemed to change this after I had already created the package with a lower case ‘b’).
  • The simplest way to edit these config files if you’re not really confident with Linux is to install Merty’s Config File Editor package, which requires the official Synology Perl package to be installed too (since DSM 4.2). Load Config File Editor, then in the dropdown menu edit Config File Editor’s own config (it’s the last in the list) and add the lines:
    /volume1/@appstore/Minecraft/server.properties,Minecraft-properties
    /volume1/@appstore/Minecraft/white-list.txt,Minecraft-whitelist
    /volume1/@appstore/Minecraft/ops.txt,Minecraft-ops

    Make sure to add an extra blank line underneath, save, then relaunch CFE and you’ll have entries for Minecraft in the dropdown. You’ll need to restart the Minecraft package for any changes to take effect.
  • It was a bit tricky to get the server to shut down gracefully without just killing the Java process. We need it to shutdown properly so it saves the active chunks to disk first. Most of the guides on the Net use the screen binary which isn’t included with Synology DSM, and I didn’t want to have to make a version of the package for each CPU architecture. I found that I could use tail to send the last line of the file /tmp/stdin.minecraft to the server (/tmp/stdin.craftbukkit for the CraftBukkit package). This is how the stop command is issued. You could send your own commands, for instance echo say Hello players >> /tmp/stdin.minecraft. You can verify that the command was received by looking at the server log in Package Center.
  • The server runs on the default TCP port for Minecraft (25565) so you will need to port forward this on your router if you want it to be publicly accessible.
 

Package scripts

For information, here are the package scripts so you can see what it’s going to do. You can get more information about how packages work by reading the Synology Package wiki.

installer.sh

#!/bin/sh

#--------MINECRAFT/CRAFTBUKKIT installer script
#--------package maintained at pcloadletter.co.uk

if [ "${SYNOPKG_PKGNAME}" == "Minecraft" ]; then
  DOWNLOAD_PATH="http://s3.amazonaws.com/MinecraftDownload/launcher"
  DOWNLOAD_FILE="minecraft_server.jar"
  UPGRADE_FILES="server.properties *.txt world"
fi
if [ "${SYNOPKG_PKGNAME}" == "Craftbukkit" ]; then
  DOWNLOAD_PATH="http://cbukk.it"
  DOWNLOAD_FILE="craftbukkit-beta.jar"
  UPGRADE_FILES="server.properties *.txt *.yml world world_nether world_the_end plugins bukkit_update"
fi

DOWNLOAD_URL="${DOWNLOAD_PATH}/${DOWNLOAD_FILE}"
DAEMON_USER="`echo ${SYNOPKG_PKGNAME} | awk {'print tolower($_)'}`"
DAEMON_ID="${SYNOPKG_PKGNAME} daemon user"
DAEMON_PASS="`openssl rand 12 -base64 2>/dev/null`"
MIGRATION_FOLDER="${DAEMON_USER}_data_mig"
ENGINE_SCRIPT="/var/packages/${SYNOPKG_PKGNAME}/scripts/launcher.sh"
INSTALL_FILES="${DOWNLOAD_URL}"
source /etc/profile
TEMP_FOLDER="`find / -maxdepth 2 -name '@tmp' | head -n 1`"
PRIMARY_VOLUME="/`echo $TEMP_FOLDER | cut -f2 -d'/'`"
WORLD_BACKUP="${PRIMARY_VOLUME}/public/${DAEMON_USER}world.`date +\"%d-%b\"`.bak"

preinst ()
{
  if [ -z ${JAVA_HOME} ]; then
    echo "Java is not installed or not properly configured. JAVA_HOME is not defined. "
    echo "Download and install the Java Synology package from http://wp.me/pVshC-z5"
    exit 1
  fi
  
  if [ ! -f ${JAVA_HOME}/bin/java ]; then
    echo "Java is not installed or not properly configured. The Java binary could not be located. "
    echo "Download and install the Java Synology package from http://wp.me/pVshC-z5"
    exit 1
  fi
  
  #is the User Home service enabled?
  UH_SERVICE=maybe
  synouser --add userhometest Testing123 "User Home test user" 0 "" ""
  UHT_HOMEDIR=`cat /etc/passwd | sed -r '/User Home test user/!d;s/^.*:User Home test user:(.*):.*$/\1/'`
  if echo $UHT_HOMEDIR | grep '/var/services/homes/' > /dev/null; then
    if [ ! -d $UHT_HOMEDIR ]; then
      UH_SERVICE=false
    fi
  fi
  synouser --del userhometest
  #remove home directory (needed since DSM 4.1)
  [ -e /var/services/homes/userhometest ] && rm -r /var/services/homes/userhometest
  if [ ${UH_SERVICE} == "false" ]; then
    echo "The User Home service is not enabled. Please enable this feature in the User control panel in DSM."
    exit 1
  fi

  cd ${TEMP_FOLDER}
  for WGET_URL in ${INSTALL_FILES}
  do
    WGET_FILENAME="`echo ${WGET_URL} | sed -r "s%^.*/(.*)%\1%"`"
    [ -f ${TEMP_FOLDER}/${WGET_FILENAME} ] && rm ${TEMP_FOLDER}/${WGET_FILENAME}
    wget ${WGET_URL}
    if [[ $? != 0 ]]; then
      if [ -d ${PUBLIC_FOLDER} ] && [ -f ${PUBLIC_FOLDER}/${WGET_FILENAME} ]; then
        cp ${PUBLIC_FOLDER}/${WGET_FILENAME} ${TEMP_FOLDER}
      else     
        echo "There was a problem downloading ${WGET_FILENAME} from the official download link, "
        echo "which was \"${WGET_URL}\" "
        echo "Alternatively, you may download this file manually and place it in the 'public' shared folder. "
        exit 1
      fi
    fi
  done
  
  exit 0
}


postinst ()
{
  #create daemon user
  synouser --add ${DAEMON_USER} ${DAEMON_PASS} "${DAEMON_ID}" 0 "" ""
  
  mv ${TEMP_FOLDER}/${DAEMON_USER}*.jar ${SYNOPKG_PKGDEST}/${DAEMON_USER}.jar
  
  #determine the daemon user homedir and save that variable in the user's profile
  #this is needed because new users seem to inherit a HOME value of /root which they have no permissions for
  DAEMON_HOME="`cat /etc/passwd | grep "${DAEMON_ID}" | cut -f6 -d':'`"
  su - ${DAEMON_USER} -s /bin/sh -c "echo export HOME=\'${DAEMON_HOME}\' >> .profile"
  
  #change owner of folder tree
  chown -R ${DAEMON_USER} ${SYNOPKG_PKGDEST}
  
  exit 0
}


preuninst ()
{
  #make sure server is stopped
  su - ${DAEMON_USER} -s /bin/sh -c "${ENGINE_SCRIPT} stop ${SYNOPKG_PKGNAME} ${SYNOPKG_PKGDEST}"
  sleep 10
  
  #if a world exists, back it up to the public folder, just in case...
  if [ -d ${SYNOPKG_PKGDEST}/world ]; then
    if [ ! -d ${WORLD_BACKUP} ]; then
      mkdir -p ${WORLD_BACKUP}
    fi
    for ITEM in ${UPGRADE_FILES}; do
      mv ${SYNOPKG_PKGDEST}/${ITEM} ${WORLD_BACKUP}
    done
  fi
  
  exit 0
}


postuninst ()
{
  #remove daemon user
  synouser --del ${DAEMON_USER}
  
  #remove daemon user's home directory (needed since DSM 4.1)
  [ -e /var/services/homes/${DAEMON_USER} ] && rm -r /var/services/homes/${DAEMON_USER}
  
  exit 0
}


preupgrade ()
{
  #make sure the server is stopped
  su - ${DAEMON_USER} -s /bin/sh -c "${ENGINE_SCRIPT} stop ${SYNOPKG_PKGNAME} ${SYNOPKG_PKGDEST}"
  sleep 10
  
  #if a world exists, back it up
  if [ -d ${SYNOPKG_PKGDEST}/world ]; then
    mkdir ${SYNOPKG_PKGDEST}/../${MIGRATION_FOLDER}
    for ITEM in ${UPGRADE_FILES}; do
      if [ -e ${SYNOPKG_PKGDEST}/${ITEM} ]; then
        mv ${SYNOPKG_PKGDEST}/${ITEM} ${SYNOPKG_PKGDEST}/../${MIGRATION_FOLDER}
      fi
    done
  fi
  
  exit 0
}


postupgrade ()
{
  #use the migrated data files from the previous version
  if [ -d ${SYNOPKG_PKGDEST}/../${MIGRATION_FOLDER}/world ]; then
    for ITEM in ${UPGRADE_FILES}; do
      if [ -e ${SYNOPKG_PKGDEST}/../${MIGRATION_FOLDER}/${ITEM} ]; then
        mv ${SYNOPKG_PKGDEST}/../${MIGRATION_FOLDER}/${ITEM} ${SYNOPKG_PKGDEST}
      fi
    done
    rmdir ${SYNOPKG_PKGDEST}/../${MIGRATION_FOLDER}
    
    #daemon user has been deleted and recreated so we need to reset ownership (new UID)
    chown -R ${DAEMON_USER} ${SYNOPKG_PKGDEST}
  fi
  	
  exit 0
}
 

start-stop-status.sh

#!/bin/sh

#--------MINECRAFT/CRAFTBUKKIT start-stop-status script
#--------package maintained at pcloadletter.co.uk

DAEMON_USER="`echo ${SYNOPKG_PKGNAME} | awk {'print tolower($_)'}`"
DAEMON_ID="${SYNOPKG_PKGNAME} daemon user"
ENGINE_SCRIPT="/var/packages/${SYNOPKG_PKGNAME}/scripts/launcher.sh"
DAEMON_USER_SHORT=`echo ${DAEMON_USER} | cut -c 1-8`

daemon_status ()
{
    ps | grep "^ *[0-9]* ${DAEMON_USER_SHORT} .*java" > /dev/null
}

case $1 in
  start)
    DAEMON_HOME="`cat /etc/passwd | grep "${DAEMON_ID}" | cut -f6 -d':'`"
    
    #set the current timezone for Java so that log timestamps are accurate
    #we need to use the modern timezone names so that Java can figure out DST
    SYNO_TZ=`cat /etc/synoinfo.conf | grep timezone | cut -f2 -d'"'`
    SYNO_TZ=`grep "^${SYNO_TZ}" /usr/share/zoneinfo/Timezone/tzname | sed -e "s/^.*= //"`
    grep "^export TZ" ${DAEMON_HOME}/.profile > /dev/null \
     && sed -i "s%^export TZ=.*$%export TZ='${SYNO_TZ}'%" ${DAEMON_HOME}/.profile \
     || echo export TZ=\'${SYNO_TZ}\' >> ${DAEMON_HOME}/.profile
    
    su - ${DAEMON_USER} -s /bin/sh -c "${ENGINE_SCRIPT} start ${DAEMON_USER} ${SYNOPKG_PKGDEST} &"
    exit 0
  ;;
  
  stop)
    su - ${DAEMON_USER} -s /bin/sh -c "${ENGINE_SCRIPT} stop ${DAEMON_USER} ${SYNOPKG_PKGDEST}"
    exit 0
  ;;
  
  status)
    if daemon_status ; then
      exit 0
    else
      exit 1
    fi
  ;;
  
  log)
    echo "${SYNOPKG_PKGDEST}/server.log"
    exit 0
  ;;
esac
 

launcher.sh

#!/bin/sh

#--------MINECRAFT/CRAFTBUKKIT server launcher script
#--------package maintained at pcloadletter.co.uk
 
#--------Allows graceful shutdown of server without CPU-specific binaries
#--------You can send commands to the running server like so:
#--------    echo say Hello players >> /tmp/stdin.minecraft
#--------    echo say Hello players >> /tmp/stdin.craftbukkit

DAEMON_USER=$2
SYNOPKG_PKGDEST=$3
DAEMON_USER_SHORT=`echo ${DAEMON_USER} | cut -c 1-8`
JAR_FILE=${SYNOPKG_PKGDEST}/$2.jar

case $1 in
  start)
    if [ -f /tmp/stdin.${DAEMON_USER} ]; then
      rm /tmp/stdin.${DAEMON_USER}
    fi
    touch /tmp/stdin.${DAEMON_USER}
    cd ${SYNOPKG_PKGDEST}
    if [ ! -f syno-marker.txt ]; then
      if [ -f server.properties ]; then
        sed -i "s/A Minecraft Server/A Synology Minecraft Server/" server.properties
  
        #ARM CPU lags a lot, so reduce drawing distance from 10 chunks to 6
        cat /proc/cpuinfo | grep "CPU architecture: 5TE" > /dev/null \
         && sed -i "s/^view-distance=10/view-distance=6/" server.properties
  
        #record that these mods have been made
        echo config updated > syno-marker.txt
      fi
    fi
    JAVA_OPTS='-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts'
    RAM=$((`free | grep Mem: | sed -e "s/^ *Mem: *\([0-9]*\).*$/\1/"`/1024))
    if [ $RAM -le 128 ]; then
      JAVA_MAX_HEAP=80M
    elif [ $RAM -le 256 ]; then
      JAVA_MAX_HEAP=192M			
    elif [ $RAM -le 512 ]; then
      JAVA_MAX_HEAP=448M
    elif [ $RAM -le 1024 ]; then
      JAVA_MAX_HEAP=896M
    elif [ $RAM -le 2048 ]; then
      JAVA_MAX_HEAP=1792M
    elif [ $RAM -gt 2048 ]; then
      JAVA_MAX_HEAP=2048M
    fi
    JAVA_START_HEAP=${JAVA_MAX_HEAP}
    tail -n 0 -f /tmp/stdin.${DAEMON_USER} | java -Xmx${JAVA_START_HEAP} -Xms${JAVA_MAX_HEAP} ${JAVA_OPTS} -jar ${JAR_FILE} nogui
  ;;

  stop)
    echo say shutting down.. >> /tmp/stdin.${DAEMON_USER}
    sleep 5
    echo stop >> /tmp/stdin.${DAEMON_USER}
    sleep 10
    kill -9 `ps | grep "^ *[0-9]* ${DAEMON_USER_SHORT}.*tail -n 0 -f /tmp/stdin.${DAEMON_USER}" | sed -e "s/^ *\([0-9]*\).*$/\1/"`
    if [ -f /tmp/stdin.${DAEMON_USER} ]; then
      rm /tmp/stdin.${DAEMON_USER}
    fi
  ;;
esac
 

Changelog:

  • 0015 updated to Minecraft 1.5.2, CraftBukkit beta 1.5.2-R0.1
  • 0014 updated to Minecraft 1.4.7, CraftBukkit beta 1.4.7-R0.1, and fixes for DSM 4.2
  • 013 updated to Minecraft 1.4.6, and CraftBukkit beta 1.4.6-R0.3
  • 012 updated to Minecraft 1.4.5, and CraftBukkit 1.3.2-R1.0
  • 011 updated to Minecraft 1.4.2
  • 010 updated to Minecraft 1.3.2, and CraftBukkit 1.3.1-R2.0
  • 009 package scripts fully re-written to unify the Minecraft and CraftBukkit packages
  • 008 updated to Minecraft 1.3.1, unified most scripts into a single installer script, and incorporated minor enhancements from my other packages
  • 007 updated to Minecraft 1.2.3
  • 006 reduced Java max heap to 80MB on 128MB systems, fixed timezone support each server start
  • 005 fixed Java max heap size behaviour on systems with more than 2GB RAM
  • 004 fixed wget SSL problem preventing jar download on some systems
  • 003 updated to Minecraft 1.1
  • 002 server config files are also migrated during version upgrades, and backed up during uninstall. My script’s edits to server.properties are made only once, rather than every startup
  • 001 intial public release
 
 
About these ads

564 thoughts on “Minecraft package for Synology NAS

  1. Alex

    Minecraft 1.7.6 is out. The Synology Bukkit Package with 1.5.2.0015 doesn’t work with this release :-( Is a Synology Package Update possible?

    Reply
  2. vic256

    Works great! Thanks for the package – it doesnt download the latest server package .jar though you have to do that yourselv but no biggie :)

    Reply
  3. Tidus

    Hi i’m quite new to this whole running minecraft on synology server.

    i’ve tried quite a lot of things desribed here but don’t seem to manage to update my minecraft server. first of all i can’t get into the folder where it’s installed for some reason it doesn’t show up in any way i tried.

    tried thru ssh / telnet / and thru ftp none made it possible for me to enter the appstore or whatsoever folder.

    can some1 please give m a hand with this ( what i’m trying to do is update the server.jar file from 1.5.2 to whatever is the newest.

    thanks in advance guys.

    Reply
    1. vic256

      First install the package above and java but stop the package using the Synology package center -it’s running the old 1.5xx version.

      Second, download the latest minecraft server jar from the official site and put it somewhere on the Synology box you can get to,like a new share using the ordinary filemanager via the webinterface and enable telnet access to the NAS via the control panel.

      Third, -using telnet via using putty or the GateOne client, log on to the Synology box as root (Username root), the password is the same as the admin user when you log on via webinterface. It’s important to use the user root, the admin user doesnt have the necessary rights to do the next step.

      Fourth, cd to \volume1\@appstore\Minecraft and rename the minecraft.jar file to minecraft_old.jar … Copy the newly downloaded jar (and rename it to minecraft.jar) to \volume1\@appstore\Minecraft\
      Remember filepath/names are case sensitive in linux…

      Fifth, run the Minecraft package from the package centre and you should be all done… Remember to enter the relevant NAT entries in your router for access from the internet.

      If you did all the steps above it should work :)
      Hope it helps,

      Rgds,
      Troels

      Reply
      1. vic256

        Forgot to mention: Be VERY carefull what you do as root, you have full access to all system files and can seriously mess up you NAS :)

      2. vic256

        Oh, and the ‘\’ in the paths demonstrated is of course ‘/’ … I’m just very used to the Microsoft way of dealing with paths, linux/Unix does it the other way around (Or MS does it the other way around depending on what youre used to ;) )

      3. Tidus

        I love ya lad u litterally made me do this shizz within a few minutes while i was screwing around trying to do it on my own for a few weeks everytime going nutts closing it and not looking at it for days on :p.

        seriously thanks.

      4. vic256

        Oh – and you have to do this routine everytime theres a new client version released if not compatible with the older server version … Backward compability doesnt seem to be one of Minecrafts strong points lately .. Dont really play myself but the kids yell at me everytime the client has been updated and they cant connect to the server, I may one day make a script doing it automatically but life doesnt leave much time for play atm :)

      5. Lunnatic

        I try to connect via telnet, but i alwasy get the error, that i can’t cd to volume1@appstoreMinecraft

      6. Marcel

        I’ve downloaded server jar file 1.7.10 but when I follow the steps above the package disables itself after a few minutes.

      7. marselaar

        I followed the steps above to get server jar file 1.7.10 running, but after a minute the package stops itself. Something must be wrong, but I don’t see any errors. Any suggestions?

      8. marselaar

        Ok, managed to get it to work. Had to agree to the eula (modify eula.txt) and all the copied files should have the exact same permissions, then it works

  4. Thorwin Vo

    How can I join the server? In Minecraft is the server visible and i can see it. The connection is 1ms. But when i want to join it only comes logging in. How can i fix it?

    And i cant shutdown the server correctly. How can i do it?

    Thanks

    Reply
  5. Alex

    Synology have update the DSM 4.3 with Update 2 3827 (Heartbleed Fix)
    Since this Update I can’t join to my Craftbukkit Server. I got follow Message “Time out”
    If I install the craftbukkit packe again and set my client back to version 1.7.5 I get the same error.
    Anyone with the same problem?

    Reply
    1. sjorske

      I’ve read that Java needs reinstalling after a DSM update. MineCraft server as well as CraftBukkit both didn’t work after DSM update and de-installing and reinstalling Java (7u55) did the trick for me. Didn’t check if it was a timeout as well.

      Reply
  6. AtomicBoy44

    Hi patters,
    i think i detect a problem in the stop command of the package :
    I’ve done some tests with a friend on my minecraft server (on my DS710+) and the world seems to not be saved properly when the players exit the game or when the package is stopped with synology package center.

    When i start the game with this command :
    /volume1/\@appstore/java8/ejdk1.8.0/linux_i586/jre/bin/java -Xmx512m -jar /volume1/\@appstore/Minecraft/minecraft.jar net.minecraft.server.MinecraftServer nogui
    what is idicated here :

    http://www.nas-forum.com/forum/index.php/page/tutoriel/_/logiciels-tiers/installation-dun-serveur-minecraft-sur-un-nas-synology-r3

    in the part “Installation du serveur (Official)” whithout screen.
    if i type the command “save-all” in the putty prompt, i have been able to verify that my friend recover all his level and hand tools.

    I looked into your startup scripts and stop and it seemed to me to read a kill -9 command to close the game

    would it be possible to pass the save-all command before execute this command kill-9, which kills processes ?

    I do not feel I can modify your script, although I understand a little part but I find it hard to follow the use of your variables

    Thanks for this package
    PS : i used google translate for this post so excuse my approximate english

    Reply
    1. Thorwin

      Ehen you are op you can type /save-all ingame into the chat. Then it will save all. Another way is that you install a bukkit remote app. Then enable rcon in the properties an add rcon.port=25575 and rcon.password=yourpassword. Then only open the port 25575 and you can control bukkit with mobile.

      Reply
  7. TheCage

    Thanks for this package!
    I got it running on DS214Play with DSM5.
    But I can’t manage to get Craftbukkit plugins working.
    I’ve managed to put the plugins (jar-files) in the plugins directory on the Ds214play, but somehow they won’t load when starting Craftbukkit under Package Center.
    In Minecraft the command /plugins shows that there are (0) plugins active.
    Can anyone tell me how to get these bukkit plugins working?

    Reply
    1. mrlowalowa

      I think that you need to change the owner by log into via ssh and : chmod -R minecraft FILE.jar :)

      hit a dir in the pluginfolder and I’m pretty sure that there won’t be standing minecraft as owner but instead you will see their root as owner ;) so minecraft can’t access it.

      It also could be a other user like bukkit or so. I haven’t installed bukkit yet. Just check who is the owner of the bukkit.jar with the dir command in ssh and make it the same to the plugins with “chown -R USER FILE” :)

      Reply
  8. retokoch

    Hi there
    I’m new here and I’m really impressed about the know-how here. Try to Setup minecraft for my Kids on a DS1511+ with DSM5.0 but without success. Tried several Java types – no success. Tried to update Minecraft like described – no success.
    I think, I did not get the rhight Minecraft Server file. I’m allways ending on the official Minecraft download site where on the end is a Minecraft_server_1.X.X.jar file is higlighted as a download link wich fits most probably the OS on my DS, (https://minecraft.net/download).
    Can somebody confirm that I’m on the right spot or publish a more specific link for the Server file?
    BTW: My Kids like to play minecraft on iOS devices. It is possible to connect with those devices on a Synology minecraft Server because those usually using Minecraft Pocket Edition distributions?
    Thanks for any hints in advance and many greetings from Switzerland.
    Reto.

    Reply
    1. mrlowalowa

      Hi :)
      you need to install on of the embedded java packages from the Source. For this you need to check up your Core (ARM, POWERXYZ or Intel) If it’s intel you need to download the x64 Version (leatest link in the Table) and for downloading you need to create an account @ Oracel.

      It’s all in the description up their! :)

      You’re downloading the right file. Just copy that into /volume1/@appstore/Minecraft/ and rename it to minecraft.jar . If you need an Admin on this server for example to enable the Whitelist if you want to make the server public, you need to edit the ops.json file with the vi editor.

      Commands you need for the vi editor:

      vi ops.json (open file)
      use arrows to navigate
      press a to jump into the file
      put in your stuff (search for ops.json example file on google // you get uuid from the leanest.log in the logs subfolder when sb joined)
      after you finished: press esc (to exit editing)
      press: “:wq!” hit enter –> saved your changes

      When you just want to look up a file (leatest.log) or don’t want to save the file:
      esc + “:q!” (exit editor without saving)

      Hope I helped you a little bit! :)
      Greetings from Germany

      Reply
    2. mrlowalowa

      P.S. For the PE Server:

      I found this site: http://www.pocketmine.net/?lang=de
      Not sure if it is working with the actual Version. For playing Multiplayer you need another Application on your phone Multiplayer for Minecraft PE

      I would advise you to try this server out on your Windows/Mac machine. If this is working you could think about buying a Raspberry Pi (costs ~40$) It’s a small Linux Machine and this would be simpler than porting it to Synology.

      just check this site here! :) : http://www.pocketmine.net/?lang=de

      Greetings from Germany and hope your kids enjoying it :))

      Reply
      1. retokoch

        Short update.
        After working fine on Windows, tried it on a Raspberry. It works right from the start and the package Installation is really easy. But…..
        Performance is not sufficient even if the PI is ovrclocked to Maximum. World is not build-up propperly (has some spots without blocks and suddenly you’re in the water). After a while, PI hangs because of overload. Win-Server on an old Laptop is the solution now. Still fighting with access from outside over dyndns but no success even though ports are open. Try to solve this in the next days.

        Again, thanks a lot for all Support!
        Reto.

  9. mrlowalowa

    wow… Impressive what I learned only with this little package.. <3

    but it would be cool if you could change the server log to the actual log file the 1.7.9 server is using (logs/latest.log). If you could change this it would be really cool, or could I change it by my own? If this is done the /stop command from inside minecraft could stop the process again :)

    Reply
    1. mrlowalowa

      fixed it myself! :)

      If you want to see the latest log from the Package Center and having the Server 1.7.9 running you need to first kill the task and then navigate via ssh to: /var/packages/Minecraft/scripts
      editing the start-stop-status.sh with vi-Editior (vi FILENAME)
      and changing the 3rd-last line
      changing */server.log to */logs/latest.log
      pressing esc + “:wq!” + Enter
      Start the Service again and the protocol is showing the right log! :)

      Reply
      1. retokoch

        @mrlowalowa
        Thanks for your hint, it saved my day (or weekend)! Pocketmine server works from the beginning. Have to learn the commands, but that’s ok.
        Multiplayer for Minecraft PE is also working (found this solution on youtube) but only if you’re playing with different gamecenter accounts. Logging in with the same AppleID isn’t working.

        Regarding the Synology installation: I did all step by step as posted in the thread above. Downloaded all the Java files from Oracle (with registration) in the public folder and tried to copy and rename the 1.7.9 Server jar file from Mojang using telnet in the @appstore/minecraft folder, but I was not able to connect from any pc. At last, I tried to find 1.5.2 minecraft for windows in the web to be on the same version as on the server but again, no success.
        I’ll try a little bit more in the next days on this.

        Again, thanks to all for all the help!
        Reto

    2. valnik (@valnik)

      As for me, the simplest way to see the log could be the following:
      login to the DS via ssh and execute

      rm /volume1/@appstore/Minecraft/server.log
      ln -s /volume1/@appstore/Minecraft/logs/latest.log /volume1/@appstore/Minecraft/server.log

      Reply
  10. Wanda

    Hi folks,

    I had Minecraft running just fine under DSM 4.3, but since I upgraded to 5, things are no longer working. My main struggle is installing Java.

    Under 4.3, I had downloaded “jdk-6u45-linux-i586.bin” from Oracle to run the latest version of Java 6 (which was the recommended one).

    But under DSM 5, unless I am mistaken or missed something, the Java install doesn’t work the same way:

    If I go the “Java Manager”, it requires the file name in the format “jdk-7u51-linux-i586.tar.gz”
    From Oracle I can only download “jdk-6u45-linux-i586.bin”
    So I downloaded the .bin version but the .tar.gz is required.
    I couldn’t find the tar.gz on Oracle’s site, so am I supposed to convert the file myself?
    If so, is there a recommended way/tool (ideally Mac)

    Otherwise, my community package sources offer me the following versions:

    Java SE Embedded 6 (1.6.0_38-0023)
    Java SE Embedded 7 (1.7.0_55-0024)
    Java SE Embedded 8 (1.8.0_0132-0023)

    While it seems possible to install v6, it’s not the latest version (only v38 as opposed to v45).
    How would I then be able to upgrade it to the latest v6 version?

    Finally, is Java 6 still the recommended version tu run Minecraft on the Synology?

    I appreciate any help you can provide…
    Thanks
    Wanda

    Reply
      1. Wanda

        Hi Meeces
        First of all thanks for your reply.
        I think I read in the instructions further up that it was recommended to run Java 6 for Minecraft as this was the most stable. And Java 7 & 8 were not compatible with DSM 4.3 (at the time).
        So I checked again:
        And indeed, Oracle does no longer offer v6 as a tar.gz file (only .bin). Hence my confusion.

        http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jre-6u45-oth-JPR

        Now for for Java 7 they DO offer it as a tar.gz, so I will use that.
        It’s just that I thought we were not supposed to use v7, but presumably this has changed with DSM 5.
        Many thanks for your help :)

      2. Wanda

        Installed Java 7 and it’s all good. Everything working fine. :)
        Thanks again for the pointer

  11. Jim

    Hello All,

    I am trying to get Minecraft up and running on my DS 1812 running DSM 4.3. I got java and the Minecraft package and those all seem to be happy but when I telenet into my NAS using putty and go to CD to the Minecraft folder to update the JAR file I get error CANT’T CD TO xxxxx. I can get into the volume folder but anything after that just tells me I can do it. I have checked and made sure I am using the correct case and everything. Any ideas?

    Reply
    1. vic256

      You’re probably logging on as admin or other user setup in DMS.. You need to log on as root, same password as admin – Even the admin user haven’t got the necessary rights. Secondly, remember that all paths and filenames are case sensitive contrary to MS Console/dos.

      Reply
      1. Jim

        I was logged in as root and paying attention to case. I did figure it out though turns out in my case there was a space before @appstore. So once I put that in it was all good.

  12. Ron

    Does anyone have an issue when trying to ride a horse. There is major lag. Everything else seams to run great.

    Reply
  13. MMD

    Synology DS414.
    Installed Java 8.
    Installed Minecraft.
    Updated to 1.7.9 jar file.
    Trying to connect via LAN with Minecraft 1.7.9 client on Windows 7 but getting connection refused.

    Edit server.properties file:
    online-mode=true set to false, no luck
    Add override=true, no luck
    Combinations of these 2, no luck

    Any suggestions?

    Reply
    1. patters Post author

      Not much software is really qualified with Java 8, so I’d stick to version 7. The newer versions offer new APIs but not necessarily better performance – in fact it’s usually worse until they are fully mature.

      Reply
      1. MMD

        Sorry for the double post.

        Cannot find 7u55 anymore on the Oracle site.
        Tried to install 7u60 by renaming the file, no luck.
        It says it`s running but cannot start Minecraft.
        Do you know where to download 7u55 as i cannot find it.
        Thanks in advance.

  14. litris

    Do you need to install two packages, Minecraft and CraftBukkit?

    I want to play no premium.

    Thank you.

    Reply
    1. patters Post author

      Only one is required. You cannot play Minecraft without buying it though. The only way to do that I think it to use some really old alpha version.

      Reply
  15. litris

    I’ve updated it by ssh.

    For sftp I cannot enter as root on DSM 5.

    Do you know any solution to login as root to access all folders?

    As admin if I can but I only see shared folders.

    Best regards.

    Reply
  16. Phil

    Client: Minecraft 1.7.9 on Windows 8.1
    Server: DS412+; INTEL; DSM 5.0-4493 Update 1

    /volume1/@appstore/Minecraft
    drwxr-xr-x 3 minecraf root 4096 Jun 12 22:17 .
    drwxrwxrwx 16 root root 4096 Jun 12 17:39 ..
    -rw-r–r– 1 minecraf root 2360903 May 2 2013 Minecraft.jar
    -rw-r–r– 1 minecraf users 107 Jun 12 21:49 banned-ips.txt
    -rw-r–r– 1 minecraf users 107 Jun 12 21:49 banned-players.txt
    -rw-r–r– 1 minecraf root 39 Oct 10 2012 marker.txt
    -rw-r–r– 1 minecraf users 0 Jun 12 21:49 ops.txt
    -rw-r–r– 1 minecraf users 2136 Jun 12 22:12 server.log
    -rw-r–r– 1 minecraf users 534 Jun 12 21:49 server.properties
    -rw-r–r– 1 minecraf users 15 Jun 12 17:40 syno-marker.txt
    -rw-r–r– 1 minecraf users 0 Jun 12 17:39 white-list.txt
    drwxr-xr-x 7 minecraf users 4096 Jun 12 22:12 world

    Server log (after reboot):
    2014-06-12 21:49:48 [INFO] Starting minecraft server version 1.5.2
    2014-06-12 21:49:48 [INFO] Loading properties
    2014-06-12 21:49:48 [INFO] Default game type: SURVIVAL
    2014-06-12 21:49:48 [INFO] Generating keypair
    2014-06-12 21:49:49 [INFO] Starting Minecraft server on *:25565
    2014-06-12 21:49:50 [INFO] Preparing level “world”
    2014-06-12 21:49:50 [INFO] Preparing start region for level 0
    2014-06-12 21:49:51 [INFO] Preparing spawn area: 29%
    2014-06-12 21:49:52 [INFO] Preparing spawn area: 90%
    2014-06-12 21:49:52 [INFO] Done (2.695s)! For help, type “help” or “?”
    2014-06-12 22:00:03 [INFO] /192.168.1.172:56144 lost connection
    2014-06-12 22:00:03 [INFO] /192.168.1.172:56145 lost connection
    2014-06-12 22:00:06 [INFO] /192.168.1.172:56146 lost connection
    2014-06-12 22:07:18 [INFO] /192.168.1.172:56163 lost connection
    2014-06-12 22:07:21 [INFO] /192.168.1.172:56164 lost connection
    2014-06-12 22:07:21 [INFO] /192.168.1.172:56166 lost connection

    On the client:
    Failed to connect to the server
    Internal Exception: javaio.io.IOException:An existing connection was forcibly closed by the remote host.

    [So I shut down from package manager.]
    2014-06-12 22:12:41 [INFO] [Server] shutting down..
    2014-06-12 22:12:46 [INFO] Stopping the server
    2014-06-12 22:12:46 [INFO] Stopping server
    2014-06-12 22:12:46 [INFO] Saving players
    2014-06-12 22:12:46 [INFO] Closing listening thread
    2014-06-12 22:12:47 [INFO] Saving worlds
    2014-06-12 22:12:47 [INFO] Saving chunks for level ‘world’/Overworld
    2014-06-12 22:12:47 [INFO] Saving chunks for level ‘world’/Nether
    2014-06-12 22:12:47 [INFO] Saving chunks for level ‘world’/The End

    So my initial guess is Server is version 1.5.2 and client is 1.7.9?

    Is there anything I can do to fix this?

    Reply
      1. Phil

        I reread it, seemed to have done the same steps as I had a number of times before but this time it worked. Thanks!

  17. Freddy Lang

    I’ve installed the package on my DS212j (with DSM 5.0-4493 update 1), and it seems to work fine (although finding Java at Oracle proved to be quite troublesome; the links in the article doesn’t work). However, I can’t see the Minecraft server from within the game. Not even when I do a search on the Syno’s IP address.
    Any pointers on what the problem might be? Any help will be greatly appreciated.

    Reply
  18. litris

    As I can not enter by SFTP as root on the nas.

    Can you that the installation is carried out in the folder /volume1/minecraft /?

    This way is more easy put new worlds and work from the browser.

    Thank you.

    Reply
  19. litris

    When I update the version of minecraft at the 1.7.10 start the server but if pulse to the registry to view the server stops.

    I also modified the star-stop to view the log and happens the same thing while I pressed not to see recorded works but when struck stops.

    Can happen in DS112 + arm processor and DS713 + Intel processor.

    Please some help.

    Reply
    1. marselaar

      I had the same, in the log there was something about the eula.txt . You can change that from false to true. Furthermore all the file permissions need to be the original ones.

      Reply
  20. Tim

    I’m having issues getting the server to run.

    I’m running the following java 7; ejre-7u60-fcs-b19-linux-i586-headless-07_may_2014.gz

    When I execute ‘java -Xmx512M -Xms512M -jar minecraft.jar nogui’ the following occurs;
    I’ve tried with java 8 and chaing -Xmx and -Xms values to 1024 to no avail.

    Here’s the log output;

    http://pastebin.com/HVpe2PtX

    Anyone have some suggestions?

    Reply
    1. Tim

      I’ve played around a bit more. Uninstalled all versions of java, and am now running Java 6 on my DS412+.

      DSM Version: 5.0-4493 Update 3 (Latest)

      Java file in /public: ejre-1_6_0_38-fcs-b05-linux-i586-headless-13_nov_2012.gz

      java -version
      java version “1.6.0_38″
      Java SE Embedded Runtime Environment (build 1.6.0_38-b05, headless)
      Java HotSpot(TM) Embedded Client VM (build 20.13-b02, mixed mode)

      I’ve removed the Minecraft folder by rm -r Minecraft
      Then created the folder again, and downloaded the latest server from the Minecraft website.

      Output below:

      http://pastebin.com/47eKSpGf

      Reply
  21. Sparwurst

    quick advice for people manually updating to the newly released 1.8 server version. This is a step by step instruction. If you follow it it will run perfectly! If you dont know how to open a telnet session check google.

    – stop the minecraft server first (in package center in synology diskstation)
    – open a telnet session to your diskstation, log in as root, navigate to /volume1/@appstore/Minecraft by typing:
    cd /volume1/@appstore/Minecraft/
    – rename the old minecraft.jar to minecraft.old with the mv command:
    mv minecraft.jar minecraft.old
    – get the updated minecraft server jar by typing:
    wget https://s3.amazonaws.com/Minecraft.Download/versions/1.8/minecraft_server.1.8.jar
    – rename the new server.jar to the name expected:
    mv minecraft_server.1.8.jar minecraft.jar
    – change permissions:
    chmod -R minecraft minecraft.jar

    IMPORTANT: there is a new step that was not required prior to 1.8. You need to accept the EULA terms. in order to do so open the eula.txt in vi:
    vi eula.txt
    – hit a
    move the cursor a couple of lines down, delete the word FALSE and type TRUE instead
    – press ESC
    – type the following
    :wq
    hit enter
    close the terminal session

    restart minecraft in package center and enjoy

    Reply
  22. Milzit

    I have just updated this package to version 1.8 and it is running great. But seems like Java only have 1 GB RAM allocated, and I get the “canĀ“t keep up” message in the server log. Is there any way I can allocate more than 1 GB RAM to the Minecraft Package?

    Reply
    1. Sparwurst

      Hey Milzit, how much free RAM do you have? If you check patters launch script, you will see that it automatically allocates up to 2GB RAM depending on the amount available. If you only have 2GB in total, there might simply be too much in use. Try stopping the minecraft package, stopping unnecessary packages and restarting it again.

      Reply
      1. Milzit

        Thanks for you reply Sparwurst
        The server is idle now, according to the Resource monitor the memory has only 18% utilization. But when I got this “can`t keep up” message I selected “Process” from the resource monitor and the “java” process stopped at 1GB Memory.
        I have 4GB RAM in total on my 1513+.
        Also we are running both a bukkit server and a vanilla minecraft server, but I have stopped the bukkit package now.
        Where can I check the patterns launch script?

  23. Waschb01

    Hi,
    Does anybody run it on a DS112+. I have the standard configuration (512 KB) and run the newest version (1.8 from the minecraft side) but I allways have 99% CPU and it crashes with JAVA error after some minutes.
    Anybody an idea what kind of parameter to change.
    Many thanks in advance

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s