MineOS (zypper)
Installing MineOS is easier than ever and can be done on any system featuring the zypper package manager (OpenSUSE). These instructions will install the Python web-ui, version 0.6.x.
You should, however, consider using only the Node.JS-based webui, as it is actively maintained and the feature set well-exceeds the Python version.
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 8080
- 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
zypper
On distributions featuring zypper, you can install dependencies with these commands:
As root: |
zypper -n remove patterns-openSUSE-minimal_base-conflicts
zypper -n install screen zypper -n install openssl zypper -n install libopenssl-devel zypper -n install git zypper -n install java-1_7_0-openjdk-headless zypper -n install python-xml zypper -n install python-CherryPy zypper -n install rdiff-backup |
Note, these commands remove patterns-openSUSE-minimal_base-conflicts, whose function I am unfamiliar with. As it causes conflict with rdiff-backup/Python related packages and does not appear to be critical, I have removed it for simplicity: if you keep it, you will need to resolve package conflicts for the remaining packages manually.
Installing MineOS scripts
git
As root: |
mkdir -p /usr/games
cd /usr/games git clone git://github.com/hexparrot/mineos minecraft cd minecraft git config core.filemode false chmod +x server.py mineos_console.py generate-sslcert.sh ln -s /usr/games/minecraft/mineos_console.py /usr/local/bin/mineos |
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 host or server restarts, and thus can be done even via crontabs.
Running the MineOS Web Service
Starting the web-ui at boot
Have the web interface start
As root: |
cp /usr/games/minecraft/init/mineos.suse /etc/init.d/mineos
chmod 744 /etc/init.d/mineos chkconfig --level 345 mineos on |
Start each server marked 'start server at boot'
As root: |
cp /usr/games/minecraft/init/minecraft.suse /etc/init.d/minecraft
chmod 744 /etc/init.d/minecraft chkconfig --level 345 minecraft on |
Copy the default mineos.conf
As root: |
cp /usr/games/minecraft/mineos.conf /etc/
|
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/Stopping the webui
Remember, you won't need to do this on subsequent restarts, as the initscript will take care of it.
As root: |
service mineos start
service mineos stop
|
Using the webui
Overview
The scripts, by default, will run a server operating on port 8080 and place minecraft data files into /var/games/minecraft.
When creating minecraft servers, it is recommended to use an unprivileged user to actually create and manage Minecraft servers. For most distros, this will be with the adduser username followed by passwd 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:8080
Creating Profiles
Initially, profiles may only be "updated" by root. This is because /var/games/minecraft/profiles/profile.config is owned by root:root. As you may want to allow other users to create/update/remove profiles, you will want to reassign this file different group ownership.
You can also, using the web-ui, change group ownership by logging in as root.
- Enter the web-ui as root
- Go to the 'Manage Profiles' page
- At the bottom of the page, change the dropdown value to whichever group should have full access to managing profiles.
Creating Servers
Servers may 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; trying to create a server as root will be met with instructions on how to create additional users from the command line.