Package Details: minecraft-server 1.11.2-2

Git Clone URL: (read-only)
Package Base: minecraft-server
Description: Minecraft server unit files, script, and jar
Upstream URL:
Keywords: bash minecraft official script server
Licenses: custom
Conflicts: minecraft-canary, minecraft-server-systemd
Submitter: sorcix
Maintainer: edh
Last Packager: edh
Votes: 120
Popularity: 1.528377
First Submitted: 2010-11-29 15:52
Last Updated: 2017-01-07 14:07

Required by (0)

Sources (6)

Pinned Comments

edh commented on 2016-06-18 18:24

To get an overview of the available options provided by the management script, be sure to have a look at the help page or read the according section on the ArchWiki article [1].

You can quit the console without shutting down the server by press ctrl+a d (first ctrl+a and after releasing the buttons press d). This will detach your input from the server console. The attaching and detaching is done with GNU screen since it lets you view and type into the console, send single commands to it and keep it alive without a connected user. Take a look at the the command overview at the ArchWiki [2] to get a feel for its power. (@carmelo12341)


Latest Comments

edh commented on 2017-01-10 15:59

You (your user) cannot view a process which is owned by a different user however root can see everything. If you have the according sudo capabilities you can execute a single command as a different user by using `sudo -u minecraft <command>`. I assume you can construct the necessary command from there.
Either way all of the above would have been unnecessary if you would have continued reading the Wiki [1] or if you would have taken a look at the help page ;D The simplest solution to your problem is using the management script: Type `minecraft --help` for a list of available option, spoiler use `minecraftd console` to connect to the console. In order to disconnect, see the pinned comment.


bronze commented on 2017-01-10 00:39

The minecraft arch wiki mentions "Either way the server is encapsulated in a screen session which is owned by the minecraft user." However, screen -ls didn't return any screens.
I checked if screen was running. I did find SCREEN running ps -aux:

root 5302 0.0 0.0 23932 2656 ? Ss 07:53 0:11 SCREEN -dmS minecraft /bin/bash -c cd '/srv/minecraft'; java -server .....

How do I "connect" to the screen named "minecraft"? Why is screen written in all caps?

