Introduction
Creating a proper and safe Mac OS X daemon a relatively hard task, and this document is a work in progress. It works for me, it might not for you. Please refrain from doing so unless you know your way around Terminal and Console, and you have a good analytical mind that will tell you whenever you are doing mistakes. Take this text as a helping hand, not as a full "run this package and it works" text. Evil lurks around and your computer might never look the same! Be warned!
This page will help you make your Minecraft server securely run without having to log in as a user.
Before even attempting this, you should run a server instance by hand, to make sure everything works. If you are able to run your server and actually connect to it from a remote computer, you can start thinking about creating a daemon.
Creating a _minecraft daemon user and group
This section is technically optional, if you don't create a user and group, your Minecraft will happily churn away as root. If you skip this part, don't come to me if your precious computer gets hacked.
The easy (and incorrect) way
- Click on Apple menu item
- Open System Preferences
- Click on System: Accounts
- Click on the lock in order to unlock the page
- Enter your administrator password
- Click on the Plus button
- Create a new Standard user, named Minecraft (Please make sure to modify the launchd plist file saying you are using a different user) with a password
- Click Ok
And you are done! Congratulations! However, this creates a full fledged user, whilst Mac OS X expects a daemon user. As a side bonus, you can run this as your own personal user, or any other possibilities for users. But then, if your Minecraft user gets hacked, the hacker will have a full account to have fun, accessing all your software, and be able to modify everything that's public. It's not the best.
The hard (and correct) way
Creating the group
Creating the user
Creating the user home
Moving the server files
Support files
You need a few files in order to make this work adequately. It could be done with less files, but it's more readable that way. Please copy them carefully.