Overview

Date: 2026-05-11

Time: 15:23

Overview

ftl2-servercraft is a full application built on FTL2 that manages game server lifecycles (Minecraft NeoForge and Terraria) on Linode infrastructure. It demonstrates FTL2 used not as a one-off automation tool but as the infrastructure layer for a complete application with a TUI dashboard, background watchdog, backup/restore, and automatic idle teardown.

Key Concepts

Commands and Syntax


# FTL2 automation context — the core pattern
async with automation(...) as ftl:
    # Module access via attribute chains (group.module)
    ftl.minecraft.shell(cmd="...")
    ftl.terraria.dnf(name="...")

# Secret bindings in automation context
async with automation(
    secret_bindings={"LINODE_TOKEN": ..., "SLACK_TOKEN": ...}
) as ftl:
    ...

# CLI entry points
ftl2-servercraft            # Run the TUI
ftl2-servercraft status     # Check status without TUI
ftl2-servercraft --config my-servers.yml  # Custom config

# Development install
uv pip install -e .

# servers.yml structure
# Each entry specifies: script type, config_dir, and server params
# script: <game> maps to ftl2_servercraft/scripts/<game>.py

Relationships

Exam-Relevant Points