[EDIT] I managed to connect to the screen via "su root" and "su minecraft" (user minecraft doesn't have a password). Is that the only way to connect to the screen?

edh commented on 2017-01-02 15:04

I am thrilled to hear that you intend to use it in an production environment. Should you encounter any setbacks be sure to let me know how I may help. My mail address is contained within the PKGBUILD and the code is hosted at github [1]. Keep in mind that the idle server is a somewhat hacked solution since netcat occupies that port as long as the server is down and it takes some time (depending on your setup) to get it back up.
Btw. the script should also work with multiple parallel servers (e.g. on different ports) simply by setting unique environment variables (especially SESSION_NAME). However I have not tested this setup yet.

EDIT: Concerning your question about the graceful shutdown depends on your setup. If you start the server by hand (using `minecraftd start`) you must also shut it down by hand (using `minecraftd stop`). If there is no player online the server will shutdown immediately, otherwise it will grant players a few seconds to clean up leftover work. However if you use the provided systemd service file, a graceful shutdown (`minecraftd stop` with the same effect as stated above) should be automatically trigger on a system reboot.


Tmk commented on 2017-01-02 12:24

Ah I see, thank you for the change! It work's. Don't worry being "late", you were not. I will switch to production with your script, the idle_server saves me headaches with stuff running in the always-loaded-chunks. I have one more question, will the running Minecraft server be gracefully stopped if I reboot the system or would that be a crash? Thanks again!

edh commented on 2016-12-29 17:00

Thanks a lot for the bug report and sorry for the late response!
Previously screen was used to select a session with a specific well defined name however apparently screen selects anything starting with the specified pattern. This let to some confusion between the server and the idle_server. To circumvent this behaviour I simply changed the naming schema for the idle_server.

Tmk commented on 2016-12-26 15:23

Hello, thanks for the nice package!

The idle server is not working for me, "An error occured while trying to reset the idle server!". Once the minecraft server sleeps I cannot reconnect from the game client. I don't understand the script enough, unfortunately. I made a screenshot [1], maybe somebody has an idea?


edh commented on 2016-07-31 10:05

Strange, it is working well for me on two different machines and on a clean installation. The game_command function in the script [1] apparently is not working as expected for you. The logic of this function is like this: enable logging for the screen session to file /tmp/minecraftd_screen_command_dump.txt, trigger the command, wait, disable logging for the screen session, cat file, rm file. I assume you installed screen properly, performed no partial upgrade, your /tmp folder is configured and you have shut down your server at least once since you updated to screen version 4.4.0, then I would guess the logfile is not set correctly. Try issuing the following command:
sudo -u minecraft screen -S minecraft -X logfile "/tmp/minecraftd_screen_command_dump.txt"
and see if that fixes the issue for the currently running server. Be sure to check every of the above mentioned pitfalls before!


leifurhauks commented on 2016-07-30 00:17

Thank you for this great package!

When I run minecraftd command <command>, I always get the following:

cat: /tmp/minecraftd_screen_command_dump.txt: No such file or directory
rm: cannot remove '/tmp/minecraftd_screen_command_dump.txt': No such file or directory

edh commented on 2016-06-26 20:08

Remember to close all minecraft server sessions prior to upgrading GNU screen since you can not reattach to the previous session [1] after the upgrade.


edh commented on 2016-06-24 17:21

The recent commit changes a few things in the script:
* Handle server command output completely through screen instead of relying on a possible outdated log file. (Implemented in the game_command function.) The default screen command dump resides in /tmp.
* LOGPATH is not needed anymore.
* Unite various java options into one lengthier SERVER_START_CMD.
* Update configuration file accordingly.

edh commented on 2016-06-18 18:24

To get an overview of the available options provided by the management script, be sure to have a look at the help page or read the according section on the ArchWiki article [1].

You can quit the console without shutting down the server by press ctrl+a d (first ctrl+a and after releasing the buttons press d). This will detach your input from the server console. The attaching and detaching is done with GNU screen since it lets you view and type into the console, send single commands to it and keep it alive without a connected user. Take a look at the the command overview at the ArchWiki [2] to get a feel for its power. (@carmelo12341)


carmelo12341 commented on 2016-06-18 18:16

Is there a way to terminate the minecraftd console window without killing the server?

edh commented on 2016-05-20 10:05

In a recent commit I changed how the idle server behaves if an admin is connected to the console. To be specific: The player checking is paused as long as someone is
attached to the session. Not only does it make sense for any admin which wants to monitor the console, it also removes annoying list invocations from the console while e.g. typing in it.
In case someone was relying on the previous state, please be sure to let me now ASAP and I will revert the change if necessary.

edh commented on 2016-04-18 18:58

Actually my servers tend to run smoothly. Please open a forum thread with your specific problems and send me a link. I would be glad to help.
However I do not like to add those lines to the service file since it would render the server-stop functionality of the script useless if the systemd service is running. The 'always' parameter seems very aggresive [1] to me and not desirable. Even something like 'on-abnormal' might not be a good choice for everybody since especially for small servers uptime is not as important and one would be better of preventing those errors instead of ignoring them.


Svenstaro commented on 2016-04-18 18:40

I recommend setting


in the minecraftd.service file. Minecraft server likes to crash.

lesebas commented on 2016-03-29 20:59


You're right about the use of this comments thread, sorry. I have finally solved my problem by installing the server on another computer on my local network. Everything works fine, I don't understand why I can't make it work on another similar archlinux machine. Thanks for your support.

edh commented on 2016-03-29 18:07

I would very much appriciate if you could open a forum thread or something similar for this discussion, since it seems to be only you having those kinds of problems. I initially thought that the strange behavior was somehow affiliated with the reports about the transition to the idle-server. However since this is probably not the case, it is best to leave the comment section. It is not the right place for this.
Concerning your problem: Please explain in detail what commands you have executed to come to this point and what the output of each command was. Your explained behaviour seems like you are leaving out some essential error messages, like insufficient sudo access. What happened when you ran the server as minecraft user with merely java -jar <main_executable>?
Have you read and understood the ArchWiki entry, I wrote about the script? It should give you a small impression of what is done.

lesebas commented on 2016-03-29 17:42

Hello I went through the initial installation process from scratch and that's OK. But when I start the server for the first time the eula.txt file is not created?

edh commented on 2016-03-29 15:55

This sounds like a decent plan. It really is annoying in those cases.

sowieso commented on 2016-03-29 13:20

How about not to print the countdown on shutdown when nobody is connected? This cool feature gets annoying when you have to restart several times. The code to check for an empty server is already in the idle_server_daemon() function, so it is not difficult to implement.

edh commented on 2016-03-20 19:13

What is your understanding of the "saved old server directory"? On an update mereley a new minecraft_server.${pkgver}.jar is added and the link pointing to that .jar gets changed. All other files, e.g. logs world-files etc., stay the same.
To me it seams like you messed up your server pretty badly: First of all the minecraft_server.${pkgver}.jar is missing a dot in its name right in front of the version. Additionally the server logs by default everything to the logs directory. Without further configuration it should always be created if it was not present.
I have tried multiple times and mimiced your state of files on my machine, however I can still not reproduce your result.
Try to start the server manually with java -jar and no further arguments and see what happens. Furthermore you should make sure that the installation of this package succeeded without errors and if not fix those problems first.

lesebas commented on 2016-03-20 18:27


Unfortunately in the saved old server directory the latest.log is empty. In the new directory, there is no sub-folder and only 3 files :

- minecraft_server1.9.jar
- minecraft_server.jar
- (empty file)

edh commented on 2016-03-18 23:15

I already committed a fix for this but unfortunately am unable to push it at the moment. I will update it ASAP. Sorry for the delay.

EDIT: done.

TheNiceGuy commented on 2016-03-18 23:11

Hi, you might want to change "MAIN_JAR" in /etc/conf.d/minecraft.conf to "MAIN_EXECUTABLE" (since /usr/bin/minecraftd request that variable).

edh commented on 2016-03-12 21:51

Sorry but I can't reproduce your problem. Neither an update nor a clean install does result in such behaviour on my machine.
The 'ERROR' is printed if the server was not shutdown within 3 seconds. However the stop command has been sent to the server and was received at this point. If the server is properly working it should still go down.
To further investigate your problem it would be best to take a look at the log. If you share the file /srv/minecraft/logs/latest.log, e.g. post it to pastebin, I will gladly take a look.

lesebas commented on 2016-03-12 18:40

Since I updated to 1.9 I can't make it run at all. I'v try to reinstall all the server. I can run ''minecraftd start'' but it does not create any EULA.txt. the status is OK but I can't stop the server ('ERROR'). Even if the status is ''running'' I can't connected to the server.

edh commented on 2016-03-05 11:46

With the very recent commit I am confident that the server should work as expected. I will further test it and update it if necessary.

edh commented on 2016-03-05 09:52

Many many thanks guys for the bug reporting, I appreciate that! I am sorry for the poorly tested installation files I released. I rushed to push the changes with the minecraft 1.9 release which probably was not a good idea since unfortunately I did not had access to a host where I can test the package. I am now testing the server and will probably release bugfixes and updates pretty soon. Until then please consider the idle_server experimental!!!

ThecaTTony commented on 2016-03-05 05:07

Also, the server never wakeup because line 96 of its incorrect, says:

And must be:
${NETCAT_CMD} -v -l -p ${GAME_PORT}

Thanks for the work!

tmoore commented on 2016-03-05 00:31

FYI.. need to fix startup script again... needs to be "User" and "Group", not "USER" "GROUP"
Otherwise systemd won't start it.

edh commented on 2016-03-04 17:54

@Vosky and @veluria
Thanks for reporting the bug. This should not have happend in the first place... Sorry for that.

sflor commented on 2016-03-04 12:04

Yeah, the startup always fails for me, claiming that the variables in /etc/conf.d/minecraft are write-protected.

Vosky commented on 2016-03-04 08:29

Hi there,
I had an issue with systemd service.
It did not start with systemctl but su - minecraft -c 'minecraftd start' worked.

Fixed by editing minecraftd.service :
- Remove line "EnvironnementFile"
- Set USER/GROUP = minecraft

edh commented on 2016-03-02 21:00

Thanks for reporting the issue. I screwed up an if-statement in the script and thereby broke it for anyone not using IDLE_SERVER. The recent commit should fix that. Sorry for the inconvenience.

ThecaTTony commented on 2016-03-02 02:34

The server goes down even if IDLE_SERVER="false" or IDLE_SERVER=false are in the config file.
What are the steps for start the server by socket? I try to connect even if the client shows 'cant connect to server', but the server never wake up. Any help?

edh commented on 2016-02-29 21:26

The recent release featured some major additions, not just minecraft wise but concerning the managing script as well:

Add suspending capability for the minecraft server through the control
script and an additional screen session which listens on the same port
with netcat.
* Update .conf accordingly
* IDLE_SERVER can be either true or false
* The default is no idle server
* Choose an available netcat flavor automatically
Variable renaming in .install.
Notify the user of kept directories on post_remove and alter ownership
to root before removing the game user.
Print error messages to stderr.

Plus some more minor things...

melvinvermeeren commented on 2016-02-27 13:14

Agreed, makes sense. Thanks for quick reply.

edh commented on 2016-02-27 12:49

Stating that it may not be implemented within a couple of minutes is not a real objection and AFAIK systemd socket activation really does strive this use case.

I put systemd in brackets since I assume it to be installed though you are wrong that it should not be listed as dependency in the depends array solely because it is in base group. This rule only applies for the makedepends and the checkdepends array [1].
Just to be clear I am not completely against implementing it through systemd though you must admit that the only thing you would be able to strip from the scirpt is the netcat invocation which would then be handled by systemd. Everything else shutting down the server if there are no players on it and altering status and shutdown commands accordingly would still be done through the script.
The program has to behave differently in many ways (look where I check for IDLE_SERVER) if the user wants to suspend the server. In case this would be done through systemd there would be a need for the script to check whether the user has activated the socket or not. This is not really hard to implement but it would add a little more complexety to the script than there needs to be. (Btw. we would not get rid of the process manager.)
Currently I assume that the implementation as of right now is more effecient.


melvinvermeeren commented on 2016-02-27 12:08

I spent a few hours trying to make it work properly, but in the end it either spawned multiple server instances when multiple connects occurred before the first server finished booting or it didn't listen when the server shut down.

If a working configuration can be found, I don't mind switching to systemd sockets because it is Arch's "native" manager. netcat on the other hand took a 5 minute look on the man page and it worked.

Personally I won't have time for this soon, I have a backlog of other scripts that need updating and creating. If anyone finds a solution please let me know here.


EDIT: systemd sockets also act as a proxy afaik, meaning the actual minecraft server will need to run on a different port than the one people would connect to, further complicating configuration. It just seems extremely over-engineered for the simple "sleep until connection is caught" that is used now.

sorcix commented on 2016-02-27 11:35

@edh @melvinvermeeren Seems a little weird to write your own process manager when a more powerful one is already available on every system. It's hardly a dependency as it is in base, so you don't even have to list it. But it was just a suggestion. :-)

edh commented on 2016-02-27 10:30

The idea seams reasonable though we would merely get rid of netcat and everything else would stay the same. However the user would be required to ativate a socket in addition to changing the configuration of this script (plus we would gain systemd as a dependency). Since in the current implementation the script is very self containing and all configarion is done in one central file, I am in favor of invocing netcat manually.

melvinvermeeren commented on 2016-02-27 09:36

I tried implementing it with a systemd socket at first, but it seemed like it actually spawned a new instance of the server for every connection.

Maybe certain configuration could fix this, but the available documentation wasn't enough for me to make it do what I want. Eventually the netcat solution was born. :)

sorcix commented on 2016-02-27 09:03

Wouldn't it be better to implement this with a SystemD socket unit instead of a script?

edh commented on 2016-02-26 13:05

Great, unless there are any complains I will proceed with finalizing the script and pushing it eventually.

Thanks for your suggestions! I addressed the netcat issue, switched the admittedly horrible IDLE_SERVER naming convetion in favor of true & false and print errors to stderr (don't know how I forgot about that) [1].
However concerning your shutdown problem I omitted killing the screen session bacause I think there is a underlying problem which should be observed instead. Stopping the server using game_command stop should quit java in the screen session and by that the screen session should close accordingly. If it does not do that the minecraft server is still up. Brutally closing it can therefore lead to data loss.


sowieso commented on 2016-02-26 11:00

I like the idea of adding an idle-server and would use it.

Some thoughts when looking at your posted script:
‣ Would be nice if you could also check for ›ncat‹, as I am using nmap's netcat implementation. Do the usual ›$NC_CMD arguments‹ trick, I suggest.
‣ I had a problem with the server not correctly shutting down (esp with the restart command). Solved it by adding:
$SUDO_CMD screen -S ${SESSION_NAME} -X quit
in server_stop() after ›game_command stop‹
‣ [[ ${IDLE_SERVER} == 0 ]] looks horrible (0 is true), I understand your reason, but why not simply check for a string like "true" or "enabled" or so.
‣ not important, but shouldn't error messages go to stderr (>&2)

edh commented on 2016-02-15 16:56

I made some first steps towards suspending the server. However I don't expect to be able to work on it again until next week. Therefore I am publishing the WIP here [1] for anyone who wants to inspect or improve the current state.


edh commented on 2016-02-11 19:31

I like the idea. I will take a closer look at it in the near future.

melvinvermeeren commented on 2016-02-11 16:49

Hi guys,

Some friends of mine host a modded minecraft server on my server. Since modded minecraft servers like to eat a lot of CPU even if they're empty I created a script.

Upon first ping/connect the server will boot, if it's empty (by default minimal 5 minutes) it will stop itself and go back to awaiting connections.

Perhaps this type of socket-based activation is useful for others with CPU-eating modpacks too, so I'll share it here. Maybe it could be merged here somehow too. :)



edh commented on 2016-01-27 17:38

I am well aware of how to properly update a package ;D
Though in this case it was NOT my intention for users having to rebuild the package. The introduced changes are purely cosmetic and don't change a thing on how this program works. The checksums should be fine, I updated them accordingly.
I guess one may consider this bad practise not increasing the pkgrel but adding some brackets where they are not needed for a nicer look, rewriting the installation note and not using sudo if the user is minecraft (which is discouraged!!!) are not worth the time a user has to spend to redownload and rebuild the package. This is an AUR pacakge not one from the official repo, the final package may differ from machine to machine anyway.

Btw. anyone may precisely follow what I have changed simply by going through the git history [1].

Considering the space-issue I still think that anyone who was able to install Arch Linux is aware of the bash syntax. Therefore using common knowledge should not only be more straightforward but also more user-friendly since it should be quite familiar.


sowieso commented on 2016-01-27 11:31

Thanks for merging. The changes are online on github, but you should also increase the pkgrel and checksums to actually distribute the update.

As for the $WORLDPATH, I would probably use a newline-delimited string or config file. Then I'd xarg this to tar. When I have the time I'll implement it and you can decide if you like it or not. Would at least be more user friendly than to manually escape all the spaces (things users could easily forget, esp when they are not familiar with bash syntax)

edh commented on 2016-01-26 19:38

I implemented the discussed suggestions.

edh commented on 2016-01-25 23:40

It is great to see people contributing to my script. I will have a closer look at your changes as soon as possible.
As far as I can tell your point on sudo and double brackets seems reasonable I will most definitely address them.
However I quite don't get what is wrong about using a space delimiter for world names. This variable is bash interpreted [1] and as long as tar understands what you mean it should be just fine. Hence using "\ " to express a normal space is sufficient. I mainly chose to do it this way because I though an array might be more confusing. (I though that by the time you install Arch Linux you should be aware of the bash-syntax.)

P.S. I host all of my code on github [2]. In case you are familiar with git please feel free to make a merge request.


sowieso commented on 2016-01-25 17:33

I made the following additions to your minecraftd, if you like them feel free to incorporate them:
‣ if the user is already minecraft, no need for sudo anymore
‣ sudo user does not have to have sudo access for root anymore, only for minecraft (set up in /etc/sudoers)
‣ replaced [ to [[ (saver bash-style)

you can download the script here

I am also thinking of adding support for changing the current world and noticed your WORLDPATHS variable is space-delimited, which is very bad as worlds in Minecraft often contain spaces.

edh commented on 2016-01-23 11:54

This package just recieved some major additions:
* The script is now capable of restoring backups easily with the delivered bash script (The new config file must be merged in order to properly restore backups and only new backups are eligible!)
* The naming schema for backups is now more human readable
* Backed up directories are relative
* Group has write permission (g+ws) to SERVER_ROOT (Thanks @sowieso for the hint)
* Proper quotation of variables which might contain spaces

sowieso commented on 2016-01-22 22:46

Hi, consider using setgid on the /srv/minecraft directory. Then all users in group minecraft can copy their worlds in this folder and setup the server to their liking.
chmod g+ws "$pkgdir/srv/minecraft"

edh commented on 2015-09-20 21:40

@Chais Thanks! I adopted the package and will try my best to advance it.

Chais commented on 2015-09-20 11:10

@edh I'm not currently playing and can't make the time to give the package some much needed love. Therefore I'm going to orphan it. Feel free to pick it up.

edh commented on 2015-09-14 15:20

@Chais I recently wrote my own spigot shell script [1] from scratch to easily manage my minecraft server. The programm is obviously able to start and stop the server but it also can provide status information, create backups, bring you to the server console or simply run single commands in the server console with all (nearly all) output piped back to stdout. In addition I created a systemd timer and service file for automated backups.
I don't want to seem intrusive but if there is any chance that it could be included into this PKGBUILD, I would be glad to customize this script to work with the official minecraft server as well.


Chais commented on 2015-06-04 09:37

Sorry for the long wait. Took me a while to get it to work and I have life going on.

killermoehre commented on 2015-05-19 08:32

Shouldn't "minecraftctl status" be forwarded to "systemctl status minecraftd"?

Refutationalist commented on 2015-04-24 21:35

Wouldn't have worked as well for what I was doing, but it doesn't matter-- if that came from me, it wasn't something that was supposed to hit AUR.

Turtizzle commented on 2015-04-24 21:33

You can still do that with sudo -u minecraft, just don't create open user accounts that people might be unaware of.

Refutationalist commented on 2015-04-21 23:01

Probably my fault. I'd do ssh things with the minecraft user for dumb projects.

mmh commented on 2015-04-21 19:31

Please don't use /bin/bash as a login shell for the minecraft user.
/usr/bin/nologin might be a better choice.
Thank you.

Chais commented on 2015-03-28 10:01

@streusselhirni: try running `sudo minecraftd` directly from the command line and see what happens. Could it be you didn't set up your java-environment with archlinux-java?

streusselhirni commented on 2015-03-28 02:05

Hi Chais, I've got a problem: When I try to start minecraftd (systemctl start minecraftd), it seems like it started, but after checking systemctl I see, that the daemon directly exited out again. There is also no eula.txt created, which I could accept. Journalctl and server.log both don't have an error message inside.

Maybe you have an idea why it's not starting?

ainola commented on 2015-01-11 15:07

Wow, I'm terribly sorry - it appears I must have been smoking some drugs when I thought that - the structure remains in world/ as those cryptic files.

I'm sorry for the noise.

ainola commented on 2015-01-11 15:01

A note on something I noticed: Minecraft as of 1.8 (IIRC) splits up the world/ folder to a bukkit-like structure instead of the cryptic world/DIM1/ and world/DIM-1/ folders, the Nether and The End are now saved in world_nether/ and world_the_end/ alongside world/, not inside it. The mc_backup() function only backs up world/ which now omits the two dimensions!

Chais commented on 2015-01-11 14:18

Thanks for the flowers but I only adopted the package. I made some improvements here and there but mostly kept it up to date. The previous maintainers all did their part, too.

ainola commented on 2015-01-11 14:13

Hi, Chais - wanted to let you know that this is a really well-done package. I've adapted many of the ideas/files for my Debian Jessie server - good job on making such an effective package!

Chais commented on 2014-11-30 14:09

@niehmann: The solution is right there. Somehow you changed the access rights of /srv/minecraft/logs so that your minecraft user may not access the directory. By default that dir has 755 and every file below it has 644. All owned by minecraft:minecraft by default. user and group may need to be changed if you deviated from the default.

nlehmann commented on 2014-11-28 21:34

When I run systemctl start minecraftd the proccess start but it terminated after a few seconds.

When I tried to run the minecraft server directly from the console, not screen, as user minecraft it throws the following exception

Cannot access RandomAccessFile {}) logs/latest.log (Permission denied)

Chais commented on 2014-11-27 14:52

Fixed. That's not actually new to this version, though. Guess nobody actually puts quotes in their world names. Well spotted, though. Thanks.

sylverpyro commented on 2014-11-27 14:32

There appears to be a bug in the minecraftctl script in this package. Worlds that have space characters " " in their names are not handled correctly by the mc_backup() function inside mincraftctl due to a set of missing \" characters:

"tar -h -C \"$_SRVDIR\" -cf \"$BACKUP_FILE\" $WORLD"
Should be:
"tar -h -C \"$_SRVDIR\" -cf \"$BACKUP_FILE\" \"$WORLD\""

The same problem exists in the tar command for the "service" backup as well:
"tar -h -C \"$_SRVDIR\" -rf \"$BACKUP_FILE\" $SERVICE"
Should be:
"tar -h -C \"$_SRVDIR\" -rf \"$BACKUP_FILE\" \"$SERVICE\""

Chais commented on 2014-10-22 20:00

Nice catch. I've also finally come around to put the PKGBUILD and all source files except for the minecraft_server.jar on github.

Hellrespawn commented on 2014-10-22 19:44

In conf.minecraft, you can change $MCUSER, but minecraftd has "su minecraft" hardcoded.

namru commented on 2014-09-12 20:28

hi Chais, sry but now i can't reproduce the error. after remove of jre7-openjdk minecraft are startable again. i don't know why i will try to reboot the server within the next days if there are no active users :) and try again.
sry and thanks for your time

Chais commented on 2014-09-12 20:06

@namru: As I expected the server started just fine without jre8-openjdk installed. There's nothing in this package that the server might need. Same for the jre7 equivalent. Could you paste the actual error messages somewhere?

namru commented on 2014-09-12 19:43

Hi could you please switch java dependencie from java-runtime-headless to java-runtime. Without that the server doesn't start on my server.

ejona86 commented on 2014-09-06 17:50

There is no need to create the log symbolic link and "touch /srv/minecraft/server.log" in minecraft-server.install.

Instead, you just need this in package():
install -d "$pkgdir/var/log"
ln -s /srv/minecraft/server.log "$pkgdir/var/log/minecraft.log"

Then /var/log/minecraft.log is properly managed by the package manager.

Chais commented on 2014-09-06 09:06

Since I've been asked: Archlinux' java setup changed. Please refer to on how to fix it.

alien2003 commented on 2014-09-06 00:28

Broken after last update for me:
After # systemctl start minecraftd
# systemclt status minecraftd:
● minecraftd.service - Minecraft server daemon
Loaded: loaded (/usr/lib/systemd/system/minecraftd.service; enabled)
Active: active (exited) since Суб 2014-09-06 03:26:10 EEST; 12s ago
Main PID: 7792 (code=exited, status=0/SUCCESS)

Сен 06 03:26:10 hostname su[7795]: (to minecraft) root on pts/1
Сен 06 03:26:10 hostname su[7795]: pam_unix(su:session): session opened for user minecraft by (uid=0)
Сен 06 03:26:10 hostname su[7795]: pam_unix(su:session): session closed for user minecraft

And I can not connect to server

Chais commented on 2014-09-05 17:53

Silenced minecraftctl for successful execution. Failure still produces output.

Chais commented on 2014-06-27 22:35

I know. I've already added a message to the post_install()
Accepting the EULA should be the user's choice. Packaging a file implying the acceptance would feel wrong.

xyproto commented on 2014-06-27 21:33

After upgrading to 1.7.10, I had to edit eula.txt before systemctl start minecraftd would work.

Chais commented on 2014-05-19 20:13

@Reventlov: Fixed.
Also removed the copy of the server.jar. Symlinked it instead.

Reventlov commented on 2014-05-19 19:03

Hello. Please fix the permissions of your binary file or avoid creating an user that cannot execute the binary. Thank you.

Chais commented on 2014-05-12 22:08

@arnefm: thx. Corrected.

SirPenguins commented on 2014-04-29 17:45

Disowning as I do not have time to keep up with the package.

Hopefully someone else can take my place! :)

arnefm commented on 2014-04-27 15:43

There is a typo on line 35 in minecraftctl. It says "mc_docommand safe-off" while it should say "mc_docommand save-off".

xyproto commented on 2014-04-15 09:39

1.7.9 is out. Updated PKGBUILD:

namru commented on 2014-04-03 08:14

please delete the old minecraft_server file
rm /var/abs/local/sources/minecraft_server.1.7.5.jar
md5sum patches to the current file.

rami commented on 2014-04-02 18:07

The md5sum is out of date :)

