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)
Search Criteria
Package Details: minecraft-server 1.21.3-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/minecraft-server.git (read-only, click to copy) |
---|---|
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: | 164 |
Popularity: | 0.070275 |
First Submitted: | 2010-11-29 15:52 (UTC) |
Last Updated: | 2024-10-23 19:51 (UTC) |
Dependencies (8)
- awk (gawk-gitAUR, busybox-coreutilsAUR, gawk)
- bash (bash-devel-static-gitAUR, bash-devel-gitAUR, busybox-coreutilsAUR, bash-gitAUR)
- java-runtime-headless (jre10AUR, jre12AUR, jdk10AUR, jdk10-openj9-binAUR, jdk7AUR, jre7AUR, amazon-corretto-16AUR, jdk16-adoptopenjdkAUR, jdk8-armAUR, liberica-jre-11-binAUR, jdk11-j9-binAUR, jre11-jbr-xdg-headlessAUR, jre16-openjdk-headlessAUR, jre14-openjdk-headlessAUR, jre15AUR, jre14AUR, jre13AUR, jre16AUR, jre18-openjdk-headlessAUR, amazon-corretto-19-binAUR, liberica-jre-11-full-binAUR, jdk13-openjdk-binAUR, liberica-jre-8-full-binAUR, jre-openj9-headlessAUR, jre12-openjdk-headlessAUR, jdk11-dragonwell-standard-binAUR, jdk11-jetbrains-binAUR, zulu-15-binAUR, jdk20-openj9-binAUR, zulu-13-binAUR, jdk8-dragonwell-extended-binAUR, jdk8-dragonwell-standard-binAUR, jdk11-dragonwell-extended-binAUR, jdk17-dragonwell-standard-binAUR, jre11AUR, jdk8-j9-binAUR, jdk7-j9-binAUR, jdk7r1-j9-binAUR, jre13-openjdk-headlessAUR, jre15-openjdk-headlessAUR, jdk8-openj9-binAUR, jre-ltsAUR, microsoft-openjdk-11-binAUR, microsoft-openjdk-17-binAUR, microsoft-openjdk-21-binAUR, liberica-nik-24-full-binAUR, zulu-17-binAUR, zulu-11-binAUR, zulu-8-binAUR, liberica-jdk-17-full-binAUR, liberica-jdk-11-lite-binAUR, liberica-jdk-11-full-binAUR, liberica-jdk-11-binAUR, jre19-openjdk-headlessAUR, jdk17-jetbrains-binAUR, zulu-jdk-fx-binAUR, zing-21-binAUR, zing-8-binAUR, jre17AUR, java-openjdk-binAUR, jre21-zulu-binAUR, amazon-corretto-17AUR, amazon-corretto-21-binAUR, jre17-zulu-binAUR, jdk21-temurinAUR, amazon-corretto-8AUR, amazon-corretto-11AUR, jdk11-temurinAUR, liberica-jdk-full-binAUR, liberica-jdk-21-full-binAUR, liberica-jdk-8-full-binAUR, jdk17-temurinAUR, zulu-21-binAUR, jdk-temurinAUR, jre8AUR, jdk8AUR, zulu-17-fx-binAUR, jdk8-perfAUR, zulu-jre-fx-binAUR, zulu-fx-binAUR, zulu8-fx-binAUR, zulu11-fx-binAUR, zulu17-fx-binAUR, zulu21-fx-binAUR, jdk-openj9-binAUR, jdk11-openj9-binAUR, jdk17-openj9-binAUR, jre-jetbrainsAUR, jre-openjdk-wakefield-headlessAUR, jre-openjdk-wakefieldAUR, jdk-openjdk-wakefieldAUR, jdk21-openj9-binAUR, zulu-23-binAUR, jreAUR, jdkAUR, jdk21-jetbrains-binAUR, java-openjdk-ea-binAUR, jre-zulu-binAUR, jre-zulu-fx-binAUR, jdk21-dragonwell-standard-binAUR, jdk21-dragonwell-extended-binAUR, jdk-openjdk, jdk11-openjdk, jdk17-openjdk, jdk21-openjdk, jre-openjdk, jre-openjdk-headless, jre11-openjdk, jre11-openjdk-headless, jre17-openjdk, jre17-openjdk-headless, jre21-openjdk, jre21-openjdk-headless, jre8-openjdk-headless)
- sed (busybox-coreutilsAUR, sed-gitAUR)
- sudo (fake-sudoAUR, polkit-fakesudoAUR, sudo-gitAUR, doas-sudo-shimAUR, doas-sudo-shim-minimalAUR, sudo-hgAUR, sudo-selinuxAUR, fudo-gitAUR)
- tmux (tmux-tcl-gitAUR, tmux-xdg-gitAUR, tmux-sixel-gitAUR, tmux-gitAUR)
- netcat (nmap-netcatAUR, openbsd-netcat-gitAUR, gnu-netcat-svnAUR, gnu-netcat, openbsd-netcat) (optional) – required in order to suspend an idle server
- tar (tar-gitAUR, busybox-coreutilsAUR) (optional) – needed in order to create world backups
Required by (0)
Sources (2)
Latest Comments
« First ‹ Previous 1 .. 6 7 8 9 10 11 12 13 14 15 16 .. 37 Next › Last »
dopsi commented on 2017-06-14 10:09 (UTC)
edh commented on 2017-04-15 16:01 (UTC)
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 (UTC)
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. ;-)
sowieso commented on 2017-04-13 17:21 (UTC)
In my opinion /srv is totally fine as it is providing a special service via the internet. I wouldn't change that.
As the shell script provides much more features beyond just starting it's obvious that it can not be replaced by systemd. As a service-file is provided to control the shell script, I can't find a problem here. Just see the shell script as the application. 100% Arch Way imho.
As for changing permissions and restarting – I have no strong opinion on it. "The user probably wants this, but it's not the Arch Way (tm) to do it this way." The Arch Way is keep it simple. If there are no technical limitations, this means also keep it simple for the user, not only for the system. Just be sure that there are no untracked files after package removal besides config and /srv/minecraft.
edh commented on 2017-04-13 11:57 (UTC)
Since there seems to be multiple people wanting a more standard package, I will remove the according lines from the install file. Furthermore I would like to discuss whether it makes sense to move the server from /srv [1] to /var/lib [2] simply because /srv is non-standard in Arch.
@sorcix
Please provide constructive feedback instead of referencing an old discussion about sockets. Furthermore I have no idea what your general problem with the script is. It originated from your very own one and has merely been adapted over time.
[1] http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/srv.html
[2] http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html
sorcix commented on 2017-04-13 07:08 (UTC)
This is a horrible package standards-wise anyway, with the whole shell script instead of using systemd properly. If a decent package is important to you, I think you better create an alternative.
edh commented on 2017-04-12 14:51 (UTC)
@Synthead
Though I agree that it probably is not the way most Arch developers do it, I still think it makes sense. Not disabling a service might leave broken symlinks on the filesystem and IMHO it is the job of a packager manager to cleanly remove a package when asked to.
Nevertheless I will do whatever the majority wants to. If people start wandering what is going on, I will remove the according lines.
P.S. the package is "nonstandard" in several ways:
* I remove the minecraft user on un-installation. However you must consider that the ownership of the server root is changed and the user is exclusively used by this package.
* The server root is on /srv which is also unusual. IMHO this is simply where it belongs [1].
No general rule can fit every package and like above I am willing to debate.
[1] http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/srv.html
synthead commented on 2017-04-12 14:07 (UTC)
It's a really bad idea to disable and stop the minecraft-server service in the .install script. The user probably wants this, but it's not the Arch Way (tm) to do it this way.
edh commented on 2017-01-10 15:59 (UTC)
@bronze
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.
[1] https://wiki.archlinux.org/index.php/Minecraft#Server_management_script
bronze commented on 2017-01-10 00:39 (UTC) (edited on 2017-01-10 02:25 (UTC) by bronze)
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?
Pinned Comments
edh commented on 2016-06-18 18:24 (UTC) (edited on 2021-10-02 08:19 (UTC) by edh)
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; ctrl+b also works). This will detach your input from the server console. The attaching and detaching is done with tmux (previously 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/title/Minecraft#Setup [2] https://wiki.archlinux.org/title/Tmux