Getting Started & Deployment
Relevant source files
The following files were used as context for generating this wiki page:
BandaStation is a Space Station 13 codebase based on the /tg/station framework. This page details the environment setup, compilation procedures, and deployment requirements for both the core game server and its peripheral services, such as the User Interface (tgui) and Text-to-Speech (TTS) systems.
The project relies on specific versions of BYOND, Bun, and Rust utilities. Developers must compile both the DM code and the tgui assets to ensure a functional environment. Direct compilation in DreamMaker is deprecated and leads to missing asset errors.
Sources: README.md:1-50, dependencies.sh:1-35
Server Compilation
The project provides two primary methods for compiling the game server on Windows. Both methods generate the required .dmb file for DreamDaemon.
Quick Start Method
Run the bin/server.cmd script to automatically build the project and launch the server on port 1337.
Manual Build Method
- Execute
bin/build.cmd. - Wait for the compilation process (approximately 1-5 minutes).
- Once the script closes, open
tgstation.dmbin DreamDaemon to configure the server.
Build Dependencies
The project enforces specific versions for its toolchain to ensure compatibility:
| Dependency | Version |
|---|---|
| BYOND | 516.1685 |
| Bun | 1.3.5 |
| Rust-G | 7.0.0 |
| Python | 3.11.0 |
| SpacemanDMM | suite-1.11 |
Sources: README.md:23-38, dependencies.sh:5-25
TGUI Development & Build
tgui is the Javascript-based user interface framework. It requires a separate build step to generate the tgui.bundle.js asset needed by the game.
TGUI Build Workflow
The build process varies by platform and desired environment (development vs. production).
The diagram shows the branching paths between production builds and the live-reloading development server.
TGUI Commands
- Production Build: Use
bin/tgui-buildto compile assets and run code checks. - Dev Server: Use
bin/tgui-dev. This allows for hot-reloading interfaces while the game is running. - Cross-platform (Bun): Use
bun tgui:buildorbun tgui:dev.
Sources: tgui/README.md:55-80
Database Setup
BandaStation utilizes an SQL database for features like admin management, player whitelisting, and stat tracking. You must maintain the schema version to ensure compatibility with the game code.
Schema Versioning
Update DB_MAJOR_VERSION_220 and DB_MINOR_VERSION_220 in the subsystem defines whenever you modify the schema. As of current documentation, the latest version is 1.3.
Required Tables
The system requires several core tables for full functionality:
schema_revision_220: Tracks the current database version.admin_wl: Stores administrator ranks and permissions.ckey_whitelist: Manages player access for whitelisted servers.
Sources: SQL/bandastation/database_changelog.md:1-60
Service Deployment (TTS)
The Text-to-Speech system runs as a standalone service, typically within a Docker container.
Deployment Steps
- Navigate to
./tools/tts. - Install Docker.
- Execute
docker compose up -dto start the TTS API. - Set
TTS_HTTP_URLandTTS_HTTP_TOKENin the server configuration.
TTS Security
For production deployments, you must set a random string in TTS_HTTP_TOKEN and update the authorization_token variable in tts-api.py to match. This prevents unauthorized requests to the TTS service.
Sources: tools/tts/README.md:1-17, config/config.txt:515-520
Configuration Management
The config/config.txt file manages the server behavior. It uses $include directives to load sub-configs like dbconfig.txt and bandastation_config.txt.
Key Configuration Options
| Option | Description |
|---|---|
TICKLAG | Time between game ticks (default 0.5 for 20 FPS). |
PANIC_BUNKER | Denies connections from new ckeys if enabled. |
SQL_ENABLED | Enables database features (required for most logging). |
TTS_HTTP_URL | The endpoint for the TTS service. |
CACHE_ASSETS | Enables asset caching (recommended for production). |
Sources: config/config.txt:1-550
Summary
To deploy BandaStation, you must first ensure the BYOND and Bun environments match the versions specified in dependencies.sh. Compile the game using the provided .cmd scripts and build the tgui assets separately. If using SQL or TTS, configure the database schema and Docker containers before updating the config/config.txt parameters to link these services to the main game server.