by mycraft
11 deployments · 9 still active · last rev. 1 year ago

MyCraft game server controller node.

Compatible with: Ubuntu 16.04 LTS, Ubuntu 18.04 LTS

#<UDF name="hostname" label="The hostname for the new Linode.">

#<UDF name="callback" label="Callback server location URL">

# This updates the packages on the system from the distribution repositories.
apt update
apt upgrade -y
apt install software-properties-common pbzip2 screen htop unzip -y

# This section sets the hostname.
echo $HOSTNAME > /etc/hostname
hostname -F /etc/hostname

# This section sets the Fully Qualified Domain Name (FQDN) in the hosts file.
echo $IPADDR $FQDN $HOSTNAME >> /etc/hosts

# Install Oracle Java 8
add-apt-repository ppa:webupd8team/java -y
apt update
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
apt install oracle-java8-installer -y

# install Node.js
curl -sL | sudo -E bash -
sudo apt-get install -y nodejs

# Download bootstrap program
wget -o

# Launch MinecraftWrapper
cd MinecraftWrapper-master
npm install
node minecraft.js $CALLBACK