A minecraft server initialize script that allows you to manage multiple servers.
Features
screen, rsync, java
Getting Started
Installing Dependencies
Installing screen & rsync
On Red Hat-based distributions:
yum install screen
yum install rsync
On Debian based systems such as Ubuntu:
apt-get install screen
apt-get install rsync
Installing Java 8
On Red Hat-based distributions:
yum install java
On Debian based systems such as Ubuntu:
apt-get install openjdk-8-jre
apt-get install openjdk-8-jdk
update-alternatives --config java
Enabling MCInitializer
To view all commands do
/etc/init.d/minecraft help
To view all server commands do
/etc/init.d/minecraft SERVER_NAME help
Console Access
Will let you connect to see the servers console
/etc/init.d/minecraft SERVER_NAME screen
To exit console:
Ctrl+A D
Server Status
Will give you a list of all the servers for the user (all servers if root) and their online status.
/etc/init.d/minecraft status
Features
- Create, Delete, Rename, Copy Minecraft Servers
- Allows creation off servers with different ram allocations, cpu cores and jar files.
- Backups off worlds and complete servers into a different location to the servers.
- Server updating for vanilla, and bungeecord servers
- Exclude files and directories from full backup by adding them to "exclude.list"
- WorldEdit compatible backups
- Loading off worlds into system RAM for faster access (reducing lag) ** This requires extra setup inside the server.config you must define a RAM disk ** For more instructions on how to setup a RAM disk, check out tutorials on digital ocean.
- Allows sending off commands to servers via command line
- Uses screens for console access (info below)
- Multi-user support - root controls all servers
screen, rsync, java
Getting Started
Installing Dependencies
Installing screen & rsync
On Red Hat-based distributions:
yum install screen
yum install rsync
On Debian based systems such as Ubuntu:
apt-get install screen
apt-get install rsync
Installing Java 8
On Red Hat-based distributions:
yum install java
On Debian based systems such as Ubuntu:
apt-get install openjdk-8-jre
apt-get install openjdk-8-jdk
update-alternatives --config java
Enabling MCInitializer
- Symlink the minecraft script to /etc/init.d/minecraft
<i>sudo ln -s ~/mcinitializer/minecraft /etc/init.d/minecraft</i>
Set the correct permissions on the minecraft script
<i>chmod 755 ~/mcinitializer/minecraft</i>
Finally, update rc.d to start the servers when the system starts
<i>sudo update-rc.d minecraft defaults</i>
- Edit the variables in config.example once done, rename it to config
- Edit crontab
As the server user you're running the script as:
<i>crontab -e</i>
Add these lines:
<i>#m h dom mon dow command
54 0,11 * * * /etc/init.d/minecraft say 'Server restart in 5 minutes!'
58 0,11 * * * /etc/init.d/minecraft say 'Server restart in 1 minute!'
59 0,11 * * * /etc/init.d/minecraft restart
02 05 * * * /etc/init.d/minecraft backup
* * * * * /etc/init.d/minecraft command 'save-all'
*/30 * * * * /etc/init.d/minecraft to-disk</i>
To view all commands do
/etc/init.d/minecraft help
To view all server commands do
/etc/init.d/minecraft SERVER_NAME help
Console Access
Will let you connect to see the servers console
/etc/init.d/minecraft SERVER_NAME screen
To exit console:
Ctrl+A D
Server Status
Will give you a list of all the servers for the user (all servers if root) and their online status.
/etc/init.d/minecraft status
Quick facts
- Edition: Minecraft Java
- File type: .jar
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
MCInitializer is a free Minecraft Java mod. Downloaded 471 times (via Spigot). Download it and open it directly in the game.