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.
  • 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
  • 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 -c ~mc/mc/startonboot.sh
file ~mc/mc/startonboot.sh:
#! /bin/bash

~/bin/autonoekeon.sh

cd ~/mc
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
    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

Plugins

Installed
  • ClearLag (suggested on HowToGeek, Jason Fitzpatrick [1])
  • NoSpawnChunks (suggested on HowToGeek, Jason Fitzpatrick [2])
Installed - was installed on Jerome's server
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]