Installation on Linux/UNIX/OS X

NOTE: MCL is currently in BETA stage!

This guide helps you setting up MCL via command line on a *nix system.

1. Installing dependencies (Debian/Ubuntu/CentOS)

I recommend to install ruby via chruby. If you want to use rvm or system ruby adapt the steps accordingly. Do this first step as root.

# install packages (most are required to build ruby)

## Debian/Ubuntu
aptitude update
aptitude install wget curl git build-essential sqlite3 libsqlite3-dev autoconf bison libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev

## CentOS
yum install wget curl git gcc gcc-c++ kernel-devel make sqlite sqlite-devel autoconf bison libyaml-devel readline readline-devel openssl-devel zlib zlib-devel



# install chruby (this is a install script of mine)
curl -O https://gist.githubusercontent.com/2called-chaos/e06bf6322525d37a5bf7/raw/_setup_chruby.sh
chmod u+x _setup_chruby.sh
./_setup_chruby.sh
rm _setup_chruby.sh

# install ruby
/usr/local/bin/ruby-build 2.0.0-p481 /opt/rubies/2.0.0-p481

# use this ruby as default
echo "chruby 2.0.0-p481" >> /etc/profile.d/chruby.sh
source /etc/profile.d/chruby.sh

# install bundler gem
gem install bundler

1. Installing dependencies (Mac OS X)

On OS X you need to open the Terminal.app which you can find in Applications/Utilities. If you are running OS X Mountain Lion (10.8) or higher you already have a usable ruby version installed. To install git I recommend using homebrew. If you don't have homebrew grab it here.

brew install git
sudo gem install bundler

2. Installing MCL (universal)

  1. Switch to the user which will run the minecraft server (e.g. su - minecraft_server)

  2. Download or clone the whole thing to a convenient location:

    cd ~
    git clone https://github.com/2called-chaos/mcl.git
  3. Optional but recommended: Add the bin directory to your $PATH variable or create a symlink to the executable:

    # you may have to use .bashrc instead of .profile depending on your OS (e.g.: CentOS)
    echo 'export PATH="$HOME/mcl/bin:$PATH"' >> ~/.profile && source ~/.profile
    # OR
    ln -s /home/minecraft_server/mcl/bin/mcld /usr/local/bin/mcld
  4. Install the bundle

    cd ~/mcl && bundle install --without mysql

    NOTE: If you want to use MySQL (not recommended) replace mysql with sqlite

  5. Copy and edit the example configuration to fit your needs and server settings. Please note that there is currently no user support which means all servers need to run under the same user as MCL does.

    cd ~/mcl
    cp config/default.example.yml config/default.yml
    nano config/default.yml
  6. Done! Run mcld run (to test) or mcld start to start the MCL daemon in the background. Doesn't work? => Troubleshooting

  7. Type !uadmin into chat to give yourself root permissions. This only works if your nickname or UUID is listed in the config directory.

Hint: Bootstrap

If you want to start with a new server, MCL can bootstrap it for you. Create a file called bootstrap (no ending) inside your server folder containing the minecraft version you want to use. MCL will then download the minecraft server for you automatically. Example:

mkdir my_server
echo "1.8" > my_server/bootstrap
mcld start

You can add additional lines to the bootstrap file which will be interpreted as server properties and added to the server.properties file.

If you are doing this on a fresh server installation remember that you need java (e.g.: aptitude install openjdk-7-jre or yum install java-1.7.0-openjdk).