A quickstart Minecraft (Craftbukkit) server that will automatically download latest craftbukkit development build and start it.
-
Create a DIY application using this git repo as source code:
$ rhc app-create craftbukkit diy --from-code=git://github.com/golyalpha/openshift-craftbukkit-local.git
-
Create a port-forward from your local machine to your remote server:
$ rhc port-forward craftbukkit Checking available ports ... done Forwarding ports ... To connect to a service running on OpenShift, use the Local address Service Local OpenShift ------- --------------- ---- --------- java 127.0.0.1:25565 => *:25565 Press CTRL-C to terminate port forwarding
-
The server will be accessible from
minecraft
using Direct Connect on 127.0.0.1:25565
You will need at least one player to act as the administrator. In order to do that, you must add them to the ops.txt file.
-
SSH to the application:
$ rhc ssh craftbukkit
-
Go to the
$OPENSHIFT_DATA_DIR
directory:$ cd $OPENSHIFT_DATA_DIR
-
Add the
minecraft
user names to the ops.txt file. I usenano
, but you can usevi
if you wish. The updated file should look like as shown:$ cat ops.txt syeary
syeary
is the minecraft user name.
4. Stop and start the gear. I have found restart does not work very well.
$ gear stop
Stopping gear...
Stopping DIY cartridge
$ gear start
Starting gear...
Starting DIY cartridge
+ cd /var/lib/openshift/52bc4398e0b8cded36000038/app-root/data/
+ nohup java -jar craftbukkit-dev.jar -h 127.8.212.1 --noconsole
Minecraft logs are in $OPENSHIFT_DIY_LOG_DIR/server.log.
The OpenShift diy
cartridge documentation can be found at: