Skip to content

moshix/3270BBS

Repository files navigation

A 3270 BBS

This is the same code that runs my Forum3270 BBS for IBM 3270 terminals, real and emulated.

Just to make it clear, this BBS need to be accessed with an IBM 3270 terminal emulator, not Putty, or telnet. A web 3270 emulator is included in 3270BBS.

Table of Contents

Overview

3270BBS is an extremely efficient bulletin board system designed for IBM 3270 terminals. It uses minimal resources - supporting up to 50 concurrent users with only 25MB of memory, and has handled 150+ concurrent users with just 64MB. All data is stored in either an SQLite3 or a Postgres database, and after six months of heavy activity with hundreds of users and many hundreds of posted topics, the database remains under 50MB.

The system is heavily multi-threaded, making it blazing fast even on single-core systems, though more cores improve performance. It runs perfectly on small servers like Raspberry Pi or basic VPS instances, and particularly loves Linux/s390x.

There is a guided set-up which configures your BBS for your thru simple dialogues.

It comes with it's own database code, so you don't need to install any database server.

Requirements

  • No database is needed
  • No 3270 emulator is needed, web3270 is included in 3270BBS when it starts up
  • No compiler needed. 3270BBS is pre-compiled for your operating system

You only need:

  • About 5 min of your time to get it up and running.

Platform Support

Binary Supported
Linux 64amd
Linux i386 (32bit)
Linux 64arm
Linux s390x
FreeBSD
macOS Universal
Windows
Is it awesome?

Features

Feature Included
Includes its own 3270 client in browser
Virtual sessions mgmt with F23/F24
Discussion groups
A full BASIC interpreter inside the BBS!
A S/360 assembler learning environment
Federation of chat
Conferences and conference mgmt by moderators
Moderators can ban users from conferences
Messages
Live Chat
Private chat
Marketplace
User rolodex
About me page thru PUBLIC note
User management
Admin panels
Session management
DB creation script
Sqlite3 and PostgreSQL support
FTP Server for notes access
Web Server for notes, topics, sysadmin access
SDSF activity panel
Wordle in English/Italian/German
TSO command line with several utilities
Log viewer
TLS and TN3270 listeners
FTPD server and HTTPD server
SMTP server to receive emails,spam filter
Console view
All Seeing Eye from clock view
TLS and SSL support with certificates
SSH access to chat and topics
Screensaver to protect from burn-in
DELTAMON performance monitor
Doors to other 3270BBS communities
Discord access to Mainframe Enthusiasts Channel
User email verification during sign-up
SHA256 password hashing for all accounts
No root privileges required
SysOp-definable, dynamic logon screen logo
Support Sqlite3 and Postgres
Print by PDF to email
internal finger daemon
Pre-defined signature for editor use

Installation

  1. Download the binary for your platform and rename it to 3270bbs

  2. start the BBS with running the tsu binary it will guide you thru configuration and then create 2 users:

    • admin/admin - Administrative account (change password immediately)
    • noreply/noreply - Internal system messages account
  3. Edit the sample tsu.greet file (greeting for new users, max 80 characters wide)

  4. Start the BBS using the provided start_bbs.bash script (recommend logging output to a file)

  5. Announce your new BBS and consider submitting it to be listed in the Public Servers section

For installation questions, reach out to moshix on Forum3270.

Configuration

When you run the tsu command for the first time it will guide you thru a dialog to produce the tsu.cnf file for you.

You can change it a later time with your favorite editor. Below we explain the main config options:

# Server settings
# (c) 2026 by Moshix. All rights reserved.
# bbs_name is the name of your BBS, up to 10 characters wide only!
bbs_name=My3270BBS

# if you define dns_name then this is what will be shown in your logon screen,
# and DNS reverse lookup will not be used.
# this is useful if you are behind NAT such as in cloud service
dns_name=www.moshix.tech 

MOTD="Welcome to my 3270 BBS"

# 3270 ports
port=3270                  # port for non-encrypted traffic
tlsport=3271               # port for TLS 1.x encrypted traffic

# start TLS port?
start_TLS=yes

# your certificate
tlscert=your.crt
tlskey=your.key

# verify email address of new accounts, requires proper sendgrid key?
verify_newuser_email=no

# finger daemon 
fingerd_port=1079
start_fingerd=yes


#sendgrid API key
# add your sendgrid API key if you have one to allow your users to print by PDF to their email address
# configured in their profile
SENDGRID_API_KEY="123"

# notify admin user of new accounts?
notify_admin_new_accounts=yes

# how many emails per day can a non-admin user send max?
max_emails_per_day=5

# these conferences cannot be unsubscirbed
required_conferences="General","3270BBS","User content"

# SMTP server configruation, requires MX DNS entry
start_SMTPD=yes
smtp_port=25
smtp_domain=mail.moshix.tech

# web server port
httpd_port=9000            # port for the HTTPD listener

# FTP server settings
FTP_port=2100              # Port for FTP server (default: 2100)
FTP_limit=20               # Maximum file size in KB (default: 20)
start_FTPD=no

# other servers
start_proxy3270=yes
start_HTTPD=yes

# ssh server settings
start_SSHD=yes
sshd_port=2022


#federated newsgroup settings (contact moshix at Forum3270, if you want to federate)
newsgroup_db_address=
newsgroup_db_port=
newsgroup_db_user=
newsgroup_db_password=
newsgroup_db_name=





# remote mainframe settings for v27.0 and up
# Up to 15 can be configured.
# The remote hosts are being read in dynamically at runtime
# So you can make changes to the tsu.cnf file for remote hosts without needing to restart the BBS
remote1=Forum3270
remote1_description="moshix Forum3270"
remote1_addr=www.moshix.tech
remote1_port=2300

