Module of the Week: branan-minecraft – Install a Minecraft server
| Purpose | Install and configure a Minecraft server on Linux |
| Module | branan/minecraft |
| Puppet Version | 2.7+ |
| Platforms | All platforms that provide cURL and Java |
Minecraft is a popular game in which you can explore and create a world made of blocks. One of its features is a multiplayer mode that allows playing the game with others over the Internet on public or private servers.
There are a number of public Minecraft servers, but they are not always the best solution. If you have young children or just don’t like playing online with strangers, you might want to have your own Minecraft server. With this Puppet module, you can start playing Minecraft with your friends and family in just a few minutes.
Installing the module
| Complexity | Easy |
| Installation Time | 1 minute |
The Minecraft module is available from the Puppet Forge. Simply run puppet module install branan-minecraft to install it.
Resource overview
- minecraft
- This is the core class of the Minecraft module. It installs the Minecraft server, starts the service, and handles some core configuration values.
- minecraft::server_prop
- This type is used to manage the Minecraft server.properties file. Valid properties can be found at various Minecraft websites.
- minecraft::op
- This type is used to add a player to the operator list. Players on the operator list will be automatically granted certain in-game administrative powers.
- minecraft::ban
- This type is used to add a player to the ban list. Players on the ban list can not connect to your server.
- minecraft::ipban
- This type is used to add an IP address to the ban list. Any player attempting to connect from banned IPs will be blocked.
- minecraft::whitelist
-
This type allows you to add players to the whitelist. In order for this to be useful you must configure your Minecraft server to use a whitelist of players.
Example usage
class { 'minecraft':
heap_size = 1536,
}
minecraft::op { 'branan': }
minecraft::ban { 'notch': } # Who needs him anyway?
minecraft::server_prop {
'motd': value => 'Built with puppet!';
'max-players': value => '5';
} |
This example shows the core capabilities of the Minecraft module.
- The minecraft class installs the Minecraft server and handles basic configuration. The heap_size parameter to this class sets the JVM maximum heap size to 1536MiB.
- The minecraft::op and minecraft::ban lines manage the server operator and server ban lists. These are types, and as such you can have as many as you like in your manifest. They are designed to play nicely with the Minecraft server commands, so that any bans done through the game UI will not be removed by Puppet.
- The minecraft::server_prop entries set the message of the day and maximum player counts for your server. These resources are using the semicolon syntax for compactness, but they can also be represented in your manifests as separate resource blocks. Note that using the semicolon syntax for complex resources can be hard to read; I only recommend using it for single-parameter types like this one.
Conclusion
Running your own Minecraft server can be fun and rewarding. Puppet and the Minecraft module give you the tools you need to manage your server quickly and easily, giving you more time to build and explore.

4 Comments
Make this a craftbukkit minecraft server with all of the best modules and you might have something here. :)
Hi! Craftbukkit is something I’ve thought about, but this module was originally a “I’m gonna stay after work and do something fun with puppet” project. I’d definitely be interested in seeing or helping with a Craftbukkit module, but I probably won’t write it from scratch myself.
WHY DOES MINE CRAFT TAKE UP SO MUCH SPACE
Great information.
Craftbukkit is realy good!
Great post!!!