netz commented on 2013-12-16 10:39

Mayhaps you should just download it as is and have installation/upgrade point out a message regarding setting up the config file

SirPenguins commented on 2013-12-11 22:44

Originally, the server was always named minecraft_server.jar. I was never aware that default installations shipped with the version number appended to the main .jar -- I just changed the original source URL around the same time someone recommended I use the amazonaws link to get the minecraft_server.jar. Never really realized what the link's target implied.
I've just updated the PKGBUILD's version for now. A fix that renames the server's jar correctly will come soon in 1:1.7.4-2. Of course, this means all users will need to modify their /etc/conf.d/minecraft files to avoid breaking invocation on every upgrade unless they aren't using the default, or unless I just make minecraft_server.jar a symbolic link to the latest version on each update. Not sure which route is more KISS.

netz commented on 2013-12-11 03:30

You should really stop renaming the minecraft_server.1.7.2.jar; minecraftforge (the de-facto modding software as modloader is dying off) *requires* the jar to be named as minecraft_server.x.x.x.jar to function

SirPenguins commented on 2013-12-08 05:54

Sorry for the delay, there is now a git repo at

Fixed, thank you!

Obihoernchen commented on 2013-11-19 21:17

There is a typo in minecraftctl line 35:
mc_docommand safe-off
Have to be:
mc_docommand save-off

sighter commented on 2013-10-27 22:01

Hey Guys. I just updated the pkgbuild. Only version number and corresponding md5sum was changed. Seems to work nice.