remote2=SDFVM
remote2_description="VM/SP rel5 with PROFS at SDF"
remote2_addr=sdfvm.sdf.org
remote2_port=24

remote3=Secureproxy3270
remote3_description="Some other mainframe"
remote3_addr=9.9.1.1       # IPv6 also works!
remote3_port=3270

Custom Logo: Customize tsu.logo for your logon screen (only first 8 lines used)

Required Conferences: To prevent users from unsubscribing from certain conferences, add to tsu.cnf:

required_conferences="General","3270BBS","User content"

TLS Terminal Access

For secure TLS access, you'll need certificates specified in tsu.cnf with the tlscert and tlskey parameters.

SSH Access

Configure the SSHD port in tsu.cnf. Users must be registered to use SSH access, using the same password as 3270 access. SSH mode provides limited features (chat and topics) as this is primarily a 3270 BBS.

Federated Chat

3270BBS instances can participate in federated worldwide chat, provided they have at least 50 registered users. Operators must contact moshix for credentials and configuration. Good standing in Forum3270 is required.

Operation

Content Editing

3270BBS includes a built-in editor for Topics, Posts, Notes, marketplace items, and Messages. The editor features a spell checker enhanced with mainframe terminology (JCL, ABEND, etc.). There is also a built-in ISPF editor to edit BASIC and Assembler programs.

We use ANSI code page 1047 as the standard code page in 3270BBS This means we don't support foreign language character sets.

Rendering Tags: Messages and topics support color tags (best placed on their own lines):

  • <<blue>>, <<white>>, <<red>>, <<pink>>, <<green>>, <<yellow>>, <<turquoise>>
  • <<reverse>> and <</reverse>>

Editor Function Keys:


F2  = Spell checker
F3  = Abandon edit session
F4  = Delete current line
F5  = Insert line below
F6  = Insert line above
F7  = Scroll up
F8  = Scroll down
F9  = Go to bottom of text
F10 = Center current line
F11 = Make centered box
F12 = Save and exit
F13 = Centered box until next empty row
F14 = Go to first line of text
F15 = Make left aligned box
Save content with SAVE
Exit editor unsaved with CANCEL

User and Content Management

Key Functions:

  • F1 - Help screen
  • F23 - Create new virtual session
  • F24 - Switch between virtual sessions (max 2)

Daily Maintenance: The BBS is very stable and can run for months, but requires regular content moderation. Daily pruning is easier than periodic mass cleanup. Use remove_old_users.bash to prune inactive users (removes users but preserves their posts/topics).

User Tools:

  • Users can delete their own accounts from the Edit Profile option (0) in main menu
  • Password recovery available via PF9 from logon panel
  • insert_to_dictionary.bash - Add words to spell checker dictionary

FTP/HTTP Access: If enabled, users can upload/download notes directly, allowing external editing of longer content. Notes can be converted to posts with a single function key.

Admin Only Panels

  • LOG command from main menu
  • F4 from SDSF
  • Start/stop components from MVS Console in Extended Menu

SDSF Commands

Admins can issue these commands from the SDSF Activity screen:

P FTPD              - Stop the FTPD server
S FTPD              - Start the FTPD server
P PROXY             - Stop the PROXY server
S PROXY             - Start the PROXY server
P HTTPD             - Stop the HTTPD server
S HTTPD             - Start the HTTPD server
P TN3270TLS         - Stop the TLS listener
S TN3270TLS         - Start the TLS listener
P TN3270            - Stop the TN3270 listener
S TN3270            - Start the TN3270 listener

C U=MOSHIX          - Terminate session of user MOSHIX
$PJES2,TERM         - Terminate the BBS gracefully
LOG                 - View BBS log (F7/F8 navigate, TOP/BOT for extremes)

Additional admin panels for Users, Topics, and Posts management are also available.

Proxying to Another Mainframe

3270BBS can proxy users to other mainframes configured in tsu.cnf (enable PROXY server in config or from SDSF). The remote system can be another 3270BBS instance or any mainframe.

Return to BBS: Press PA3 attention key in your terminal emulator.

Backup Strategy

Since the SQLite3 database runs in WAL mode, you cannot simply copy tsu.db. Instead, dump the database regularly to .sql files:

# Example backup command
sqlite3 tsu.db .dump > backup_$(date +%Y%m%d).sql

Technical Implementation Details

The application consists of roughly 110,000 lines of Go code. The most complex component is the real-time chat system, which is heavily multi-threaded. For implementation details, see this documentation.

Built using the go3270 library by racingmars.

Code Page Support

We support code page 1047 thruout the application. You can enable optional code page 310 with F2 in main menu to have overlay boxes drawn with graphical elements for much better look. Emulators known to support CP310 are: x3270, c3270, Glink3270, Vista3270, pw3270.

Roadmap

User Web Pages: If the web server is enabled and a user has a Note called Public, its content will be displayed at http://3270bbswebsite/username

Future Plans:

  • Export Conferences content as RSS Feed
  • Easter eggs to be discovered by the community

Final Notes

This BBS application is made available in binary form only, strictly as is. It is provided without warranties of any kind, either express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.

The developers assume no responsibility or liability for any direct, indirect, incidental, or consequential damages that may result from the use, misuse, or inability to use this software. You are using this application at your own risk.

No technical support, updates, or maintenance releases are guaranteed. However, feedback and bug reports may be submitted through the appropriate community channels, and while not promised, improvements may be considered in future builds.

By using this software, you agree to abide by any applicable local, national, or international laws regarding software usage and telecommunications. Unauthorized modification, reverse engineering, or redistribution is strictly prohibited unless explicitly permitted by the license or author.


Moshix, April 3, 2026 - Cutchogue

About

a BBS for 3270 terminals

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors