MineOS (pkg add)

From MineOS
Jump to: navigation, search

Installing MineOS is easier than ever and can be done on any BSD system featuring the pkg_add (FreeBSD 9.x, etc) or pkg (FreeBSD 10.x) binary package managers. These instructions will install the most recent web-ui, version 0.6.x.

Contents

Why BSD

FreeBSD--unlike the other platforms MineOS is distributed or installed on--is a full operating system, rather than just a kernel and userland combination, as Linux is (i.e., GNU/Linux). (Free)BSD has a rich history and mature codebase, making it arguably the most stable and dependable Unix-like operating system available.

As its own OS rather than a distribution, the utilities and software that run on it are tightly regulated and upkept by the FreeBSD foundation, ensuring its security and stability. Being UNIX, rather than LINUX, many commands familiar to Linux users may not be available, but certainly will always have a comparable, if not more elegant--but also more strict--variation. Again, being UNIX, there are Pros and cons to Linux:

Pros

  1. Utterly stable
  2. Exceptionally well documented
  3. Vast collection of stable, secured ports
  4. Great driver support
  5. Lowest memory footprint of any OS available

Cons

  1. ...

Deployment Overview

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/local/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

linprocfs

The MineOS web-ui requires a Linux-compatible /proc filesystem; to enable linprocfs on load, execute these commands:

Binary Package Manager

Depending on your installation of FreeBSD, you may be using one of two different binary package managers. Run the command corresponding to your preferred manager.

As a guideline, pkg_add is typically FreeBSD 9.x and earlier, where pkg is FreeBSD 10.x and later.

pkg_add

On distributions featuring pkg_add, you can install dependencies with these commands.

pkg

On distributions featuring pkg, you can install dependencies with these commands.

Please note, due to the nature of pkg versioning (and this wiki will not be updated for each version bump), these commands will inevitably go obsolete (point to versions no longer hosted). Check the Official FreeBSD Repository page to determine the most current version of each package and update the pkg install command as needed.

Installing MineOS scripts

git

As updates are made frequently to the MineOS scripts, you should make a habit of updating the webui via git on a regular basis. Remember, on FreeBSD installations, the correct update path is /usr/local/games/minecraft!

Running the MineOS Web Service

Starting the web-ui at boot

Have the web interface start

Start each server marked 'start server at boot'

Copy the default mineos.conf

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}

Starting/Stopping the webui

Remember, you won't need to do this on subsequent restarts, as the initscript will take care of it.

Using the webui

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 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.

  1. Enter the web-ui as root
  2. Go to the 'Manage Profiles' page
  3. 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.