MineOS-node (apt-get)
Installing MineOS is easier than ever and can be done on any system featuring the apt-get package manager (debian, ubuntu, turnkey) and supervisord init scripts. Debian Wheezy and Ubuntu 14.04 and earlier use this combination. More modern versions of Debian (10/Buster) use different installation instructions. These instructions will install the most recent web-ui written in Node.js.
Contents
Deployment Overview
There are numerous ways to deploy the MineOS WebUI:
- Use a pre-configured ISO
- Using an existing setup, execute the convenience installer script via gist (wget-friendly link)
- Download and configure the components step-by-step with the documentation below.
Configuring step-by-step
These scripts should be executed and daemonized (run as a background service) as root.
- Root required
- May host web-ui on any port, defaulting to HTTPS on 8443
- Minecraft data stored in one base directory, defaulting to /var/games/minecraft/
- Scripts stored separately, default to /usr/games/minecraft
- Supports unlimited amount of users, all serviced by one server/webui background process
- Unlimited amount of servers
- Can grant server control to other users, by group membership
Installing Dependencies
node 10.x
This method installs node from nodesource, which is one of many ways to get node v10.0.
As root: |
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get -y install nodejs
|
apt-get
On distributions featuring apt-get, you can install dependencies with these commands.
As root: |
apt-get update
apt-get install -y git supervisor rdiff-backup screen build-essential rsync
|
Java
Older versions (including LTS) of Debian and Ubuntu will not have OpenJDK8 available in the default repositories. Starting with Minecraft 1.12, Java8 is a requirement. Starting with Minecraft 1.17, Java16 is a requirement.
Run the following commands below according to which distribution you are using. Keep in mind, it is perfectly OK to use Oracle JDK/JRE, as well.
For all apt-get distros, you may use default-jre-headless, which will auto-select the highest available OpenJDK in your repos.
As root: |
apt-get -y install default-jre-headless
|
For Ubuntu 14.04, this means OpenJDK7 and is equivalent to:
As root: |
apt-get install -y openjdk-7-jre-headless
|
For Ubuntu 14.04, you can opt to use a third-party PPA for Oracle Java 8:
Oracle Java 8 can be installed via third-party PPA. Be sure to familiarize yourself with the implications of using third-party PPAs.
For Debian 7 (wheezy) and 8 (jessie), the default is OpenJDK7, but 8 is available through backport repos (official):
As root: |
echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/sources.list
apt-get update apt-get install -y -t jessie-backports openjdk-8-jre-headless ca-certificates-java |
rsync
MineOS requires rsync 3.1.0+, which comes default in Ubuntu 14.04 and later. Ensure you have a recent enough version.
Installing MineOS scripts
git
As root: |
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 --unsafe-perm ln -s /usr/games/minecraft/mineos_console.js /usr/local/bin/mineos cp mineos.conf /etc/mineos.conf |
As updates are made frequently to the MineOS scripts, you should make a habit of updating the webui via git on a regular basis. Updating the web-ui does not require a host or server restart.
Running the MineOS Web Service
Secure HTTPS operation
Before you can start the server, you must generate a self-signed certificate for HTTPS functionality: /etc/ssl/certs/mineos.{pem,crt,key}
As root: |
cd /usr/games/minecraft
./generate-sslcert.sh
|
Starting the web-ui at boot
This method uses supervisord:
Have the web interface start
As root: |
cp init/supervisor_conf /etc/supervisor/conf.d/mineos.conf
supervisorctl reload
|
Starting/Stopping the webui
Remember, you won't need to do this on subsequent restarts, as the initscript will take care of it.
As root: |
supervisorctl start mineos
supervisorctl stop mineos
|
Using the webui
Overview
The scripts, by default, will run a server operating on port 8443 and place minecraft data files into /var/games/minecraft.
When creating minecraft servers, you should use an unprivileged user to create and manage Minecraft servers. For most distros, this will be with the adduser username command. The password you set during user creation will also be the password used for the web-ui.
In your browser, visit the location: https://xxx.yyy.zzz.aaa:8443
Creating Servers
Servers should only be created by unprivileged users, or in other words: not root. Be sure to log in as any unprivileged user to create any servers you wish and leverage group membership to share control of servers with others!