This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
mystic/source/_posts/magicka.md

50 lines
3.2 KiB
Markdown
Raw Normal View History

2018-11-13 13:06:38 +00:00
---
title: Installing Magicka BBS in Docker
date: 2018-11-14 23:37:50
thumbnail: /images/logo-magicka.png
categories:
- Docker
- Magicka BBS
tags:
- Docker
- BBS
---
The following is the instructions on how to install [Magicka BBS](http://magickabbs.com) in a Docker Container. These instructions have been compiled using Docker on a Raspberry Pi. (You need to have docker installed first, and [this](/2018/09/02/docker) might help you get started.)
My image is available in my Docker Registry and can be obtained by using `docker pull registry.leenooks.net/bbs/magicka:0.12-alpha-armv7l`. (There is an x86_64 image too, just change armv7l to x86_64.) You can use this image to run a container using `docker run`, or you can use it in a *swarm*, if you have multiple hosts. I actually use Docker Swarm myself.
**NOTE**: Its important that you separate "data" from the "application" and provide a persistent storage path for your container (otherwise if you recreate your container, you'll loose your data!). On my setup my container persistent storage is storage in `/srv/docker/[CONTAINER]/data`. In the parent path (/srv/docker/[CONTAINER]) I keep my scripts and tools for managing the container and starting it - and since I use Docker Swarm, that is where my `.yml` file is.
## Preparation
1. Download your favourite Linux OS and install
2. Install Docker
3. Pull the Magicka Image with
```
docker pull registry.leenooks.net/bbs/magicka:0.12-alpha-armv7l
```
4. Create your persistent storage destination
```
mkdir -p /srv/docker/magicka/data
```
## Starting
5. Start your container with
```
docker run -d --rm -p 23:2023 -p 22:2024 -p 80:8080 -p 24554:24554 -v /srv/docker/magicka/data:/opt/magicka/data --name=magicka registry.leenooks.net/bbs/magicka:0.12-alpha-armv7l
```
The first time the container starts, it will create sub directories and fill your data directory. You might need to then refer to the Magicka documentation to configure it for your environment.
The options on this command line are:
<table><tr><th style="width: 20%">Option</th><th>Reason</th></tr><tr><td>-d</td><td>Run the container in the background</td></tr><tr><td>-p</td><td>Port mapping from the host:container. So using 23:2023 will mean any incoming connections on the *host* to port 23 will be sent to the *container* on port 2023. This will enable you to telnet into your Magicka.</td></tr><tr><td>-rm</td><td>Means the container will be destroyed when it is stopped. (No problem if *-v* is used below.</td></tr><tr><td>-v</td><td>Volume mapping from the host:container. A value of /srv/docker/magicka/data:/opt/magicka/data means that any data in the *container* written to /opt/magicka/data, will be stored on the *host* /srv/docker/magicka/data.</td></tr></table>
There are other options you may prefer to use, for example, instead of `--rm`, you may want to use `--restart=always`.
## Configuration
6. Now your container is running, you should configure it to your liking by editing the files in data/etc/magicka/...
If you need any help, [login](/2018/08/31/chinwag/) to my BBS and send me a message, or if you use another BBS, or a Sysop of a BBS and connected to one of the networks I'm connected to, you can send me a Netmail. See the list of [networks](/networks) that I'm already connected to.