MineOS Install

Ubuntu 18.14 or 16.04 LTS with Oracle Java 8

Instructions copied from here just in case I never find that page again 🙂
Install JAVA from here https://www.fosstechnix.com/install-oracle-java-8-on-ubuntu/

  1. Sudo into root
sudo su
or
sudo -i
  1. Create and use a temporary directory for installation
rm -rf /tmp/*
mkdir /tmp/setup
cd /tmp/setup
  1. Preparing dependencies (adding the Oracle Java 8 PPA Repo to the system)
add-apt-repository ppa:webupd8team/java
  1. Preparing dependencies (adding the NodeJS PPA Repo/NPM to the system)
wget https://deb.nodesource.com/setup_10.x
chmod a+x ./setup_10.x
./setup_10.x
  1. Installing dependencies:
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
apt-get install -y nodejs git rdiff-backup screen build-essential oracle-java8-installer oracle-java8-set-default
  1. Installing MineOS-Node
mkdir -p /usr/games
cd /usr/games
git clone https://github.com/hexparrot/mineos-node.git minecraft
cd minecraft
git config core.filemode false
chmod +x service.js mineos_console.js generate-sslcert.sh webui.js
npm install
ln -s /usr/games/minecraft/mineos_console.js /usr/local/bin/mineos
cp mineos.conf /etc/mineos.conf
cp init/systemd_conf /etc/systemd/system/mineos.service
systemctl enable mineos
cd /usr/games/minecraft
./generate-sslcert.sh
reboot

A reboot shouldn’t be necessary, however I do recommend it (if you don’t wish to reboot, don’t copy the reboot command at the end of the script)

Once finished, the MineOS-Node Web UI should be available on https://”ip”:8443 (replace “ip” with the IP). In the event that something goes wrong, chances are that it was during the install of the UI, and these extra steps should be followed:

  1. Sudo into root:
sudo -i
  1. Updating/resetting MineOS-Node Scripts:
cd /usr/games/minecraft
git fetch
git reset --hard origin/master
rm -rf node_modules
npm install
chmod +x mineos_console.js

The MineOS-Node WebUI should now be available on https://”ip”:8443 and if it still doesn’t work, repeat the “Installing MineOS-Node” section, and if it doesn’t work, try again from up top. Occasionally something might not work/install, so you may need to retry.

Updating the Webui

Convenience scripts

If you updated your scripts since May 11, 2016, you can use the newly-created convenience scripts for updating and resetting instead. (only use one)

As root:

cd /usr/games/minecraft
/bin/bash update_webui.sh
/bin/bash reset_webui.sh

Updating scripts

Following these commands will update your nodejs webui the most recent version and maintain changes (if any) you have made to the source. This is the preferred method, even if you do not edit code. After updating the scripts, be sure to log out of the web-ui and back in.

As root:

cd /usr/games/minecraft
git fetch
git merge origin/master
npm install

Resetting scripts

If updating the scripts returns an error or otherwise fails to solve a web-ui problem, you can try resetting the scripts. This will discard any and all local changes to the source and ensure permissions are set properly.

As root:

cd /usr/games/minecraft
git fetch
git reset --hard origin/master
rm -rf node_modules
npm install
chmod +x mineos_console.js