====== Minecraft Server ====== Let setup our own minecraft server. ===== MSCS Install ===== Install prerequisites. sudo apt-get install default-jre perl libjson-perl libwww-perl liblwp-protocol-https-perl util-linux make wget git rdiff-backup rsync socat iptables Create the user 'minecraft' with access to /opt/mscs and perform MSCS tasks. git clone https://github.com/MinecraftServerControl/mscs.git && cd mscs sudo make install ===== MSCS Reference ===== Create a world using: mscs create Start the world. mscs start Starting the world will require the EULA to be accepted. nano eula.txt Set the EULA to 'true' eula=true Watch the server console to access chat/commands. mscs console Identify current active worlds and their ports. mscs ls ===== Spigot Server ===== Change to the server directory cd /opt/mscs/server wget (latest BuildTools.jar file at [https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar]) java -jar BuildTools.jar Build tools will now build you the server If completed correctly, your logs should say, Success! Everything completed successfully. Copying final .jar files now. Copying spigot-1.xx.x-R0.1-SNAPSHOT.jar to /opt/mscs/server/./spigot-1.xx.x.jar - Saved as ./spigot-1.xx.x.jar A new java file should now be in your directory spigot-1.xx.x.jar Create a new world if necessary mscs create Worldxx Change the directory to the world that has been created cd /opt/mscs/worlds/Worldxx Modify the mscs.properties file and add/alter these lines, replacing versions and file paths as needed. You will need to change the mscs-server-jar as a bare minimum: mscs-client-version=1.xx.x mscs-server-version=1.xx.x mscs-server-jar=spigot-1.xx.x.jar mscs-server-url= Now, Start the server mscs start Worldxx If the server fails to start, the eula.txt file may need to be edited and accepted nano /opt/mscs/worlds/Worldxx/eula.txt Set the eula to True eula=true Now restart the server mscs start Worldxx Simply add plugins as you would normally by dragging them into the /opt/mscs/worlds/Worldxx/plugins folder ===== Installing a Plugin ===== This explains how to install a plugin on a spigot server Make sure the server has been stopped before adding a plugin Locate and download the plugins .zip file, such as (EssentialsX plugin) https://www.spigotmc.org/resources/essentialsx.9089/download?version=367353 Copy the .zip file from downloads to /home/boonadmin Move to a terminal session as root Change directory to where you have placed the plugin cd /home/boonadmin/ Copy the plugins .zip file to the worlds plugins folder cp /opt/mscs/worlds/Worldxx/plugins Unzip the plugin file (If required) unzip Remove the unwanted .zip file rm If disabling a plugin is necessary , rename the jar file to .raj mv Now change the ownership of the plugin from root to minecraft user chown minecraft:minecraft /opt/mscs/worlds/Worldxx/plugins -R Now change the permissions of the plugin so the plugin is accessible chmod 775 /opt/mscs/worlds/Worldxx/plugins -R Now we can start the server mscs start Worldxx Use the console or the client to make sure the plugin has loaded mscs console Worldxx ===== Installing a Fabric Server ===== First, download the Fabric Installer. wget -O fabric-installer-0.7.4.jar https://maven.fabricmc.net/net/fabricmc/fabric-installer/0.7.4/fabric-installer-0.7.4.jar Run the Installer, with correct version. java -jar installer.jar server -mcversion -downloadMinecraft