Ibex commented on 2013-09-27 13:46

I might be a nice idea publish your script on a bitbucket or github repo so the community can make enhancements and create pull requests.

Since I'm running on a ZFS filesystem, I'd like to have the mc_saveoff and mc_saveon methods of minecraftctl made available, so I can just make the disks consistent, create a ZFS snapshot and re-enable IO.

netz commented on 2013-09-17 21:06

Edit: small change will fix up the issue, minecraft_server.jar should be named minecraft_server.1.6.2.jar, then the forge setup works fine.

SirPenguins commented on 2013-09-17 20:59

Should be fairly simple, honestly. Take a look at /etc/conf.d/minecraft and modify the SERVERJAR variable to be the name of your forge jar. This is what I do for the tekkit and Canary packages that are based off this base PKGBUILD.

Let me know how it goes!

netz commented on 2013-09-17 20:36

Any chance on being able to setup minecraftforge with this? I can do it manually, but its nice to have an actual init script + screen setup for it.

to use forge with it you need to place the forge jar in /srv/minecraft and execute *it*, not minecraft_server.jar, with java.

Anonymous comment on 2013-06-27 10:11

@narical @SirPenguins It works fine to use anything-sync-daemon for keeping your world on a ramdisk.

*However*, this breaks the 'minecraftctl backup' command because by default tar doesn't follow symlinks and so you get tarball consisting of your server jar and the symlink asd creates. This is trivial to fix by adding the -h switch to the tar commands in the minecraftctl switch, and shouldn't break anything for non-users of asd, since it's hard to imagine a scenario where you wouldn't want the backup script to follow symlinks inside your world folder.

SirPenguins commented on 2013-06-04 16:17

@kd0bpv -- MCUSER is used by minecraftctl, as minecraftctl also sources that conf file.

Regardless, it makes sense to change the invocation. I'll get to it soon.

kd0bpv commented on 2013-06-04 16:05

@SirPenquins -- I noticed you set a variable in conf.minecraft called MCUSER, but then it's never used. Might I suggest changing the launch line in minecraftd to the following?

screen -dmS minecraft su ${MCUSER} -c "PATH=/opt/java/bin/:/usr/bin/:$PATH java -Xmx${MAXHEAP} -Xms${MINHEAP} -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=${THREADS} -XX:+AggressiveOpts -jar ${_SRVDIR}/${SERVERJAR} nogui"

I suspect that was the original intent of that variable. Otherwise, the variable is just a waste (granted, a small one) of memory. I have made this change and it works perfectly on my system.

SirPenguins commented on 2013-06-03 14:53

@narical -- I will try to add a ram-specific service file after I resolve the /usr/bin merge problems

@UnsolvedCypher -- minecraftd-diag will source /etc/conf.d/minecraft, su to user 'minecraft', and then run the jar with the same options the systemd service file would use. It's there to see what errors are occurring on the console since when invoked with screen the minecraft jar will just exit without leaving a log.
If you want to run the jar yourself, do this:
su minecraft
cd ~minecraft
java -jar minecraft_server.jar

@unikum -- There was a bug in the install script that deleted /usr/bin/minecraftd. It's been resolved and the working version has been uploaded. Grab the newest version and reinstall.

artemklevtsov commented on 2013-06-03 13:24

After last system updated I get:
ls -l /usr/bin/minecraftd
ls: cannot access /usr/bin/minecraftd: No such file or directory
I tried reinstall this package but it don't help.

artemklevtsov commented on 2013-06-03 13:18

Please read this -

UnsolvedCypher commented on 2013-05-24 22:45

What is the command to run the jar file? minecraftd-diag used to do this, but now it does something different.

narical commented on 2013-05-23 20:37

It's works perfectly in my case )

narical commented on 2013-05-23 20:10

Take a look:

narical commented on 2013-05-23 20:02

I'm just using old initscript for managing MC-server which supports RAM very well, I can share it

SirPenguins commented on 2013-05-21 14:45

Not at the moment, but that's a great idea! I'll see if I can get a solid one implemented via systemd service files at some point.

narical commented on 2013-05-21 06:00

Does this script suppors RAM-disk?

narical commented on 2013-05-21 05:59

Does this script suppors RAM-disk?

SirPenguins commented on 2013-05-06 15:30

Not sure why I removed minecraftd-diag, but it's there now. It runs the minecraft server without screen so if your systemd service is failing silently, you can just run /usr/sbin/minecraftd-diag to find out why.

Also, I finally patched minecraftctl. Sorry about the long delay!

SirPenguins commented on 2013-05-03 16:33

Bumped to new version. Sorry for the delay.

dumbhat commented on 2013-05-02 20:50

Minecraft now 1.5.2, md5sum: c4e1bf89e834bd3670c7bf8f13874bc6

dumbhat commented on 2013-05-02 20:50

Minecraft now 1.5.1, md5sum: c4e1bf89e834bd3670c7bf8f13874bc6

SirPenguins commented on 2013-04-15 18:41

What gives you the impression it runs as root?
It runs as user 'minecraft'.

hobarrera commented on 2013-04-02 09:23

Minecraft server SHOULD NOT run as root. There's no valid reason to run it as root.

Kakashi-sensei commented on 2013-03-27 15:04


Anonymous comment on 2013-03-26 07:16

To get this working, the md5sum on line 23 in the PKGBUILD, must be changed to:

Kakashi-sensei commented on 2013-03-22 09:51

Minecraft updated to 1.5.1.
minecraft_server.jar - 9d31b969c3f197a1d40381d5620717ea

ImNtReal commented on 2013-03-14 13:09

@pepijndevos yes.

pepijndevos commented on 2013-03-14 12:16

There was a minecraft-server-systemd, have these been merged? As the other one is gone.

pepijndevos commented on 2013-03-14 12:16

There was a minecraft-server-systemd, have these been merged? As the other one is gone.

pepijndevos commented on 2013-03-14 12:16

There was a minecraft-server-systemd, have these been merged? As the other one is gone.

pepijndevos commented on 2013-03-14 12:16

There was a minecraft-server-systemd, have these been merged? As the other one is gone.

pepijndevos commented on 2013-03-14 12:16

There was a minecraft-server-systemd, have these been merged? As the other one is gone.

pepijndevos commented on 2013-03-14 12:16

There was a minecraft-server-systemd, have these been merged? As the other one is gone.

pepijndevos commented on 2013-03-14 12:15

There was a minecraft-server-systemd, have these been merged? As the other one is gone.

SirPenguins commented on 2013-02-26 22:00

@iscrow -- I will add the patch in a few
@C5OK5Y -- No other init systems are officially supported on arch. However, since systemd has been moved to base, I will remove the dependency.

C5OK5Y commented on 2013-02-26 21:46

I think that systemd shouldn't be in the dependencies because it isn't actually required to use the Minecraft server.

Anonymous comment on 2013-01-29 20:58

There is an error in minecraftctl. When it's called with status, it uses a variable $USERNAME which is never defined. I'm guessing this should be $MCUSER in stead of $USERNAME. Here's a patch:

--- /usr/sbin/minecraftctl.orig 2013-01-29 15:50:42.246738928 -0500
+++ /usr/sbin/minecraftctl 2013-01-29 15:50:59.270077368 -0500
@@ -96,7 +96,7 @@
- if pgrep -u $USERNAME -f $SERVICE > /dev/null
+ if pgrep -u $MCUSER -f $SERVICE > /dev/null
echo "$SERVICE is running."

SirPenguins commented on 2013-01-14 21:28

To start minecraft server:
~ # systemctl start minecraftd
To run minecraft server automatically upon bringing up the system:
~ # systemctl enable minecraftd

To look at minecraft console:
~ # screen -r minecraft

