Minecraft Wiki
Advertisement

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

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.

Shell scripts

minecraft.command

start.sh

stop.sh

Launchd plist

Tying it up

Permissions and final file move

Controlling the daemon

Backup considerations

Advertisement