I have been running a Synchronet BBS for about 20 years now and was thrilled when Rob Swindell decided to “Reboot” the BBS world and offer Synchronet to the open source community.
The below instructions are for installing the latest Synchronet (CVS) on Debian 9.x running as a non-root user for security reasons.
Since it’s release I have seen several guides on how to build Synchronet on various operating systems. I myself have built Synchronet in both FreeBSD and Linux (with limitations on the FreeBSD side, so I have always seemed to come back to the Linux platform). I have run my BBS (The Horizon BBS, http://bbs.horizonbbs.net) on CentOS, RedHat EL, Debian and Ubuntu and have found Debian to offer a good balance of stability, security and compatible packages when it comes to building and running synchronet.
I seem to keep my operating system pretty up to date, so I will be updating this guide from time to time to incorporate changes and workarounds in newer versions of Debian as it is released.
Building Synchronet on Debian 9.5:
This tutorial assumes you are running Debian 9.5 Minimal (x64)
The first thing that needs to be done is all dependencies need to be installed in order to create a sane build environment.
Update your system:
apt-get -y update; apt-get -y dist-upgrade
Install all software needed to build synchronet, in this example, we will be building synchronet with DosEMU support which will require you to modify your apt sources.list
nano /etc/apt/sources.list and add “contrib” to the end of the main debian stretch repository:
deb http://cdn-aws.deb.debian.org/debian stretch main contrib deb http://security.debian.org/debian-security stretch/updates main deb http://cdn-aws.deb.debian.org/debian stretch-updates main
apt-get install make g++ linux-libc-dev libncurses5-dev libnspr4-dev cvs libcap2-dev libcap2-bin gdb zip unzip lrzsz gkermit build-essential libmozjs185-dev pkg-config dosemu
Download the Makefile and build Synchronet:
mkdir /sbbs cd /sbbs wget 'http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/install/GNUmakefile' make install SYMLINK=1 USE_DOSEMU=1
Add BBS users and change file permissions:
adduser bbs chown -R bbs.bbs /sbbs
Install ansi-bbs terminfo:
wget http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/install/terminfo tic terminfo
Run setcap to bind to low services and edit sbbs.ini to run as user “bbs”:
this will allow synchronet to bind to ports under 1000 as a non-priviliged user:
setcap 'cap_net_bind_service=+ep' /sbbs/src/sbbs3/gcc.linux.x64.exe.release/sbbs
find the line:
[UNIX] ; User/group name to run as ;User = admin ;Group = wheel
Change it to:
[UNIX] ; User/group name to run as User=bbs Group=bbs
Add Startup script:
paste the following contents:
[Unit] Description=Synchronet BBS service Documentation=man:sbbs After=syslog.target network.target [Service] Type=forking Environment=SBBSROOT=/sbbs SBBSCTRL=/sbbs/ctrl User=bbs Group=bbs PermissionsStartOnly=true ExecStartPre=/sbin/setcap 'cap_net_bind_service=+ep' /sbbs/src/sbbs3/gcc.linux.x64.exe.release/sbbs ExecStart=/sbbs/exec/sbbs -d ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure RestartSec=30 [Install] WantedBy=multi-user.target
systemctl enable sbbs service sbbs start
At this point, you should be able to telnet to your BBS on port 23 or visit the front-end web interface at http://<your ip>
for more information visit the Synchronet wiki at https://wiki.synchro.net