If there is no active screen session running (check to see if any processes are attached to the service with `systemctl status minecraft`) then minecraft exited with an error. cd to /srv/minecraft and run /usr/sbin/minecraftd-diag to see what's going wrong.

SirPenguins commented on 2013-01-14 21:26

@UnsolvedCypher -- Sure! I've added /usr/sbin/minecraftd-diag which will do the same thing as minecraft-server used to. I've renamed it to prevent confusing people who don't read comments. :)

SirPenguins commented on 2013-01-14 21:20

To start minecraft server:
~ # systemctl start minecraftd
To run minecraft server automatically upon bringing up the system:
~ # systemctl enable minecraftd

To look at minecraft console:
~ # screen -r minecraft

If there is no active screen session running (check to see if any processes are attached to the service with `systemctl status minecraft`, then minecraft exited with an error. Run the invocation in /usr/sbin/minecraftd to see what went wrong.

UnsolvedCypher commented on 2013-01-14 21:18

Could we possible retain the minecraft-server command from the old package, which launches the server in the current directory with a GUI?

Anonymous comment on 2013-01-14 21:17

I'm massively retarded, how do I run this now? minecraftd seems to work but screen -r minecraft doesn't?
Eh, I'll download the Jar ¬.¬

SirPenguins commented on 2013-01-12 17:45

~ $ echo $JAVA_HOME
~ $ which java

... Doesn't seem like it. I'd just append "PATH=/opt/java/jre/bin:/usr/bin/java:$PATH" to the java command.

ImNtReal commented on 2013-01-12 02:34

Would it be better to use $JAVA_HOME?

Refutationalist commented on 2013-01-12 02:31

That was it. I'm running an oracle JRE, so my java sits in /opt/java/jre/bin. Added it to the path and away it went.

If you add minecraftctl to the package, I'd be happy to update the wiki about it. Thanks!

SirPenguins commented on 2013-01-12 02:07

Where is java in your $PATH? Is that present in the $PATH systemd uses when running the ExecStart directive? A root shell will have a different environment than what systemd has.

I like the patch. Thank you for catching the chown order mixup!
We should get info about minecraftctl into the wiki page.

I will modify the package as soon as I can -- most likely tomorrow.

Refutationalist commented on 2013-01-12 01:59

Also, as it stands systemd won't start /usr/bin/minecraftd, but running it by hand works fine. Don't know why, looking into it.

Refutationalist commented on 2013-01-12 01:55


Sort of got started on that in this patch:

It creates a /etc/conf.d/minecraft and a /usr/bin/minecraftctl which I adapted from the generic init script-- I wanted automated backups and the ability to run server commands from a shell. It'll make backups in /src/minecraft/backup.

I also changed the install file so the log file is touched before the chown, so the minecraft server has write access to the log file on startup. Even if you don't use my patch, you might want to make that change to the install file.

SirPenguins commented on 2013-01-11 16:45

It's finally working, sorry. I changed /usr/bin/minecraftd to include both paths to java for the oracle java and openjdk. This package should work for everyone now.

Sorry about the wait!

In the future this package will forgo /usr/bin/minecraftd for a pure systemd invocation that sources /etc/conf.d/minecraft. I'll comment here when I make this update.

ImNtReal commented on 2013-01-10 03:57

Thanks. I didn't change the service file, but I did have to change /usr/bin/minecraftd to

SirPenguins commented on 2013-01-10 02:39

Okay, I have spent hours trying to get my old systemd package to work. I don't know what's wrong with it.

For now, you can see what it used to be at

I will return tomorrow. I've spent a few hours this already. Sorry for the inconvenience.

SirPenguins commented on 2013-01-10 01:14

gtmanfred has been complaining at me to re-write the systemd service file.

I'm almost done. I'm testing things now. Shouldn't be more than 15 minutes, hopefully...

ImNtReal commented on 2013-01-10 01:13

How long will it take to get the systemd unit back in here? I made the mistake of switching to this package before checking.

gtmanfred commented on 2013-01-10 00:23

merging to minecraft-server

UnsolvedCypher commented on 2013-01-10 00:15


SirPenguins commented on 2013-01-10 00:14

Sure, that'll work fine. Thanks!

UnsolvedCypher commented on 2013-01-10 00:04

@SirPenguins, that sounds good. I don't believe that my package is even necessary in the first place, I believe people are only using it because of the name. Would you like me to disown this package and let you adopt it?

SirPenguins commented on 2013-01-10 00:01

Hey UnsolvedCypher, I'm the maintainer of minecraft-server-systemd! Are you open to having this package become minecraft-server-rc / minecraft-server-legacy and my package becoming minecraft-server?

I ask this because initscripts are no longer supported on arch, and systemd is the default. Seems weird to me to have the offshoot package be the one more compatible with the main system.

UnsolvedCypher commented on 2013-01-09 22:36

@Kakashi-sensei, thanks, I've updated it.

SirPenguins commented on 2013-01-09 15:27

Thank you! Updated.

Kakashi-sensei commented on 2013-01-09 14:36

1.4.7 is released.
f69ac4bfce2dfbce03fe872518f75a05 minecraft_server.jar

Kakashi-sensei commented on 2013-01-09 14:36

1.4.7 is released.
f69ac4bfce2dfbce03fe872518f75a05 minecraft_server.jar

Anonymous comment on 2012-12-25 03:38

If I start with "systemctl start mincraftd", it launch and close at the same time.
Dec 25 02:03:22 JPSV su[2318]: (to minecraft) root on /dev/pts/3
Dec 25 02:03:22 JPSV su[2318]: pam_unix(su:session): session opened for user minecraft by (uid=0)
Dec 25 02:03:29 JPSV su[2318]: pam_unix(su:session): session closed for user minecraft

But I manually launch "minecraftd", it works.
Dec 25 02:04:42 JPSV su[2361]: (to minecraft) root on /dev/pts/3
Dec 25 02:04:42 JPSV su[2361]: pam_unix(su:session): session opened for user minecraft by (uid=0)

how to solve this problem?

UnsolvedCypher commented on 2012-12-23 04:54

@Kent, I have done this, thank you for the suggestion. I am the new maintainer, so if you have any other suggestions, I am here.

SirPenguins commented on 2012-11-27 15:09

There are other differences between this package and the minecraft-server package, most notably the ability to monitor the minecraft console with screen.
There's nothing stopping you from just downloading the service file and using it with the minecraft-server package, though you'll need to make some changes if you want to set up the minecraft console as that package does. :)

Synthead commented on 2012-11-26 21:44

The systemd capabilities of this should not constitute a new package. minecraft-server should be revised to include systemd .service files instead.

khampf commented on 2012-11-22 14:48

