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 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.
This tip will show how to host a CraftBukkit server on public PaaS (sign up for free) version of OpenShift.
- Install OpenShift client tools. For simplicity, Mac commands are given below:
1234sudo gem install rhcrhc setup
123rvm install ruby-2.1.0
123rvm default ruby-2.1.0
- Create OpenShift DIY application as:
123rhc app-create craftbukkit diy --from-code=git://github.com/jyeary/openshift-craftbukkit-quickstart.git
- 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:
123rhc port-forward craftbukkit
This should show an output something similar to as shown:123456789101112Checking available ports ... doneForwarding ports ...To connect to a service running on OpenShift, use the Local addressService Local OpenShift------- --------------- ---- --------------------java 127.0.0.1:25565 => 127.13.137.129:25565Press CTRL-C to terminate port forwarding
And now you are ready to connect your Minecraft client.
- Login to OpenShift using the command:
123rhc ssh craftbukkit
Change the directory to view Miencraft logs as:123cd $OPENSHIFT_DIY_LOG_DIR
server.logfile in that directory to check the Minecraft server version. Its 1.7.2 as of this writing and shows a message like:123Starting minecraft server version 1.7.2
Now run Minecraft launcher and select the matching version as explained in this video. Click on Play to start the game.
Now click on
Add Serverand specify the server details as:
Done. Select the recently added server and click on
And now you are playing a CraftBukkit server hosted on OpenShift.
- 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:
- Install and setup RHC
1234gem install rhcrhc setup
- The following steps need to be done by the player hosting the server.
- Each player’s public key (typically in
.sshdirectory and file named
id_rsa.pub) needs to be added to the domain hosting the server. This can be done at https://openshift.redhat.com/app/console/settings.
- Each player’s OpenShift account (email id) needs to be added to the domain hosting the server (for example: https://openshift.redhat.com/app/console/domain/milestogo)
- Each player’s public key (typically in
- 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_rsakey using PuttyGen as explained here.
- Port forward using the following command:
123rhc port-forward -n milestogo -a craftbukkit
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.