Installing x84 BBS on Raspberry Pi Zero running FreeBSD 11

Setup python based BBS on Raspberry Pi Zero running FreeBSD 11

Installing x84 BBS on Raspberry Pi Zero running FreeBSD 11

Back in the 80s, I had an Apple ][gs with a 1200baud modem. I lived in farm country and everything was long distance. The next town over was 9 miles away. Because there was a county line there, it was an intraLATA call and long distance. I did have a friend in the next town and we connected via modems to chat and transfer files. Everything was all manual modem AT commands but it was fun. The problem was that my parents didn't like me tying up the phone line for too long. Plus it got expensive for teenager with little extra cash to pay for the phone bill. Kids and parents worrying about overages is not a new thing. ;-)

I had a subscription to The Computer Shopper and it was a massive catalog packed with articles and ads from every computer company of the time. It took a lot of time to go through every month (usually the next issue was here before you were done). It was a great wealth of computer information in the pre-Internet days. I learned about dialup Bulletin Board Systems (BBS) and tried dialing up a few free boards but rarely staying on for very long at a time because I knew it was going to rack up the bill quickly.

Bulletin Boards started falling out of popularity as the Internet came on the scene. A lot of the functionality provided by a BBS was now available on websites. Many shut down and a few added telnet so you could reach them over the Internet. There's still many BBS that are still running today. I decided that maybe it's time to finally go play with some BBS since I didn't get much of a chance the 1st time around.

I decided to run this on my Raspberry Pi Zero because the single core ARM runs the ANSI screens at a reasonable speed. The original Raspberry Pi A or B model would be good candidates too. I tried it on a quad core system and the screens went by way too fast to read/see properly. Logins are a little slow but that's keeping with the feel of how things used to be. I bypassed a lot of proprietary BBS software because it wasn't going to be able to run on my hardware/OS and didn't give you much room to tweak. I wanted to keep to software that could run on many platforms (python, ruby, etc.). I did find a node.js BBS that looked nice but there's not a lot of node packages for FreeBSD/ARM. Then I ran across x84. It's written in Python and thought it looked very promising. I tried it out and decided it's a keeper (as long as I don't find something better).

Down to the actual install:  (finally)

Let me help you setup all the pre-requisites and tweaks so you don't have to spend hours of googling and trial & error. I went through 3 or 4 installs to figure this all out. Here's some packages to get everything prepped for the install.

sudo pkg install gcc py27-pip py27-sqlite3 py27-gmpypy27-wcwidth py27-requests py27-six py27-more-itertoolspy27-jaraco.timing py27-jaraco.util py27-irc py27-dateutilpy27-feedparser py27-html2text py27-pycparser py27-cffipy27-bcrypt py27-idna py27-pyasn1 py27-enum34 py27-ipaddresspy27-cryptography py27-ecdsa py27-paramiko py27-opensslwebpy py27-cherrypy curl bash

FreeBSD uses some cross-compile tools on some embedded platforms (mips, arm, aarch64, etc.) which aren't used in this setup and will cause build errors. Change all references of /nxb-bin/usr/bin/cc to /usr/local/bin/gcc in /usr/local/lib/python2.7/_sysconfigdata.py to remove the cross-compile dependencies and allow gcc to build the remaining modules.

sudo sed -i 's//nxb-bin/usr/bin/cc//usr/local/bin/gcc/g'/usr/local/lib/python2.7/_sysconfigdata.py

Install x84 via pip. The option with_crypto enables ssh and ssl if you want to use the embedded webserver. You can omit this if you want telnet only though ssh would be recommended.

pip install --user x84[with_crypto]

Start it up (~/.local/bin/x84) to generate the default config. Let it finish starting up then control-c to kill the BBS.

Edit ~/.x84/default.ini and change 127.0.0.1 to the IP address of your network interface. You can also set bbsname while you're editing.

Fire it back up in tmux (or screen if you prefer). Login with telnet on port 6023 or ssh -p 6022 new@bbsaddress (or anonymous@) to register a new user. The first user setup is automatically a sysop and can change system settings from within the BBS.

Screenshot of default setup. I used cool-retro-term with DOS profile set to at least 80 column wide. Nothing like adding scanlines, phosphor refresh, static, etc. to make it feel more old school. Hyper Term has a similar retro theme.

Now you have a default install of x84 BBS running on your Raspberry Pi. Time to read the docs to learn how to use and customize your setup. Read the doors section to figure out how to run any external ascii/curses program from the menu (returns to the menu after exit). I've played with silly apps like nyancat, cmatrix, etc. but have been messing with frotz to play old Infocom text adventure games too. I've looked through every command line, curses game for FreeBSD on Freshports to see what might be a good fit on my BBS.

The ansi screen files are in the following location:
~/.local/lib/python2.7/site-packages/x84/default/art/*.ans

You can view and edit ANSI/ASCII files with PabloDraw. It's not a bad idea to have figlet, cowsay, etc. to generate some ascii art to get you off the ground. You can view and download some ANSI files from the Sixteen Colors ANSI Art site.