Setting up a LaunchDaemon for a Minecraft server

Running a minecraft server is as easy as downloading the server jar file and runnning:java -jar minecraft_server.jar

But after the thrill is gone you will want to automate this with a launch daemon, know how to back it up, and also how to run this as user nobody for extra security.

Here’s some step by step instructions:There’s three parts to this hint. 1) creating the launchDaemon that starts the minecraft server. 2) how to debug and control the daemon 3) maintaining backups

The first step is to download the minecraft server jar file from the Mojang website. Currently that site is [url]https://minecraft.net/download[/url] but that might change in the future. And Currently the jar filename is: minecraft_server.1.6.2.jar but that will change too.

1) creating a place for it.
when you run the jar the first time it’s going to create a lot of files and subdirectories the in the current working directory (CWD) so we want to create a n …

Source: Mac OSX Hints