Minecraft Immie Pi

From miki
Jump to navigation Jump to search

Minecraft Immie Pi is our tiny home minecraft server running on the Pi.

System and server

  • Running on Raspberry Pi, with 512MB RAM.
  • For now, running on Zotac ID-42, xbmcbuntu, with 4096MB RAM.
  • Using Raspbian image 2014-06-20. Java pre-installed:
$ java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode)
  • Server Spigot 1.7.10
wget http://ci.md-5.net/job/Spigot/lastStableBuild/artifact/Spigot-Server/target/spigot.jar
sudo java -Xms256M -Xmx496M -XX:MaxPermSize=128M -jar /home/pi/mc/spigot.jar nogui
  • Now, running Cauldron + Forge server 1.7.2 1.1147.04.107 (to run Mo'Creatures mo)
wget http://adf.ly/901609/http://files.minecraftforge.net/maven/net/minecraftforge/cauldron/1.7.2-1.1147.04.107/cauldron-1.7.2-1.1147.04.107-installer.jar
  • Make sure to remove the binding dynamic-complete-history in the .inputrc file, or this will trigger the following error at launch:
SEVERE: Failed to start the minecraft server
java.lang.IllegalArgumentException: No enum constant org.bukkit.craftbukkit.libs.jline.console.Operation.DYNAMIC_COMPLETE_HISTORY
	at java.lang.Enum.valueOf(Enum.java:236)
  • Set crontab script to start spigot server automatically at boot.
crontab -l:
# Crontab
#
# Install this crontab with
#
#   sed -r '/^#/!s/\$USER/'$USER'/g' crontab-minecraft | crontab
#
#   !!! THIS WILL OVERWRITE ANY CURRENT CRONTAB !!!
#
# Or append only job to current crontab
#
#   ( crontab -l; sed -r '$!d;s/\$USER/'$USER'/g' crontab-minecraft ) | crontab
#
# Use /bin/bash to run commands, instead of the default /bin/sh
SHELL=/bin/bash
# Define variable USER because we need it in our job scripts
USER=mc
# Mail any output to '$USER', no matter whose crontab this is
MAILTO=mc
# Set PATH - by default it is set to /usr/bin:/bin
PATH=/home/mc/bin:/usr/local/bin:/usr/bin:/bin
#
#
# m h dom mon dow   command     (dow=0|7 is sunday)
@reboot         /usr/bin/tmux new-session -d ~mc/mc/startonboot.sh
file ~mc/mc/startonboot.sh:
#! /bin/bash

~/bin/autonoekeon.sh

cd ~/mc

echo "========================================================================="
echo "STARTING SERVER - WAITING FOR 20 SECONDS"
echo "-------------------------------------------------------------------------"
sleep 20
echo "Waited 20s. Updating GIT repository..."
git add -A
git commit -m "udpate on $HOSTNAME"
echo "Done. Starting the server..."
echo "========================================================================="

while : ; do
    # Start spigot
    java -Xms1024M -Xmx1024M -XX:MaxPermSize=256M -jar ~/mc/spigot.jar nogui
    # Sleep 5 sec - can be broken here. Note that normally spigot restart itself on crash, but not on stop
    echo 
    echo "========================================================================="
    echo "========================================================================="
    echo "Server stopped. Sleeping 5 SECONDS before restarting... (Ctrl-C to break)"
    echo "========================================================================="
    echo "========================================================================="
    sleep 5
done
file ~/bin/autonoekeon.sh:
#! /bin/bash

case $HOSTNAME in
    "xbmcbuntu")    PORT=54899;;
    "mcpi")         PORT=54900;;
    "reddragon")    PORT=54895;;
        *)          PORT=54896;;
esac

autossh -M 0 -f -T -N -n -q -R $PORT:localhost:22 noekeon
  • On remote ssh server, restrict access to ssh porwarding on appropriate ports, file .authorized_keys:
no-pty,no-X11-forwarding,permitopen="localhost:54899",permitopen="localhost:54900",command="/bin/echo do-not-send-commands" ssh-rsa PUBLIC_KEY_HERE mc@immie.org
  • disable online authentication:
online-mode: false

Plugins

Installed
  • ClearLag (suggested on HowToGeek, Jason Fitzpatrick [1])
  • NoSpawnChunks (suggested on HowToGeek, Jason Fitzpatrick [2])
Installed - was installed on Jerome's server
Set difficulty to peaceful in world
/mvtp world
/mvmodify set difficulty PEACEFUL
/mvm set monsters false
Import single player world Papa - first survival. First copy solo files to folder ~/world_papa_first_survival. Then in the server:
/mv import papa_first_survival NORMAL
Import other worlds in a same way
/mv import zyra_eco NORMAL
/mv import emma_creatif2 NORMAL          # For this one, I had to type /fml confirm in the console
To consider installing
To consider installing - was installed on Jerome's server
  • [nolink AntiBotUltra]
  • [nolink ChestShop]
  • [nolink Citizens]
  • [nolink CityWorld]
  • [nolink Command iConomy]
  • [nolink CoreProtect]
  • [nolink CrackShot]
  • [nolink Factions]
  • [nolink GroupManager] (was is it? redundant with essentials' version?)
  • [nolink iDisguise]
  • [nolink LogManager_0.1.3]
  • Multiverse-Inventories
  • [nolink NoCheatPlus]
  • [nolink Openinv]
  • [nolink PlayerHeads]
  • PlotMe
  • [nolink PluginMetrics]
  • [nolink Timeismoney]
  • [nolink update]
  • [nolink xAuth]