Package Details: minecraft-server 1.21.3-1

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.119461
First Submitted: 2010-11-29 15:52 (UTC)
Last Updated: 2024-10-23 19:51 (UTC)

Dependencies (8)

Required by (0)

Sources (2)

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

Latest Comments

« First ‹ Previous 1 .. 7 8 9 10 11 12 13 14 15 16 17 .. 37 Next › Last »

edh commented on 2017-01-02 15:04 (UTC) (edited on 2017-01-02 15:22 (UTC) by edh)

@Tmk 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. [1] https://github.com/Edenhofer/abs/tree/master/minecraft-server

Tmk commented on 2017-01-02 12:24 (UTC) (edited on 2017-01-02 14:58 (UTC) by Tmk)

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 (UTC)

@Tmk 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 (UTC)

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? [1] https://imgur.com/PZYdpUG

edh commented on 2016-07-31 10:05 (UTC) (edited on 2016-07-31 10:07 (UTC) by edh)

@leifurhauks 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! [1] https://github.com/Edenhofer/abs/blob/master/minecraft-server/minecraftd.sh#L59

leifurhauks commented on 2016-07-30 00:17 (UTC) (edited on 2016-07-30 00:17 (UTC) by leifurhauks)

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 (UTC)

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. [1] https://www.archlinux.org/news/screen-440-1-unable-to-attach-old-sessions/

edh commented on 2016-06-24 17:21 (UTC)

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 (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

<deleted-account> commented on 2016-06-18 18:16 (UTC)

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