Running a modern BBS with ENiGMA½ and Docker

A real bulletin board system, containerized, as part of FlameNet.

Running a modern BBS with ENiGMA½ and Docker

Before the web, you dialed a bulletin board system directly. One caller at a time, you read messages, played door games and traded files. As part of FlameNet I wanted a real one back.

ENiGMA½ is a Node.js BBS package with message networks, door games, file areas, ANSI art, telnet and SSH. It is actively maintained. Its documentation lives at enigma-bbs.github.io. The older nuskooler.github.io address redirects there.

The first run

The first run is interactive, because it generates your config. Make a working folder and run:

docker run -it -p 8888:8888 --name "ENiGMABBS" \
  -v "$(pwd)/config:/enigma-bbs/config" \
  -v "$(pwd)/db:/enigma-bbs/db" \
  -v "$(pwd)/logs:/enigma-bbs/logs" \
  -v "$(pwd)/filebase:/enigma-bbs/filebase" \
  -v "$(pwd)/art:/enigma-bbs/art" \
  -v "$(pwd)/mods:/enigma-bbs/mods" \
  -v "$(pwd)/mail:/mail" \
  enigmabbs/enigma-bbs:latest

Follow the prompts, then stop the container, remove it and start it again detached with -d. The config folder now holds config.hjson, menu.hjson, prompt.hjson and the SSL certificates. The db folder holds the databases. After any edit to the config, restart with docker restart ENiGMABBS.

A correction to my first compose file

My first version of this post mounted only two folders:

services:
  enigma:
    image: enigmabbs/enigma-bbs:latest
    ports:
      - "8888:8888" # telnet
      - "8889:8889" # ssh
    volumes:
      - ./enigma/config:/enigma-bbs/config
      - ./enigma/db:/enigma-bbs/db

That is not enough. The ENiGMA½ documentation mounts seven folders. Without logs, filebase and art mounted, files that users upload and any custom art vanish the next time you rebuild the container. Containers are ephemeral, and anything you did not mount goes with them.

Here is the compose file I would use now:

services:
  enigma:
    image: enigmabbs/enigma-bbs:latest
    ports:
      - "8888:8888" # telnet
      - "8889:8889" # ssh
    volumes:
      - ./enigma/config:/enigma-bbs/config
      - ./enigma/db:/enigma-bbs/db
      - ./enigma/logs:/enigma-bbs/logs
      - ./enigma/filebase:/enigma-bbs/filebase
      - ./enigma/art:/enigma-bbs/art
      - ./enigma/mods:/enigma-bbs/mods
      - ./enigma/mail:/mail

Pin the image to a version tag once you have one that works. :latest can change under you on the next pull.

One file defines the board

Everything lives in config.hjson: themes, message areas, login servers and the SSH host key. That convenience has a cost. If you ever publish your config, for a blog post or a repository, remove the private key passphrase first. I learned that the hard way.

A second trap sits in the same file. If you add a partial archiver entry, it replaces the built-in entry. It does not merge with it. Copy the whole entry and edit that.

Telnet sends passwords in the clear

The board publishes two ways in: telnet on port 8888 and SSH on port 8889. Telnet is the authentic 1996 experience, and it sends logins in cleartext. Anyone on the path between you and the board can read the user name and password.

Tell your callers. For anything you care about, use SSH. Telnet suits a throwaway account on a network you trust, or a visit for the nostalgia. I would not reuse a password from anywhere else on a telnet login, ever.

The browser terminal

ENiGMA½ can serve a terminal in the browser. For that, publish the web server port and the WebSocket port. The WebSocket port defaults to 8810. Add both to the ports list and restart the container.

Stopping cleanly

docker stop and docker restart kill the container after 10 seconds. A board mid-write can lose data in that window. Give it more time:

docker stop -t 30 ENiGMABBS

Connecting

Any telnet or SSH client works. To reach a board running on your own machine, use bbs.example.com or its address in your client, with port 8888 for telnet or 8889 for SSH:

ssh -p 8889 bbs.example.com

The board greets you with ANSI art, a login prompt and the feeling that it is 1996.

The full setup

The full Docker setup is in my GitLab, in the userscripts project under the bbs folder. The compose file above adds the extra mounts that the ENiGMA½ documentation recommends.

Subscribe to Just another Geek

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe