Saturday, May 9, 2015

Setting Up a Minecraft Server on My Synology Rackstation 814+ NAS

Update: I will be maintaining the following page with the most up to date information:

http://blog.heatdfw.com/p/synology-minecraft-server-setup.html

Minecraft


At some point I need to do a writeup on the Rackstation 814+ itself and what all it can do (which is a lot), but today I'm doing a quick post on setting up a basic Minecraft server.  The Synology "DSM" software (basically a customized Linux) allows installation of various packages.  It turns out, someone had created a Minecraft server package, but the package was out of date:

http://pcloadletter.co.uk/2012/01/11/minecraft-package-for-synology/

There were pages and pages of comments and I was able to install the package and get it up and running, updated to the latest version, but that seemed like a lousy solution, so... I started with the package provided and created my own, and put it on Github, where other people can contribute to it.

First, if you're just looking to install the package, you can install it from my repository server.


  1. You'll have to install Synology's "Java Manager" first, which is under "Utilities" in Package Center in DSM 5.x.
  2. In the DSM Control Panel, go to User, Advanced, and check "Enable User Home Service."[Added this information 7/1/2015]
  3. After that, go settings and "Package Sources" and set up a new source from this URL: http://www.hildinger.us/sspks/index.php
  4. After that, under "General" you'll have to set your server up to accept "any publisher," and you should see the Minecraft server under "Community.

It should install and start without problems.  Now you have a functioning single world server running on your Synology box and you can start figuring out how to admin it.  There's also a craftbukkit install, but it seems to be a dead end for Minecraft server administration.

Now, if you have issues, the Github project is at:

https://github.com/colin1497/Synology-Install-Package-for-Minecraft-and-Craftbukkit

The repository I'm using can be found at:

https://github.com/jdel/sspks

Also, my fork is at:

https://github.com/colin1497/sspks

As of 5/9/2015, my version works a little better than the master, but hopefully that will change when the project accepts my pull request for the updates I made.

Help make the world a better place by contributing code.

Updates:
5/29/2015 Package version 017 is Server 1.8.6
6/27/2015 Package version 018 is Server 1.8.7
8/12/2015 Package version 019 is Server 1.8.8
8/15/2015 Package version 020 corrects 2 issues: deleting old .json whitelist/ops files on upgrade, and log files unavailable from the DSM package manager.
1/1/2016 Package version 021 is Server 1.8.9, reduces RAM usage for many boxes with 2GB or less RAM.  Attempting to address some issues people are seeing with RAM, but it will impact performance a little bit.

Products referenced in this post:


