Guide Modern DOSEMU2 setup for classic Synchronet DOS doors

From bare Ubuntu to fully working DOS doors, step by step.

This page walks you through installing DOSEMU2, wiring it into Synchronet, and running DOS doors like Wordle and Yacht on a modern Ubuntu server — using a configuration tested live on a production BBS.

Ubuntu + Synchronet no containers, no VMs
Drop-in config files ready to paste
Tested with Ubuntu + DOSEMU2 + FreeDOS 1.4 Scope Doors using DOOR.SYS + FOSSIL / UART
Sample session Node 1 · DOOR.SYS
sbbs@host:~$
sudo add-apt-repository ppa:dosemu2/ppa sudo apt update sudo apt install dosemu2 fdpp
C:\>
wordle.exe /D\SBBS\NODE1\DOOR.SYS Loading X00 FOSSIL driver... Mounting drives C:–H: Handshake with Synchronet node 1 OK.
If you already have Nigel’s bundle

Quickstart: drop-in DOSEMU2 package

Optional shortcut

If you prefer an opinionated, pre-packaged setup, Nigel’s DOSEMU2 tarball gives you a working configuration you can adapt:

curl -O https://www.endofthelinebbs.com/dosemu2.tar.gz
tar -xzf dosemu2.tar.gz
# Read the included README and move files into /sbbs/ and your home directory as directed.

Use this guide alongside that bundle to understand what each piece is doing and tune it for your own BBS.

Step 0

Prerequisites & mental model

Before you start, you should already have:

  • Ubuntu Linux server (SSH access, sudo available)
  • Synchronet installed at /sbbs/ and running
  • A dedicated sbbs user (non-root)
🧠
How this setup works

DOSEMU2 boots FreeDOS as if it were a tiny DOS PC. Synchronet launches DOSEMU2 with a custom external.bat script that:

  • mounts your FreeDOS image as C:
  • maps Synchronet directories as D:–H:
  • loads FOSSIL / SHARE utilities
  • executes your door’s command line

Once this base is correct, adding new DOS doors is mostly a matter of SCFG tweaks.

  • Install DOSEMU2 and grant Synchronet permission to bind ports
  • Copy FreeDOS into a place DOSEMU2 can boot from
  • Install DOS utilities used by many doors
  • Create DOSEMU2 + FreeDOS configs
  • Wire everything into sbbs.ini and SCFG
Step 1

Install DOSEMU2 on Ubuntu

Add the official DOSEMU2 PPA and install DOSEMU2 plus FreeDOS support:

sudo add-apt-repository ppa:dosemu2/ppa
sudo apt update

# DOSEMU2 + FreeDOS Pseudo-DOS Package
sudo apt install dosemu2 fdpp
🔐
Allow Synchronet to bind to low ports

If your sbbs binary is under /sbbs/repo/src/sbbs3/..., let it bind to privileged ports without running as root:

sudo setcap 'cap_net_bind_service=+ep' \
  /sbbs/repo/src/sbbs3/gcc.linux.x64.exe.release/sbbs
Step 2

Install and mount FreeDOS

We’ll unpack the FreeDOS 1.4 full USB image into your DOSEMU2 home.

# As the sbbs user
cd ~
wget https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.4/official/FD14FULL.img

