- Log in as root (default configured)
- Run
apt-get update && apt-get dist-upgrade
- Create a user named
minecraft
withadduser minecraft
, and skip everything except the password - Run
usermod -a -G sudo minecraft
- Log off, and log back in with the
minecraft
account - Run
sudo passwd -dl root
- Disable root login via SSH by running
sudo sed -i -e "s/PermitRootLogin yes/PermitRootLogin no/g" /etc/ssh/sshd_config && sudo service ssh restart
- Run
sudo apt-get install openjdk-7-jdk tmux
- Start a new tmux session by running
tmux
- Run
mkdir mcserver
- Use
wget
to get your server JAR.wget http://ci.md-5.net/job/spigot/lastSuccessfulBuild/artifact/Spigot-Server/target/spigot.jar
for Spigotwget http://www.minecraft.net/download/minecraft_server.jar
for Vanilla- Or, copy the URL for your specific server JAR (e.g. CraftBukkit) and place it after
wget
- Run
java -Xmx512M -jar <server JAR name>
to start your server - To detach, do
Ctrl+B-D
(pressCtrl+B
, and then hitD
) - To reattach, run
tmux attach
- To update your server JAR, just
wget -N <URL>
in the mcserver directory.
Me Likie :D