10 Magicbane out of the Box
MagicBot edited this page 3 years ago

Converting MagicBox to a Server based Magicbane installation

MagicBox administrators might decide they wish to deploy Magicbane outside of the container configuration. While it works perfectly for solo development or as an instant game-server; bare metal deployments have some benefits for larger teams.

The MagicBox adminisrator is lucky as Magicbane runs just as well outside of the box.

This document assumes a fresh bare metal unbuntu machine.

Geting Magicbane out of the box

Log into your container and dump the database.

docker exec -it magicbox /bin/bash
./mbdump.sh

Find the container id of your MagicBox

docker ps

Copy Magicbane out of the container

docker cp CONTAINERID:/home/mbbox/magicbane /home/YOURDIRHERE/

Setup configuration

cd magicbane
mkdir mb.conf
cp mb.data/magicbane.conf mb.conf/

Install middleware

sudo apt-get update && apt-get -y install --no-install-recommends \
mysql-server sudo lsof git openssh-client locales locales-all && apt-get clean

Copy dependencies out of container TODO

Make sure MySQL is running.

sudo service mysql start

Configure Magicbane database and user accounts. The formerly MagicBox and now Magicbane administrator should edit this file to assign his own database user and passwords. Make sure to edit magicbane/mb.conf/magicbane.conf accordingly.


`sudo mysql < mb.data/magicbanesql.conf`

Now restore the database

./mbrestore.sh

MagicBot

Bleep Blop

Your new Magicbane bare metal server should now boot!

./mbrestart.sh

Last steps

It is not advisable in a bare metal installation to use the read-only deploy key shipped wtih MagicBox. Everyone else with a MagicBox has the same key. Use your own!

Please see the Keypair Generation page.