mkdir -p ~/.dosemu/freedos
sudo mount -o loop,offset=32256 FD14FULL.img /tmp/freedos_mount
cp -r /tmp/freedos_mount/* ~/.dosemu/freedos/
sudo umount /tmp/freedos_mount

chmod -R u+w ~/.dosemu/freedos/

DOSEMU2 expects a drive_c directory in ~/.dosemu. Point that at your new FreeDOS tree:

ln -s ~/.dosemu/freedos ~/.dosemu/drive_c
🧩
FreeDOS layout

After this step, you should have:

  • ~/.dosemu/freedos – all FreeDOS files
  • ~/.dosemu/drive_c – symlink to that directory

DOSEMU2 boots this as C: in the DOS session.

Step 3

Install DOS utilities (FOSSIL, SHARE, EXITEMU)

Create a shared utilities directory for your doors:

sudo mkdir -p /sbbs/exec/dosutils

X00 FOSSIL driver

cd /tmp
wget https://www.bbsing.com/bbsfossil/x00150.zip
sudo unzip x00150.zip -d /sbbs/exec/dosutils/

# Many setups simply treat X00.SYS as X00.EXE
sudo cp /sbbs/exec/dosutils/X00.SYS /sbbs/exec/dosutils/X00.EXE

SHARE & DOSEMU helpers

cd ~/.dosemu/freedos
unzip packages/base/share.zip
cp BIN/SHARE.COM /sbbs/exec/dosutils/

cp /usr/share/dosemu/dosemu2-cmds-0.3/dosemu/fossil.com /sbbs/exec/dosutils/
cp /usr/share/dosemu/dosemu2-cmds-0.3/dosemu/exitemu.com ~/.dosemu/freedos/

sudo chown -R sbbs:sbbs /sbbs/exec/dosutils
🎛️
What these are for
  • X00 / fossil.com – FOSSIL driver for serial I/O from doors
  • SHARE.COM – file locking for multi-user safety
  • EXITEMU.COM – cleanly exit DOSEMU2 when the door finishes

external.bat will use these automatically.

Step 4

Configure FreeDOS for BBS use

Edit ~/.dosemu/freedos/fdconfig.sys and replace the existing content with:

!COUNTRY=001,858:\FREEDOS\BIN\COUNTRY.SYS
!LASTDRIVE=Z
!BUFFERS=20
!FILES=40
DOS=HIGH
DOS=UMB
DOSDATA=UMB
DEVICE=\FREEDOS\BIN\HIMEMX.EXE
DEVICE=C:\EMUFS.SYS
REM DEVICE=C:\NANSI.SYS
SHELLHIGH=\FREEDOS\BIN\COMMAND.COM \FREEDOS\BIN /E:2048 /P=\FDAUTO.BAT

Commenting out NANSI.SYS avoids “line too long” problems that can appear with Synchronet’s long REM lines in batch files.

⚠️
FreeDOS line length limits

FreeDOS batch lines max out around 255 characters. Since Synchronet injects a long debug REM line, it’s important to keep your batch files tidy and avoid unnecessary extra commands in FDAUTO.BAT.

Step 5

Wire DOSEMU2 into Synchronet

Tell Synchronet to use DOSEMU2

In /sbbs/ctrl/sbbs.ini, add or verify these under the [BBS] section:

[BBS]
UseDOSemu = true
DOSemuPath = /usr/bin/dosemu
DOSemuConfPath = /sbbs/ctrl/dosemu.conf

Create dosemu.conf

Create /sbbs/ctrl/dosemu.conf:

$_xms = (8192)
$_ems = (2048)
$_hdimage = "/home/sbbs/.dosemu/freedos /sbbs/node1 /sbbs/xtrn /sbbs/ctrl /sbbs/data /sbbs/exec"
$_lredir_paths = "/sbbs"
$_bootdrive = "c"
$_term_color = (on)
$_term_char_set = "cp437"
$_fixed_term_size = "80x25"

This maps your FreeDOS volume plus key Synchronet directories into the DOS environment as C:–H: for node 1. Additional nodes are handled via DOSEMU’s -d flags below.

Create dosemu.ini (templates)

Create /sbbs/exec/dosemu.ini:

inicmd=/usr/bin/env HOME=/sbbs/ctrl $DOSEMUBIN \
  -quiet \
  -d $NODEDIR -d $XTRNDIR -d $CTRLDIR -d $DATADIR -d $EXECDIR \
  -I"video { none }" \
  -I"serial { virtual com 1 }" \
  -f$DOSEMUCONF \
  -E$EXTBAT \
  -o$NODEDIRdosemu_boot.log $EXTLOG

[stdio]
cmd=/usr/bin/env HOME=/sbbs/ctrl $DOSEMUBIN \
  -quiet \
  -d $NODEDIR -d $XTRNDIR -d $CTRLDIR -d $DATADIR -d $EXECDIR \
  -I"video { none }" \
  -I'keystroke "\n"' \
  -I"serial { virtual com 1 }" \
  -f$DOSEMUCONF \
  -E$EXTBAT \
  -o$NODEDIRdosemu_boot.log $EXTLOG

The [stdio] section is used for text-mode doors where Synchronet handles terminal I/O.

-d  Map BBS dirs as DOS drives -I"video { none }"  Disable VGA/GUI -I"serial { virtual com 1 }"  Virtual COM1 -E$EXTBAT  Boot via external.bat

Create external.bat

Create /sbbs/exec/external.bat with:

@echo off
E:
IF "%STARTDIR%"=="" D:
IF NOT "%STARTDIR%"=="" CD %STARTDIR%

IF EXIST EMUSETUP.BAT GOTO EMULOCAL
IF EXIST F:\EMUSETUP.BAT GOTO EMUGLOBAL
IF EXIST E:\DOSUTILS\NUL GOTO NOEMU
IF EXIST H:\DOSUTILS\NUL GOTO NOEMU

ECHO ERROR: No emusetup.bat or DOSUTILS missing
GOTO EXEC

:EMULOCAL
CALL EMUSETUP.BAT
GOTO EXEC

:EMUGLOBAL
CALL F:\EMUSETUP.BAT
GOTO EXEC

:NOEMU
@set PATH=%PATH%;E:\dosutils;H:\dosutils
IF "$RUNTYPE" == "FOSSIL" x00.exe eliminate >NUL
@share >NUL

:EXEC
$CMDLINE
IF NOT "%1" == "TEST" exitemu

Synchronet expands environment variables like $STARTDIR, $CMDLINE and $RUNTYPE before DOSEMU2 sees this file.

📁
What all these variables mean
  • $STARTDIR – the SCFG “Start-up Directory” for the door
  • $CMDLINE – the full command line from SCFG
  • $RUNTYPE – usually FOSSIL or STDIO
  • %1 == TEST – allows test runs without auto-exiting DOSEMU
Step 6

Configure DOS doors in SCFG

Run SCFG as the sbbs user:

/sbbs/exec/scfg

Navigate to External Programs → Online Programs and add a new entry. These examples assume your doors live under /sbbs/xtrn.

Example: Wordle

Name:                      Wordle
Internal Code:             WORDLE
Start-up Directory:        /sbbs/xtrn/wordle
Command Line:              wordle.exe /D%f
Multiple Concurrent Users: No
Native Executable:         No
I/O Method:                FOSSIL or UART
Use Shell:                 No
Modify User Data:          Yes
BBS Drop File Type:        DOOR.SYS (52 lines)
Place Drop File In:        Node Directory

%f is replaced by Synchronet with the full path to the DOOR.SYS drop file.

Example: Yacht

Name:                      Yacht
Internal Code:             YACHT
Start-up Directory:        /sbbs/xtrn/yact
Command Line:              door.bat
Multiple Concurrent Users: No
Native Executable:         No
I/O Method:                FOSSIL or UART
Use Shell:                 No
Modify User Data:          No
BBS Drop File Type:        DOOR.SYS (52 lines)
Place Drop File In:        Start-Up Directory
Use forward slashes in arguments

Many doors expect a switch like /D, not \D. For DOOR.SYS paths, make sure you use /D%f and not a backslash version.

Step 7

Performance tweaks, logging & troubleshooting

Speed up DOSEMU boot

You can shave a bit off door startup by trimming ~/.dosemu/freedos/fdauto.bat. Comment out anything you don’t need:

REM call CDROM.BAT
REM FDAPM APMDOS
REM DOSLFN

You already disabled CD-ROM support in fdconfig.sys, so this mainly avoids unneeded device probing on each door launch.

When a door won’t start

# Synchronet logs
tail -f /sbbs/data/logs/*.log
# DOSEMU2 boot log for this node
cat /sbbs/node1/dosemu_boot.log
🕵️
Things to check
  • Does DOSEMU2 show your drives (C:–H:) in the boot log?
  • Is external.bat actually being invoked?
  • In SCFG, is I/O Method set to “FOSSIL or UART”?
  • Are permissions on /sbbs/data/logs/ writable by sbbs?
# Fix log permissions if needed
sudo chown -R sbbs:sbbs /sbbs/data/logs/
sudo chmod -R 755 /sbbs/data/logs/

# Verify DOS utils ownership
sudo chown -R sbbs:sbbs /sbbs/exec/dosutils

Display & terminal issues

  • Keep $_fixed_term_size = "80x25" in dosemu.conf.
  • Do not use DOSEMU’s -dumb flag — it can prevent external.bat from running.
  • Ensure your telnet / rlogin clients are using a CP437-friendly font for line-drawing characters.
Testing end-to-end

Once everything is wired up:

  1. Start Synchronet: /sbbs/exec/sbbs
  2. Connect via telnet: telnet localhost
  3. Log in and navigate to your External Programs menu
  4. Launch a DOS door and watch the logs if anything misbehaves