Skip to content

Driver Configuration File

FluffOS uses a runtime configuration file to specify various settings for the MUD server. This file is passed as an argument when starting the driver.

Basic Usage

bash
./driver path/to/config.cfg

File Format

  • Lines beginning with # are comments
  • Empty lines are ignored
  • Format: setting_name : value
  • Paths are relative to the mudlib directory (except mudlib directory itself)

Core Settings

Identity & Network

SettingDescriptionExample
nameName of your MUDname : My MUD
mud ipIP address to bind to (0.0.0.0 for all)mud ip : 0.0.0.0
port numberPrimary telnet portport number : 4000

External Ports

FluffOS supports multiple external ports with different protocols:

# Basic telnet port
external_port_1: telnet 5000

# WebSocket port
external_port_2: websocket 8080

# WebSocket with TLS
external_port_3: websocket 8443
external_port_3_tls: cert=path/to/cert.pem key=path/to/key.pem

# Telnet with TLS
external_port_4: telnet 4443
external_port_4_tls: cert=path/to/cert.pem key=path/to/key.pem

WebSocket Support:

websocket http dir : path/to/www

Specifies the directory containing the web client HTML/JS files.

Directory Structure

SettingDescriptionExample
mudlib directoryAbsolute path to mudlibmudlib directory : /home/mud/lib
log directoryWhere to store logslog directory : /log
include directoriesPaths for #include <>include directories : /include:/sys

Core Files

SettingDescriptionExample
master filePath to master objectmaster file : /single/master
simulated efun filePath to simul_efun objectsimulated efun file : /single/simul_efun
global include fileAuto-included in all objectsglobal include file : <globals.h>

Logging

SettingDescriptionExample
debug log fileDebug output filenamedebug log file : debug.log
log commandsLog all player commandslog commands : 0

Error Handling

SettingDescriptionExample
default error messageMessage when no action matchesdefault error message : What?
default fail messageDefault notify_fail messagedefault fail message : What?

Memory Management

SettingDescriptionExample
time to clean upSeconds before cleanuptime to clean up : 600
time to resetSeconds between resetstime to reset : 1800
time to swapSeconds before swaptime to swap : 300
evaluator stack sizeMax function call depthevaluator stack size : 65536
inherit chain sizeMax inheritance depthinherit chain size : 30

Performance & Limits

SettingDescriptionExample
maximum array sizeMax array elementsmaximum array size : 15000
maximum buffer sizeMax buffer sizemaximum buffer size : 400000
maximum mapping sizeMax mapping sizemaximum mapping size : 150000
maximum string lengthMax string lengthmaximum string length : 200000
maximum bits in a bitfieldMax bitfield sizemaximum bits in a bitfield : 12000
maximum byte transferMax bytes per read/writemaximum byte transfer : 200000
maximum read file sizeMax file read sizemaximum read file size : 200000

Execution Limits

SettingDescriptionExample
max eval costMax ticks per executionmax eval cost : 5000000
max local variablesMax local vars per functionmax local variables : 30
max call depthMax nested callsmax call depth : 150

Protocol Support

SettingDescriptionExample
enable mxpEnable MXP protocolenable mxp : 1
enable gmcpEnable GMCP protocolenable gmcp : 1
enable zmpEnable ZMP protocolenable zmp : 1
enable msspEnable MSSP protocolenable mssp : 1
enable mspEnable MSP protocolenable msp : 1

Compression

SettingDescriptionExample
compress protocolEnable MCCP2compress protocol : 1

Security

SettingDescriptionExample
valid bindCheck valid_bind() applyvalid bind : 1
valid overrideCheck valid_override() applyvalid override : 1

Example Configuration

###############################################################################
#                     FluffOS Configuration Example                          #
###############################################################################

# MUD Identity
name : MyMUD
mud ip : 0.0.0.0
port number : 4000

# Additional Ports
external_port_1: websocket 8080
external_port_2: telnet 5000

# WebSocket Client
websocket http dir : www

# Directory Structure
mudlib directory : /home/mud/lib
log directory : /log
include directories : /include:/sys

# Core Files
master file : /single/master
simulated efun file : /single/simul_efun
global include file : <globals.h>

# Logging
debug log file : debug.log

# Memory & Performance
time to clean up : 600
time to reset : 1800
max eval cost : 5000000
evaluator stack size : 65536

# Protocol Support
enable gmcp : 1
enable mxp : 1
compress protocol : 1

# Limits
maximum array size : 15000
maximum string length : 200000
maximum mapping size : 150000

Tips

Development Config:

  • Lower limits for faster testing
  • Enable debug logging
  • Shorter cleanup/reset times

Production Config:

  • Higher limits for performance
  • Minimal logging
  • Enable compression
  • Configure TLS for security

WebSocket Setup:

# Serve web client on port 8080
external_port_1: websocket 8080
websocket http dir : www

# Place your index.html in: mudlib/../www/

TLS Certificate Setup:

# Generate self-signed cert (development only)
openssl req -x509 -newkey rsa:4096 -keyout key.pem \
  -out cert.pem -days 365 -nodes

# Use in config
external_port_1: telnet 4443
external_port_1_tls: cert=etc/cert.pem key=etc/key.pem

See Also

Reference Files

  • Example config: testsuite/etc/config.test in the source
  • All options: See src/include/runtime_config.h