Files
bbs/docs/wiki/Running.md
T
Claude 2861ba44f0 Run on SQLite, PostgreSQL or MySQL
[general] database = takes SQLite's file as before, or a server's
address: postgres://... (pgx) or mysql://... / mysql:DSN
(go-sql-driver).  The store's SQL is written once; internal/store's
dialect gives each engine its forms of what differs: ? placeholders
($1 for PostgreSQL), ids returned by RETURNING or LastInsertId, upserts
(ON DUPLICATE KEY UPDATE), INSERT OR IGNORE, GREATEST, booleans, unique
violations, column checks for migrations, indexes.  The schema is one
list with types per engine: names match in any case (NOCASE, an ICU
collation made on PostgreSQL, utf8mb4_0900_as_ci), MySQL keeps indexed
text in VARCHARs and connects with the SQL mode the store wants (ANSI
quotes for "read" and "key", strict, rows matched not changed).
Existing SQLite databases are kept as they are.

bbs db copy DATABASE copies every table into a new database of any
engine, keeping ids (PostgreSQL's sequences set after).  Logs and bbs
check never show a server's password.

Under go test, BBS_TEST_DATABASE puts every test's store on a
PostgreSQL or MySQL server (a schema or database each, dropped after):
the whole suite passes on PostgreSQL 16 and MySQL 8.4 as on SQLite.
The store's own tests check what the engines do differently, and
copying from SQLite into each.

Also: the FTP tests' readiness probe now waits to be counted out, so the
per-address limit test no longer fails at random.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-12 09:09:42 +00:00

782 B

bbs -config /etc/bbs/bbs.conf check     # the configuration, its warnings
bbs -config /etc/bbs/bbs.conf init      # the database, with two areas
bbs -config /etc/bbs/bbs.conf user add sysop -sysop
bbs -config /etc/bbs/bbs.conf serve

bbs.service.sample runs it under systemd as its own user, with the database in /var/lib/bbs and sockets in /run/bbs.

Without -config it runs with the defaults: telnet and TN3270 on port 2300, modem callers raw on 127.0.0.1:2323, the database bbs.db here. The database can as well be PostgreSQL or MySQL: see Databases.

Day to day: Administration.

See also: Configuration, Administration