Systemd unit files for use with the Minecraft Server and associated services (backup and stats).
This repository has been archived on 2024-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Adam Douglas bb2d1c061b docs: add contributing guidelines 2020-02-07 13:58:54 -06:00
CHANGELOG.md docs: add new entries 2020-02-07 13:58:09 -06:00
CONTRIBUTING.md docs: add contributing guidelines 2020-02-07 13:58:54 -06:00
LICENSE docs: add changelog, license and readme 2020-02-06 22:41:06 -06:00
README.md docs: add license reference 2020-02-07 10:39:28 -06:00
minecraft-backup.service refacotr: clean up 2020-02-06 21:39:09 -06:00
minecraft-backup.timer Initial commit 2020-01-03 03:02:28 +00:00
minecraft-paper.service feat: add unit 2020-02-06 21:35:06 -06:00
minecraft-spigot.service feat: add unit 2020-02-06 21:35:06 -06:00
minecraft-stats.service refactor: change description to be more descriptive 2020-02-06 21:47:29 -06:00
minecraft-stats.timer refacotr: clean up 2020-02-06 21:39:09 -06:00
minecraft-vanilla.service feat: add unit 2020-02-06 21:35:06 -06:00

README.md

What Is Minecraft Server Systemd Services?

Systemd unit files for use with the Minecraft Server and associated services (backup and stats).

Features

  • Supports use with Minecraft server software PaperMC, SpigotMC and Vanilla.
  • Backup the Minecraft server directory.
    • To an archive.
    • Sync to a desired destination.
  • Keep MinecraftStats data synced.

System Requirements

Installation

Assumptions

  • Installed all required dependencies as stated in System Requirements section.
  • Dependencies are accessible via environment PATH.
  • Installation is done via Linux CLI.
  • Steps prefixed with a "$" (dollar sign) represents the CLI prompt. The text after the "$" is to be entered at the CLI.
  • Steps prefixed with a "#" (number sign) represents the CLI prompt with elevated user permissions (e.g. root). The text after the "#" is to be entered at the CLI.
  • A single backslash character beside another character is used to escape the proceeding character. In this case backslash character is not to to be entered at the CLI.
  • These instructions are an example of installation and configuration.

On Linux - Manual

  1. Change to your home directory.
    $ cd ~
    
  2. Download the project.
    $ git clone git@gitlab.com:adouglas/minecraft-systemd-services.git
    
  3. Change to the project directory.
    $ cd minecraft-systemd-services
    
  4. Edit each applicable unit file(s).
    • Ensure paths are correct (ReadWriteDirectories, WorkingDirectory, ExecStart, ExecStop).
    • Ensure timers property "OnUnitActiveSec" (backup interval) is set as desired.
      $ nano minecraft-backup.service
      
  5. Set file permissions.
    $ chmod 644 minecraft-\*
    
  6. Set file ownership and group.
    $ chown root:root minecraft-\*
    
  7. Move Systemd unit files.
    # mv minecraft-\* /etc/systemd/system/
    
    minecraft-backup.service
    minecraft-backup.timer
    minecraft-paper.service
    minecraft-spigot.service
    minecraft-stats.service
    minecraft-stats.timer
    minecraft-vanilla.service
    
  8. Enable services.
    # systemctl enable minecraft-paper.service
    # systemctl enable minecraft-backup.timer
    # systemctl enable minecraft-stats.timer
    

Usage

For an even simpler usage at the CLI run "wardenctl help" without double quotes.

Useful Command Examples

Action Command Example Notes
Reload all unit files systemctl daemon-reload Required after modifying unit file(s).
Restart unit systemctl restart minecraft-paper.service
Start unit systemctl start minecraft-paper.service
Stop unit systemctl stop minecraft-paper.service
View unit status systemctl status minecraft-paper.service
View unit messages journalctl -u minecraft-paper.service
View unit messages journalctl -fu minecraft-paper.service View most recent entries and follow new entries as they occur. Press CTRL-C to quit.

License

Minecraft Server Systemd Services is licensed under the GNU General Public License v3.0. Review the license by viewing the LICENSE file.

Copyright Notice

Copyright (c) 2019-2020 Adam Douglas Some Rights Reserved