87 comments:

  1. j'aurais besoin d'aide pare que cela ne fonctionne pas du tout chez moi...le serveur semble bien lancé, mais le journal reste vide et mes appareils android ne parviennent pas à se connecter, ni a trouver de serveur en fait !!

    ReplyDelete
    Replies
    1. I am afraid that this will not work with Android clients. Minecraft has multiple versions, and Android and iOS versions are called "Pocket Edition." They won't connect.

      Delete
  2. I can't locate any log files or server.properties file??

    ReplyDelete
    Replies
    1. /volume1/@appstore/Minecraft

      Also, check out this post, which I am very gradually updating:

      http://blog.heatdfw.com/2015/07/synology-nas-minecraft-server.html


      Delete
    2. I fixed version 20 so that you can now see the log file in the package center, as well. Minecraft log file locations changed and this hadn't been corrected.

      Delete
  3. Buggered if I know what I did wrong[21:46:39] [Server thread/INFO]: Starting minecraft server version 1.8.8
    [21:46:39] [Server thread/INFO]: Loading properties
    [21:46:39] [Server thread/INFO]: Default game type: SURVIVAL
    [21:46:39] [Server thread/INFO]: Generating keypair
    [21:46:41] [Server thread/INFO]: Starting Minecraft server on *:25565
    Java HotSpot(TM) Embedded Client VM warning: You have loaded library /tmp
    ty-transport-native-epoll2440111596338019077.so which might have disabled
    guard. The VM will try to fix the stack guard now.
    It's highly recommended that you fix the library with 'execstack -c (FileInputStream.java:138)
    at atm.c(SourceFile:62)
    at adm.I(SourceFile:2579)
    at le.a(SourceFile:785)
    at le.a(SourceFile:758)
    at net.minecraft.server.MinecraftServer.a(SourceFile:364)
    at net.minecraft.server.MinecraftServer.t(SourceFile:387)
    at net.minecraft.server.MinecraftServer$2.run(SourceFile:715)
    [21:47:50] [Server thread/INFO]: Starting minecraft server version 1.8.8
    [21:47:50] [Server thread/INFO]: Loading properties
    [21:47:50] [Server thread/INFO]: Default game type: SURVIVAL
    [21:47:50] [Server thread/INFO]: Generating keypair
    [21:47:51] [Server thread/INFO]: Starting Minecraft server on *:25565
    Java HotSpot(TM) Embedded Client VM warning: You have loaded library /tmp
    ty-transport-native-epoll1217806781241237918.so which might have disabled
    guard. The VM will try to fix the stack guard now.
    It's highly recommended that you fix the library with 'execstack -c (FileInputStream.java:138)
    at atm.c(SourceFile:62)
    at adm.I(SourceFile:2579)
    at le.a(SourceFile:785)
    at le.a(SourceFile:758)
    at net.minecraft.server.MinecraftServer.a(SourceFile:364)
    at net.minecraft.server.MinecraftServer.t(SourceFile:387)
    at net.minecraft.server.MinecraftServer$2.run(SourceFile:715)
    [21:53:42] [Server thread/INFO]: Starting minecraft server version 1.8.8
    [21:53:43] [Server thread/INFO]: Loading properties
    [21:53:43] [Server thread/INFO]: Default game type: SURVIVAL
    [21:53:43] [Server thread/INFO]: Generating keypair
    [21:53:45] [Server thread/INFO]: Starting Minecraft server on *:25565
    Java HotSpot(TM) Embedded Client VM warning: You have loaded library /tmp
    ty-transport-native-epoll3529983875823261392.so which might have disabled
    guard. The VM will try to fix the stack guard now.
    It's highly recommended that you fix the library with 'execstack -c (FileInputStream.java:138)
    at atm.c(SourceFile:62)
    at adm.I(SourceFile:2579)
    at le.a(SourceFile:785)
    at le.a(SourceFile:758)
    at net.minecraft.server.MinecraftServer.a(SourceFile:364)
    at net.minecraft.server.MinecraftServer.t(SourceFile:387)
    at net.minecraft.server.MinecraftServer$2.run(SourceFile:715)

    ReplyDelete
  4. the packages cant show on all packages !
    can you help me ?

    ReplyDelete
    Replies
    1. i have a ds215 + and it cant have package
      sry for my bad english

      Delete
    2. You will have to tell it to allow "Any Publisher" in Package Center. Once you do that you should be able to add my repository and see it.

      Delete
  5. Can you update the package plz?
    I get a "old" error in minegraft, already tries to replace the with the latest jar

    ReplyDelete
    Replies
    1. The package is Minecraft 1.8.8, which is the current version as of today:

      https://minecraft.net/download

      Note that it will only connect with the PC version of minecraft, not Pocket Edition, or XBox, etc.

      Delete
    2. Well, "normal" Minecraft is Java, so I'm 99% sure the Mac version is the same as the Windows version, is the same as the Linux version. They're all "PC" Minecraft...

      Delete
  6. Hello, first thanks for the work and one question, there's a MineCraft Server PE?

    Thanks

    ReplyDelete
  7. How to see the minecraft files in windows explo, like my photo or video? i can't see the folder.

    ReplyDelete
    Replies
    1. Not completely easily. It can be done, but it's probably not the best way to do it and I wouldn't do it if I weren't familiar with Linux, and if you were familiar with Linux you wouldn't probably bother anyway.

      Delete
  8. Just want to say, took me 2 min and all was working fine! thanks a lot!!!!

    ReplyDelete
  9. Fantastic! My teenage kids, who played Minecraft years ago and 'grew out of it' recently started playing again and I was able to create a full server in minutes. This is on a DS412+ mod'd with 2GB RAM instead of the usual 1GB.

    A few questions:

    Java RAM usage gets pretty high at times, so has anyone figured out how to add a Java 'max memory' setting?

    I'm also trying to figure out whether there's an easy way of adding or using a GUI or non-GUI console. Not sure if Minecraft has a 'backdoor' port for this kind of thing?

    Finally, the comment about 'craftbukkit being a dead end...' - what does this mean? Just so I can answer my kids when they ask.

    Again, fantastic work & thanks!

    ReplyDelete
    Replies
    1. There are some default setting on memory. The installer checks how much memory you have in your NAS and sets it below that. I might be able to reduce these, but it will impact performance...

      Delete
    2. Also, Craftbukkit is still widely used, but there were some issues of code ownership that have stopped development. I'm not deep enough into the Minecraft community to have a good answer there.

      Delete
    3. Reduced max RAM numbers a bit in the updated version.

      Delete
  10. Thanks for your package, you saved me lots of time.

    I have the same question as Richard : Is it possible to configure Java memory usage for the server ?

    ReplyDelete
  11. Hey everyone, I just installed Java 8se as explained. However when I try to install minecraft I get the message "The user home service in not enabled" while this service is enabled? Anybody an idea?

    Thnx,

    André

    ReplyDelete
  12. Hi

    Great work!
    Will it ever work with the Pocket Edition?

    Thanks
    Mike

    ReplyDelete
    Replies
    1. I'm afraid I haven't followed Microsoft's plans closely on PE. It would certainly be nice.

      Delete
  13. This comment has been removed by the author.

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. Many thanks for this work, I did that for my sons. :-)

    I know nothing about Minecraft, but I'm concerned about security. As this, the server is opened to anyone if we nat the router to outside. How to require a password for connection ?

    Thanks !

    ReplyDelete
    Replies
    1. You would be somewhat dependent on Minecraft's security, obviously. They do their own authentication designed to ensure that you buy the game. You can control who can log into your server by whitelisting/blacklisting users.

      Delete
  16. Hey and many thanks for this tutorial, i got it working this way very quick. Unfortunatly Minecraft is extremly unstable. Mostly i need 2 times to connect, it looses connection while downloading terrain, and then flying around i notice that the world is not updating and then the server simply crashes. I'm currently trying to find the logfiles and invetigate whats going on there. But for an easy start, anyone has the same issues?

    ReplyDelete
    Replies
    1. It may be your hardware isn't very powerful? Synology makes a wide range of machines. On some it will install and run, but maybe not as well as some of the higher end machines?

      Delete
  17. Thank you! Got it set up and working perfectly on a DS415Play, the only problem is that it seems to stop the server running every 30 seconds or so, and you have to re-start it manually using the package. Could it be that the NAS isn't powerful enough to run it?

    ReplyDelete
    Replies
    1. I just posted a new version that reduced the RAM limits a little bit for 1GB machines. See if this helps. I have had a couple people complain about RAM usage and starting, perhaps some changes have been made to DSM that were impacting things.

      Delete
    2. Hi. Tried on ds214play. Looks like it wants to reserve 832M on a 1G unit and it comes up with "old" next to the server on the client? i'm running plex too (32m)

      Delete
    3. Started after a while but "server connection lost" after 1min of play. Any chance 189 is too much for the 214play? the 152 was sometimes a bit flaky, I guess 189 has loaded more on?

      Delete
    4. Daniel, the 214play looks like it has an Intel Atom CE5335. I had to do some digging to find much info on this CPU, but found this:

      http://images.anandtech.com/doci/7272/n2560-SSH-pic.png

      My CPU (D2700) is similar except running at 2.1GHz instead of 1.6GHz. I have 2X the RAM and 33% more CPU power and haven't had huge issues. You can try turning your view distance down.

      Delete
  18. Hi thanks for this. My 5 year old son was able to play Minecraft with his 2 cousins in New Zealand on Christmas day (despite the fact that they have never met)!
    The server is complaining about losing ticks and then periodically (twice so far) crashes. I read online that setting nogui on startup may improve things. Is this already set on this server, of not, what do I edit to set nogui on startup?
    Cheers

    ReplyDelete
    Replies
    1. Try updating and let me know if it helps. I turned down the RAM limits and updated to latest Minecraft server.

      Delete
  19. hi, i got upgrade my ram 2go ->8go with my ds415+.

    Should i do something with java to use more ram than before?
    DSM have a update, can i do it without lost anything?

    Thanks :p

    ReplyDelete
    Replies
    1. It detects RAM at each startup, so you are all set.

      Delete
  20. Sorry, I'm an old mom so this is likely a dumb question. Got the server running on our LAN (am not opening outside our household). We can see the game but no one can join - "host unresolved". Any clue what I might have done wrong?

    ReplyDelete
    Replies
    1. I just tried to direct connect, and that works.

      Delete
  21. Hi, I want to set CraftBukkit, but I write error "There was a problem downloading craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar from the jfficial download link, which was http://tcpr.ca/download/ craftbukkit / craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar "Alternatively, you may download this file manually and place it in the" public "shared folder

    ReplyDelete
    Replies
    1. Thanks. I will check it out and see if maybe we can get it up and going again.

      Delete
  22. Thank you works great, I found this software which looks good and you caould then host and maintain multiple worlds / games It's called MultiCraft
    http://www.multicraft.org/
    Would you be able to make an installer for this ?

    ReplyDelete
  23. This works great however I've tried multiple times to copy a single player world to the server and the world is reset somehow. Is there something in the package that's preventing me from using one of our saved worlds?

    ReplyDelete
    Replies
    1. You should be able to copy a world over, but I've never tried it. As long as everything's in the right place I think it should work.

      Delete
  24. Hi there, many thanks! It works. The only bad news is that I had the old version of the package installed and now we don't see our world. Any ideas? Thanks!

    ReplyDelete
  25. BTW I was running under Craftbukkit before. Maybe the world is there?

    ReplyDelete
    Replies
    1. This may well be the issue. I actually haven't run with craftbukkit, though, if you look above someone else pointed me towards a current build and I'm going to try and update the craftbukkit package this weekend.

      Delete
    2. Updated craftbukkit today, but still haven't really played with it. With craftbukkit your world was probably located elsewhere.

      Also, if your world wasn't named "world" then probably got deleted in the update. The update preserves certain files.

      I would always recommend making a backup copy of your world periodically, and specifically before upgrades.

      Delete
  26. Hi Colin,
    Thank you for you hard work and time. At the moment it's working fine in my DS713+, I'll check on my son later to know how it is going.
    Cheers

    ReplyDelete
  27. Hi Colin,
    great work. I just got the Problem that after the installation the Server does not want to start on my DS715. I just kicked the Java Manager out and replaced it with Java SE Embedded 7. Now the manual start of the Server via putty and root works. Is there something that I have to pay attention if I would like to work with the Java Manager. A Manual start via putty was not possible with the installed Java Manager and the necessray Oracle Software. How can I set it up that the MC-Server starts with the start of the DS715?
    Kind regards, Urs

    ReplyDelete
    Replies
    1. I'm really not sure what to tell you here. I would think that the Java packaged with DSM would work OK. If it doesn't, you might look here:

      http://pcloadletter.co.uk/2011/08/23/java-package-for-synology/

      His package is updated to the latest.

      The DS715 uses 4X Cortex-A15 at 1.4GHz. I don't know what performance will look like on that, but the A15 was a higher performance ARM core in its day.

      Delete
  28. Colin,
    Great Blog by the way, has help me out alot but on that note I am feeling like a complete Noob today. Question: Where can I access the equivalent of a Windows batch file to set the Java memory settings and other items for minecraft? Patters (PCloadletter,com) mentions this location /var/packages/Minecraft/scripts/launcher.sh but it does not exist on my synology..or does it? I am guessing that if I can get to this launcher I can modify the Memory portion of the script... correct?

    I only ask as I have moved a world over from a windows server (called world_Flat001) and it keeps crashing upon startup (original world setup works well). The research I have done says to delete the session.lock in the world file, which I did and it still has errors, next on list is to increase the memory allocation but I get stumped here aka no easy windows batch file to modify.

    Your help and step by step walk through would be grateful here.

    Randolph L.
    DS1513 2 meg

    ReplyDelete
    Replies
    1. All right, I just found the script location under root1, not volume 1. I was able to view the max memory settings and now understand that it is an automatic pull for the size of the memory modules you have installed on the synology...great script for that. It stil did not help me resolve my world_flat001 load issue though...I will keep digging

      Delete
    2. Not sure that we have the same problem, but I was unable to use my existing world. If I copy the world to my desktop and set it up as a server, it works fine. If I copy the world to the Synology NAS, it doesn't work even though the files are all copied to the correct locations. I've given up on trying and we started a new world.

      My problem now is that the server properties don't seem to all work. We've set the max build to 500 but we get stopped at 256 which is the default number. I haven't tried all the other parameters but some of them work - the name of the world, survival/creative. Son is frustrated on the build tho and I wish I could figure it out.

      Delete
  29. When are you going to update to 1.9 :)

    ReplyDelete
  30. I can't access my minecraft server, is it because of the latest update to 1.9?

    ReplyDelete
    Replies
    1. You need to go to the profile settings in the launcher and choose 1.8.9.

      Delete
  31. hey is that possible to you to do the 1.9 update? :D

    ReplyDelete
  32. Hello, I have Home service issue too - it is enabled, but i get an error message. Synology 1511+ and DSM 6.0 - installed today. Java 8 enabled. Can you help me?

    ReplyDelete
    Replies
    1. same issue, on DS415+ but the Home service is activated

      Delete
    2. same here, again with DS415+. frustrating :/

      Delete
  33. I appreciate your work. I’ve been looking for quite some time such an useful resource and I’m very glad I found it. Keep up the good work! minecraft server hosting

    ReplyDelete
  34. I appreciate your work. I’ve been looking for quite some time such an useful resource and I’m very glad I found it. Keep up the good work! minecraft server hosting

    ReplyDelete
  35. This comment has been removed by the author.

    ReplyDelete
  36. Hey I was wondering if you have a guide for update to 1.9.2 or are you going to release an updated version? Thanks David

    ReplyDelete
    Replies
    1. I'll try to get both 1.9.2 update and DSM 6 issues figured out this weekend.

      Delete
  37. Anyone found a solution for the home directory issue? Trying on a DS415+ NAS as well, and its enabled, but won't install...

    ReplyDelete
    Replies
    1. I'll try to get both 1.9.2 update and DSM 6 issues figured out this weekend.

      Delete
  38. Hi
    I have Synology 213j.
    Managed to install it srver starts and using client version 1.9 I can actually connect to it.
    But after a few minutes waling around the world the server crashes.
    The service is still runining but client can't connect to it any more.

    -- System Details --
    Details:
    Minecraft Version: 1.9
    Operating System: Linux (arm) version 3.2.40
    Java Version: 1.8.0_77, Oracle Corporation
    Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
    Memory: 315962024 bytes (301 MB) / 468189184 bytes (446 MB) up to 468189184 bytes (446 MB)
    JVM Flags: 5 total; -Xmx448M -Xms448M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts
    IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
    Profiler Position: N/A (disabled)
    Player Count: 1 / 20; [lr['Rocky'/158, l='world', x=61.50, y=66.00, z=162.50]]
    Is Modded: Unknown (can't tell)
    Type: Dedicated Server (map_server.txt)

    Crash report:
    ---- Minecraft Crash Report ----
    // Everything's going to plan. No, really, that was supposed to happen.

    Time: 4/30/16 12:50 PM
    Description: Watching Server

    java.lang.Error
    at java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync.readerShouldBlock(ReentrantReadWriteLock.java:682)
    at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryAcquireShared(ReentrantReadWriteLock.java:470)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1282)
    at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:727)
    at kh.c(SourceFile:86)
    at kh.a(SourceFile:103)
    at rr.i(SourceFile:1735)
    at rr.aL(SourceFile:1681)
    at rr.al(SourceFile:959)
    at rr.U(SourceFile:398)
    at sa.U(SourceFile:215)
    at sb.U(SourceFile:209)
    at rr.m(SourceFile:339)
    at sa.m(SourceFile:1554)
    at sb.m(SourceFile:276)
    at yq.m(SourceFile:46)
    at za.m(SourceFile:299)
    at aht.a(SourceFile:1515)
    at lp.a(SourceFile:719)
    at aht.g(SourceFile:1493)
    at aht.k(SourceFile:1383)
    at lp.k(SourceFile:552)
    at net.minecraft.server.MinecraftServer.D(SourceFile:625)
    at la.D(SourceFile:339)
    at net.minecraft.server.MinecraftServer.C(SourceFile:553)
    at net.minecraft.server.MinecraftServer.run(SourceFile:457)
    at java.lang.Thread.run(Thread.java:745)
    ...
    Synology Package log says something like:
    Server Watchdog/FATAL: A single server tick took 60.00 seconds (should be max 0.05)
    Server Watchdog/FATAL: Considering it to be crashed, server will forcibly shutdown.
    ...
    Stopping server

    ReplyDelete
  39. I have updated the package (0025) and it installs on DSM 6 and above. User Home issue is fixed, but there are still a few issues because it doesn't report that it's running in Package Center.

    ReplyDelete
  40. Hello, thank you again - version 1.9.4 is fully working (Synology 1511+), without errors, 2 players (for now) and everything is ok... Thank you very much for your work, Colin! My son is thrilled :)

    ReplyDelete
  41. Hello, where is 1.9.4, version?

    ReplyDelete
    Replies
    1. http://blog.heatdfw.com/p/synology-minecraft-server-setup.html

      Delete
  42. Hi,

    i can't add your repo. I just get "invalid location" error. Im Running a DS716+II with DSM 6.0.1-7393 Update 2.

    ReplyDelete
  43. Yo, thanks for this, i got it runnning, but i am pretty new to all that NAS stuff and now i am confused about how to connect to this server?

    ReplyDelete
  44. You have done an incredible job. This is such a conceptual blog. You can know some more information about Best Minecraft Hosting.

    ReplyDelete