Updated PKGBUILD at for 1.4.5 (there's only been client-side changes since 1.4.4 but the version bump has rendered the PKGBUILD unusable as the checksum has changed)

coldcontrol commented on 2012-11-14 17:37

Minecraft bumped to 1.4.4:

Anonymous comment on 2012-11-02 19:25

Why not change the download location to Minecraft's CDN? In case the website is down.

SirPenguins commented on 2012-10-29 14:25

Bumped it to 1.4.2
Sorry it took so long, the AUR was down and right when it came back up Hurricane Sandy hit my area.

ImNtReal commented on 2012-10-26 16:26

All it needs is a version bump.

Anonymous comment on 2012-09-30 01:31

I recommend the download location be changed to Minecraft's CDN, since the official website tends to go offline rather often... eg. a the time of writing this. :P
Official CDN here:
Can be confirmed here:

Anonymous comment on 2012-08-23 05:20

I will look into including a systemd service script to my package.

SirPenguins commented on 2012-08-17 16:53

I would rather not. My package uses screen as the monitor for the server console, his package uses something else.
You're always welcome to include the systemd service files in this package, but I prefer to implement my server with screen. :)

artemklevtsov commented on 2012-08-17 07:38

May be merge this package with minecraft-server-systemd?

SirPenguins commented on 2012-08-10 23:57

No particular reason. I've updated the dependencies now. Thanks! :)

Anonymous comment on 2012-08-10 23:47

Is there a reason that this package depends on java-runtime, and not just java-runtime-headless? The minecraft server runs fine with java-runtime-headless installed.

Anonymous comment on 2012-08-03 17:53

Package updated to 1.3.1. Enjoy.

JonnyJD commented on 2012-08-02 16:49

For 1.3.1 the expected strings changed and on "stop" everything gets saved automatically.

So my proposed expect script would be:

_expectScript=$(cat << EOS
spawn attachtty "$_runDir/socket"
send "stop\r"
expect "Stopping server"
expect {
"Stopping server" {
exit 0
default {
exit 1

example log (10s gap due to old expect script):
2012-08-02 18:05:20 [INFO] Saving...
2012-08-02 18:05:20 [INFO] Saved the world
2012-08-02 18:05:30 [INFO] Stopping the server
2012-08-02 18:05:30 [INFO] Stopping server
2012-08-02 18:05:30 [INFO] Saving players
2012-08-02 18:05:30 [INFO] Saving worlds
2012-08-02 18:05:30 [INFO] Saving chunks for level 'mult10final'/xd@97919f6
2012-08-02 18:05:30 [INFO] Saving chunks for level 'mult10final'/xc@6d976a55
2012-08-02 18:05:30 [INFO] Saving chunks for level 'mult10final'/xe@6fc62aa8
2012-08-02 18:05:30 [INFO] Stopping server

log with my expect script:
2012-08-02 18:44:47 [INFO] Stopping the server
2012-08-02 18:44:47 [INFO] Stopping server
2012-08-02 18:44:47 [INFO] Saving players
2012-08-02 18:44:47 [INFO] Saving worlds
2012-08-02 18:44:47 [INFO] Saving chunks for level 'mult10final'/xd@c5f468
2012-08-02 18:44:47 [INFO] Saving chunks for level 'mult10final'/xc@3eb52a28
2012-08-02 18:44:47 [INFO] Saving chunks for level 'mult10final'/xe@67e2c841
2012-08-02 18:44:47 [INFO] Stopping server

Yes. "Stopping server" has to be expected twice.

artemklevtsov commented on 2012-07-05 06:02

@Luigi_Panache: sorry for that, but it's effectively that post omments:)

SirPenguins commented on 2012-07-05 03:58

Updated, but please only use the Out-Of-Date flag for when there is a new software version, not for when there is improper packaging convention.

artemklevtsov commented on 2012-07-04 10:51

Service file should be in /usr/lib/systemd/system/
Update package please.

dvzrv commented on 2012-05-26 23:57

The unit file should be installed to /usr/lib/systemd/system
This is the default directory for unit files now.

SirPenguins commented on 2012-04-10 04:23

Yes, there certainly is. Besides the usual piping of the program, it is also possible to simply symlink /srv/minecraft/server.log to /var/log/minecraft.log (unless there's something bad about that practice that I don't know about.)
I plan to include that in the next revision of the package, just for you. :)

zosodk69 commented on 2012-04-09 21:08

Sir, one of the things I like about the minecraft-server package is the ability to log server output to a file under /var/log. Is there any way of achieving that behavior through the systemd package?

JonnyJD commented on 2012-04-07 08:30

What I did try to tell: Having a default and using the timeout are different things. If you want to wait for the timeout in case "Save complete" is not found, don't use a default. The default will match for everything, right away. The timeout will jump in when nothing "expected" (not even a default) is found after 10 seconds.

Anonymous comment on 2012-04-05 08:30

I did some testing and it does seem that most of the times expect misses the "Save complete.$" case and falls back to the default case.
"Save complete." without $ seems to work every time.
The default case is intended to shut down the server in case of a save-all failure (after a 10s timeout).

JonnyJD commented on 2012-04-05 00:49

expect {
"Save complete.$" {
exit [exitServer]
default {
exit [exitServer]

Doesn't wait for "Save complete" at all. It will exit right after it gets "Forcing save.." due to the default. Please skip the default. If Save complete is not matched expect will go on 10 seconds later.

However I only got "Save complete." to work (without $). Something about expect not beeing line based, I guess.

This is not that bad because exitServer does expect "Saving Chunks", but then having expect at all after "save-all" doesn't help.

yochaigal commented on 2012-04-04 23:45

Seems like md5sum has changed to 5f078323c2d661b8d9773c8242d912c3

scjudd commented on 2012-03-22 17:55

Here is the new md5sum for minecraft_server.jar: '6524b7299b1717ffb6e2b38f171568d0' :)

sjakub commented on 2012-03-22 04:30

It works now, it wasn't working before. It looks like jre package has been updated without changing the release version :/

Anonymous comment on 2012-03-21 07:13

You're wrong sjakub.
For Java 7, jre7-openjdk (which provides java-runtime) depends on jre7-openjdk-headless (which provides java-runtime-headless, but not java-runtime).
For Java 6, openjdk6 provides both java-runtime and java-runtime-headless.
A quick look at the AUR also tells me that both jre and jre6 packages should work fine.

sjakub commented on 2012-03-18 21:36

The requirement for java-runtime-headless is silly. It means this cannot be installed with regular jre.
It should simply depend on java-runtime, which is provided by both headless and regular jre.

Anonymous comment on 2012-03-12 10:27

@Sacro: fixed in 1.2.3-2

Sacro commented on 2012-03-10 12:47

Any chance the next version can rely on java-runtime-headless, means you don't need all of the Xorg requirements.

Anonymous comment on 2012-03-01 14:51

For 1.2 change the first md5sum to a97d6de0c414b292076b0a75a98c070b and it appears to work.

Anonymous comment on 2012-01-12 17:14

For 1.1 change the first md5sum to b0f4fb91f9723104adf35944bbf3d3cf and it appears to work.

zosodk69 commented on 2011-12-17 12:47

Perfect! I can now delegate minecraft server administration without giving root access. Thanks!

Anonymous comment on 2011-12-17 08:50

@zosodk69: please try 1.0.1-2

zosodk69 commented on 2011-12-16 14:14

This really is the most elegant minecraft server script I've seen. A couple of modifications that I'd recommend:

The socket (/var/run/minecraft-server), which is chmod 700 should be 770 so members of the minecraft group can administer the server.

The logs under /var/log/minecraft-server, should be chmod 750 and chgrp log, which seems to be the convention in archlinux.

Anonymous comment on 2011-12-15 09:31

@MessedUpHare: Yes when you execute minecraft-server it stores its data into the current working directory.
But be careful though because your modification breaks the rc script.

MessedUpHare commented on 2011-12-15 08:51

Works nicely - my only modification has been to add the following to /usr/bin/minecraft-server before execution:
cd $HOME/.minecraft-server
This prevents it from making a mess of your home directory

SirPenguins commented on 2011-12-15 02:27

If you are looking to run a CanaryMod server instead of an official Minecraft server, my aur/minecraft-canary package will handle the custom server exactly like this package does.

SirPenguins commented on 2011-12-15 00:46

I've sort of semi-forked this package in minecraft-server-systemd. It uses screen instead of attachtty, and it supports only systemd, not the regular rc init system. I borrowed parts of minecraft-server.install in my package. If anyone's looking for a systemd version of this package, it's out now.

Anonymous comment on 2011-11-04 09:12

So, just to be clear, I will not package versions of the server that are not compatible with the current version of the client available through the autoupdate feature, that means no prerelease versions.
The next version of the package will most likely be the "final" 1.0 release.

Zom commented on 2011-10-30 10:18

Comment by: fleger on Fri, 23 Sep 2011 17:09:58 +0000
@zachtib: I will wait for the final beta 1.9 release to update this package since clients are not automatically updated.
Feel free to post your own package if you want the latest pre-release.

killermoehre commented on 2011-10-30 09:35

Server 1.9 pre 5 is out

Anonymous comment on 2011-10-27 10:53

Thanks. I'm glad you like it.

Synthead commented on 2011-10-27 01:25

Love it! I must say, this is a really clean package. Any faults with needing console access and strange java dependencies are really elegant. The way expect in the "stop" part of the rc.d script is definitely appropriate too since I think all of us have seen some data loss with a Minecraft server. Excellent work!

Synthead commented on 2011-10-27 01:24

Love it! I must say, this is a really clean package. Any faults with needing console access and strange java dependencies are really elegant. Excellent work!

Anonymous comment on 2011-10-24 07:27

@Synthead: done in beta_1.8.1-3.

Synthead commented on 2011-10-23 18:55

Might be a good idea to say in the .install to Ctrl+\ out of attachtty so people don't accidentally Ctrl+C the server like I did! :)

Anonymous comment on 2011-09-23 17:09

@zachtib: I will wait for the final beta 1.9 release to update this package since clients are not automatically updated.
Feel free to post your own package if you want the latest pre-release.

zachtib commented on 2011-09-22 15:03

jeb_ just tweeted a link to the 1.9 prerelease

Anonymous comment on 2011-09-20 16:28

@JonnyJD: patch added in beta_1.8.1-2

JonnyJD commented on 2011-09-20 09:43

You should not rely on anything being in "/var/run" after a reboot.

My proposed change (which works on my system where I flush /var/run on reboot):

--- minecraft-server-rc.old 2011-09-20 11:13:09.000000000 +0200
+++ minecraft-server-rc 2011-09-20 11:34:51.000000000 +0200
@@ -12,6 +12,10 @@
stat_busy "Starting minecraft-server"
if [[ ! -f "$_runDir/" ]]; then
cd "$_srvDir"
+ if [[ ! -d "$_runDir" ]]; then
+ mkdir "$_runDir"
+ chown minecraft:minecraft "$_runDir"
+ fi
su minecraft -c "source /etc/profile && detachtty --dribble-file $_logDir/server_stdout.log --log-file $_logDir/detachtty.log --pid-file $_runDir/ $_runDir/socket /usr/bin/minecraft-server nogui" &&
add_daemon minecraft-server &&
stat_done || stat_fail

sonny commented on 2011-09-18 10:56

I prefer using attachtty too since it's a more generic solution.

sonny commented on 2011-09-18 10:56

I prefere using attachtty too since it's a more generic solution.

Zom commented on 2011-09-17 19:27

@yochaigal: The problem with using screen like that is that it doesn't work. You wouldn't be able to attach the screen afterwards, AFAIK.

yochaigal commented on 2011-09-17 18:05

thanks for this - I would also prefer screen rather than using attachtty.

pyropeter commented on 2011-09-14 14:08

1.8.0 is out (md5sum is d3dd75cccaa75b1df1401cc4e76a34d5 )

Anonymous comment on 2011-07-29 05:26

I will look at it.

Schnouki commented on 2011-07-27 12:13

Hi. I have some problems with the current rc script:
- ck_daemon is not a reliable way of testing if the server is running: if it crashed or was killed by hand, it simply fails
- there is currently no way of accessing the server console, which can be useful (e.g. for doing backups, save-off, save-all, do your backup, save-on)

So I wrote a new one, based on It runs minecraft-server using screen, which makes it possible to send commands to the server from a script, and detects if the server is actually running with pidof. Here it is:
Please give it a try and feel free to put it in your package if it works fine for you! (don't forget to add screen to depends then :))

voxel commented on 2011-07-08 09:03

1.7.3 is out.

Anonymous comment on 2011-07-01 13:09

1.7.2 is out, MD5 is '74376a139f932b9fcfc6caea6702a362'

sakisds commented on 2011-06-30 14:50

1.7_01 is out (fixed a lot of bugs with 1.7), MD5 is 'b4b2e473ceb525026ba205642b8d9165'.

cgirard commented on 2011-06-30 14:00

1.7 is out : '5d685dd54fb4ba4a05fc20dea806e2c0'

sakisds commented on 2011-05-31 13:16

1.6.6 is out, MD5 is 0563ccb08d4dc84634d561b7f4bea596.

voxel commented on 2011-05-28 20:32

1.6.5 is out.

voxel commented on 2011-05-28 20:25

1.6.5 is out.

Anonymous comment on 2011-05-26 23:43

md5 for 1.6: cbde8d4ef59494f488c472b33e711491

sonny commented on 2011-05-26 19:25

Beta 1.6 has been release.

Anonymous comment on 2011-04-20 14:39

Latest for 1.5_02: edbcec2e58bd5a03954ba7d745dee604

WorMzy commented on 2011-04-19 14:57

New md5 for minecraft-server.jar = 3e20218300c995effa5b1fdd3b9c74e2

Anonymous comment on 2011-04-12 07:50

You're welcome.

sorcix commented on 2011-04-11 19:55

@fleger: Thanks for taking over! I knew there would be someone to give this package a bit more love. :)

Anonymous comment on 2011-04-11 16:44

orlandu63's suggestion implemented: added minecraft user/group.

Anonymous comment on 2011-04-11 15:38

Package adopted, tweaked and updated.

Anonymous comment on 2011-04-01 07:06

You should reset pkgrel to 1 with each new upstream release.
But thanks for this great package!

sorcix commented on 2011-03-31 16:54

Updated to minecraft 1.4

sorcix commented on 2011-03-26 12:46

Ops can issue commands in-game. Or you could start minecraft-server in screen.

Anonymous comment on 2011-03-26 12:43

Sorry for my ignorance. When running as a daemon is it possible to attach to the session so you can issue minecraft commands, etc?

Anonymous comment on 2011-03-02 15:48

Suggestion: Add a minecraft user/group that will run the daemon, for security reasons.

sorcix commented on 2011-02-23 20:16

Updated to beta 1.3 (see

Also replaced the original RC script with the one provided by desearcher.

cgirard commented on 2011-02-22 20:37

New md5sum for the jar: fd341dccafa8c1f5fb851505524151f5

Anonymous comment on 2011-02-19 03:04

I propose this re-write of the rc script, as the original wasn't properly closing the server for me:

cgirard commented on 2011-01-18 22:36

There is this [1] script that could help to think about some alternative.
Right now with your script, the script that launch minecraft is killed but not minecraft-server itself.


Anonymous comment on 2011-01-14 18:36

Neither am I. I just added a "sleep 10" in the start part :p. It's a hack but it works.

sorcix commented on 2011-01-14 17:40

The script should handle that crash though. I'm not good at writing shell scripts, but I'll try to handle that.

Anonymous comment on 2011-01-14 17:38

That's a great point. I use wicd, so the connection probably isn't up by the time the minecraft script starts.

sorcix commented on 2011-01-14 16:34

Hardrive, looks like the server crashes then.

Are you sure your network connection is up when it starts using rc.conf?

(Updated to 1.2_01)

Anonymous comment on 2010-12-25 06:06

The rc script works fine if I manually call it once the system is booted. However, if I put it into DAEMONS in my rc.conf, the script does not work. It says that it's starting the server and shows DONE, and it event creates a pid file in /var/run/, but it doesn't actually start the server. This then puts the script into a weird state because it always fails to kill the pid, so all operations (start, stop, restart) fail from this point on.

Is anybody else seeing this behavior? I'm not skilled enough in bash to figure out what's going on.

sorcix commented on 2010-12-21 06:33

Updated to 1.0 beta

sorcix commented on 2010-12-03 21:05

Updated to server 0.2.8:

sorcix commented on 2010-11-30 19:19

Updated server