FREE Minecraft Server Hosting on OpenShift (Tech Tip #15)

minecraft-logo

Are you looking for free Minecraft server hosting and invite your friends to join the party ?

If yes, then read on!

First some context …

bukkit-logo

Bukkit is a free, open source project that provides the API and runtime to extend Minecraft. It is one of the most popular ways to write Minecraft mods. Bukkit uses a more general terminology of “plugin” but essentially they are mods in Minecraft context. Developers write plugins using Bukkit API.

CraftBukkit is a mod for the Minecraft server that implements Bukkit API. Developers can download CraftBukkit JAR for a particular version of Minecraft and use it to run a Minecraft server. This allows plugins, or mods in Minecraft parlance, written using Bukkit API to be installed in the CraftBukkit server.

Tech Tip #7 introduced OpenShift – Red Hat’s PaaS platform.

OpenShift-logo

This tip will show how to host a CraftBukkit server on public PaaS (sign up for free) version of OpenShift.

  1. Install OpenShift client tools. For simplicity, Mac commands are given below:
    Note, you need to use MRI Ruby, not JRuby. Install RVM to manage different versions of Ruby on your machine. For example, install Ruby 2.1.0 as:
    And set the default Ruby version using:
  2. Create OpenShift DIY application as:
    This command uses an OpenShift QuickStart, created by John Yeary, to create an OpenShift application. CraftBukkit JAR is downloaded and Minecraft server is started using it by the time application is ready.

    Note, a free account gives 3 small gears where each gear is 512 MB RAM and 1GB of disk space. Minecraft wiki recommends 512 MB of RAM and 2GB of disk space for 6-10 players.

  3. As mentioned in Steven Citron-Pousty’s blog:At this time, OpenShift is primarily a HTTP server platform – we proxy HTTP calls but no other protocols. In addition, we only expose ports 80 (HTTP), 443 (HTTPS), and 22 (SSH) to the outside world from your gear. While we can start up Minecraft Server on any port we want (and tell the client to listen on that port), the Minecraft server and client do not talk HTTP so we can not proxy the calls. To get this to work we are going to have to SSH port-forward either from your laptop to the server or vice versa (both configurations are supported on OpenShift).So lets forward a port from our local machine to the Minecraft server port on OpenShift using the following command:

    This should show an output something similar to as shown:

    And now you are ready to connect your Minecraft client.

  4. Login to OpenShift using the command:

    Change the directory to view Miencraft logs as:

    Read through server.log file in that directory to check the Minecraft server version. Its 1.7.2 as of this writing and shows a message like:

    Now run Minecraft launcher and select the matching version as explained in this video. Click on Play to start the game.

    Now click on Multiplayer:

    tt15-minecraft-multiplayer

    Click on Add Server and specify the server details as:

    tt15-craftbukkit-openshift-server

    Click on Done. Select the recently added server and click on Join Server:

    tt15-join-server

    And now you are playing a CraftBukkit server hosted on OpenShift.

  5. Set up the administrative player (or operator in Minecraft parlance) by following the instructions here.

Minecraft is a lot more fun when played with other friends. The instructions above allow you to host a server and be the operator. The following instructions are needed on each player who wants to join the same server:

  1. Install and setup RHC
  2. The following steps need to be done by the player hosting the server.
  3. For Windows machines only: Download Putty (used for ssh shell verification) and PuttyGen (used for importing the id_rsa key so that it can be recognized by Putty). Import the id_rsa key using PuttyGen as explained here.
  4. Port forward using the following command:

And now the players can connect to the same server using the multiplayer setup instructions explained above!

Note that even though server requirements for Minecraft state that 6-10 players can join in 512 MB of RAM but practically speaking only 2 players could play in this much memory. More memory can always be added to your existing account by signing up for Silver Plan.

minecraft-steve

Happy minecrafting!

Be Sociable, Share!

14 thoughts on “FREE Minecraft Server Hosting on OpenShift (Tech Tip #15)

  1. Hey there. Thanks for the good article. Perfectly timed guidance just like what I’m trying to find a
    very long time. Lucky to find this article and I am going to share it on some social media platforms.
    I’ve bookmarked this too for future reference as well.
    Sustain the great work.

  2. I am curious to find out what blog system you have been working with?
    I’m experiencing some small security issues with my latest blog and I’d
    like to find something more risk-free. Do you have any solutions?

  3. How do you install plugins on it ?! Bukkit is useless if you can’t use plugins on it !

  4. hi.
    tried this but get an error like

    .Last 10 kB of build output:
    Stopping DIY cartridge
    Repairing links for 1 deployments
    Building git ref ‘master’, commit 7170e31
    + cd /var/lib/openshift/5412f197e0b8cd858f0002ee/app-root/data/
    + ‘[‘ ‘!’ -e craftbukkit-dev.jar ‘]’
    + wget http://dl.bukkit.org/downloads/craftbukkit/get/latest/craftbukkit-dev.jar -O craftbukkit-dev.jar
    –2014-09-12 09:14:14– http://dl.bukkit.org/downloads/craftbukkit/get/latest/craftbukkit-dev.jar
    Resolving dl.bukkit.org… 85.236.96.198
    Connecting to dl.bukkit.org|85.236.96.198|:80… connected.
    HTTP request sent, awaiting response… 451 Unavailable for Legal Reasons
    2014-09-12 09:14:14 ERROR 451: Unavailable for Legal Reasons.

    after i click create.

  5. Spot on with this write-up, I actually feel
    this amazing site needs a great deal more attention.
    I’ll probably be back again to read through more, thanks for
    the information!

Leave a Reply

Your email address will not be published. Required fields are marked *