This GitLab repository provides a simple bash script for setting up a Minecraft server using PaperMC on a Linux system. The script automates the process of installing Java, creating a dedicated Minecraft user, downloading PaperMC, and setting up a systemd service for easy server management.
- This script is designed to run on a Linux system with
systemd
(e.g., Ubuntu). - Ensure you have root privileges or run the script with
sudo
.
- Clone this repository or download the script directly.
git clone https://github.com/crimewaffle/minecraft-installer.git
cd minecraft-installer
- Make the script executable.
chmod +x installer.sh
- Run the script.
./installer.sh
The script performs the following steps:
- Checks if the script is run as root.
- Updates the system and installs Java (OpenJDK 17).
- Creates a dedicated Minecraft user (
minecraft
) and adjusts permissions on the Minecraft directory. - Downloads the specified version of PaperMC.
- Creates a systemd service for managing the Minecraft server.
- You can customize the Minecraft version by modifying the download link in the script.
- Adjust the
minecraft.service
file if you need to change server configurations.
After running the script, the server is ready to use. Additional instructions are provided upon completion:
- Start the server using:
sudo systemctl start minecraft
- Enable automatic startup at boot:
sudo systemctl enable minecraft
Thank you for using this script! Feel free to contribute to the repository or report any issues.
If you have any questions or need assistance, please open an issue.
Happy Minecrafting! 🎮