Package Details: minecraft-server 1.12.2-3

Git Clone URL: https://aur.archlinux.org/minecraft-server.git (read-only)
Package Base: minecraft-server
Description: Minecraft server unit files, script, and jar
Upstream URL: https://minecraft.net/
Keywords: bash minecraft official script server
Licenses: custom
Conflicts: minecraft-canary, minecraft-server-systemd
Submitter: sorcix
Maintainer: edh
Last Packager: edh
Votes: 126
Popularity: 0.592811
First Submitted: 2010-11-29 15:52
Last Updated: 2018-06-14 18:58

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)

[1] https://wiki.archlinux.org/index.php/Minecraft#Setup
[2] https://wiki.archlinux.org/index.php/GNU_Screen#Common_Commands

Latest Comments

edh commented on 2018-06-14 18:44

@Aentfs Hmmm, fair point. Though this would probably not work in conjunction with using it in the After directive which apparently is required to make the service start after all users were made available. This problem has been outlined by @fennectech in the comment section of the spigot AUR package.

Aentfs commented on 2018-06-12 17:50

You might want to add the WantedBy line back, as otherwise the service can't be enabled. (And therfore won't be started after a reboot)

edh commented on 2017-10-03 11:12

@BubuIIC
Sorry for the inconvenience. The name change was introduced after a bug related to selecting screen sessions. Upon an upgrade via pacman a warning that a new configuration file is available should have been triggered and according to the Arch Linux policies the pacman output ought to be carefully watched.
However I do understand your frustration. To be honest I do not grasp why I chose to expose this variable either. Though removing it now and thereby requiring an additional configuration merge would not really be a got solution IMHO.

BubuIIC commented on 2017-10-02 17:24

Not sure what is happening but I can't get the idle server functionality to work. (it did work quite a while ago, only tried again now.)

I always get this in the console log:
Server is going down... timed out
An error occurred while trying to reset the idle_server!
Netcat: Connection from x.y.z.a
<host.name>��
A screen minecraft session is already running. Please close it first.

@edh, any ideas?

Edit: Some additional info:
* normal stop works as expected, only the idle stop seems to time-out
* This is the output I get when running minecraftd status when the server is idle, this looks weird, not sure if it's releated:

Idle server daemon status: running
Status: running
Number of processes = 0 (screen, bash, -2 x server)
Total memory usage = 0 MB

Edit2: OK, it works after changing the session name for the idle server according to the new config template... that was a bit painful to hunt down. Does this really need to be a variable in the config file?

edh commented on 2017-07-24 17:40

@Avatar
Thanks for reporting the bug. I just pushed the necessary changes to fix it.
However I chose to solve it using pure bash instead of xargs and find but it should work just as well.

Avatar commented on 2017-07-24 15:36

I am having issues with removal of old backups with "minecraftd backup" when there are more than one file to remove. I replaced the line with the following and it seems to work better:

find "${BACKUP_DEST}" -mindepth 1 -type f | sort | head -n "$(( BACKUP_COUNT - KEEP_BACKUPS ))" | xargs ${SUDO_CMD} rm

edh commented on 2017-06-14 14:54

@dopsi
I read about it but completely forgot to update the dependency array. Sorry about that.

dopsi commented on 2017-06-14 10:09

Since the latest version, the server requires `java-runtime-headless=8` to run (otherwise I get this error : https://stackoverflow.com/questions/43911553/minecraft-1-12-server-does-not-start-linux-external-server)

edh commented on 2017-04-15 16:01

Upstream only provides a jar file which by default starts a GUI instead of running as a daemon. Personally I think passing down merely a file would provide an unusable package.
Hence I think of the script to be similar to providing a SystemD service where upstream does not. Admittedly the script is lengthier than an ordinary service but the core functionality is the same: start, stop, restart. Despite not feeling comfortable rating its 'Arch-ness' in percent, I still think it complies with the Arch principles.
Merely providing a service without a script would still work but would deny users to connect to the console etc. and thereby limit the original version which is provided upstream. I do not demand that you agree to my reasoning but I hope that you might understand why I chose to keep and enhance the script.

To be honest I though people would care more about the placement in /srv since strictly speaking this is not recommended.

All in all, it seems that the consensus is to keep (respectively tolerate) the script and leave things at /srv.

sorcix commented on 2017-04-15 14:58

Adding scripts that change the way you have to handle a service is not "100% Arch Way". The Arch way is to provide clean packages that resemble upstream. This package makes it harder to manage minecraft servers using configuration management like Ansible, as it works completely different compared to other distro's. (It's required to add an additional service unit, for example, as the default one uses the script.)

Using /srv looks fine according to Arch standards.

@edh: The script was added by a maintainer after me. That said, I don't care about being there, I have worked around it on my servers. But if someone declares this "100% Arch Way" I feel the need to point out that someone is wrong on the internet. ;-)

All comments