- FastAPI backend with REST API endpoints - SQLite database for container metadata - Docker/Podman SDK integration with label filtering - Frontend: Server creation form and management page - Container operations: create, list, start, stop, delete - Single container deployment (nginx + Python + supervisor) - Support for Docker and Podman (rootless) - Volume management for persistent data
11 KiB
itzg Projects Reference
These are the core Docker projects by itzg that Stronghold will integrate with.
itzg/docker-minecraft-server
GitHub: https://github.com/itzg/docker-minecraft-server
Docs: https://docker-minecraft-server.readthedocs.io/en/latest/
Overview
Docker image for running Minecraft Java Edition servers. Automatically downloads the specified version at startup.
Key Features
- Automatic Version Management: Downloads and sets up the specified Minecraft version at startup
- Server Type Support: Supports multiple server types via
TYPEenvironment variable:- VANILLA
- PAPER (optimized, recommended)
- FORGE (modded servers)
- FABRIC (modded servers)
- SPIGOT
- BUKKIT
- And more
- Configuration via Environment Variables: Extensive configuration through environment variables for:
- Server properties (gamemode, difficulty, seed, etc.)
- Memory allocation (
MEMORY) - Java version selection
- Modpack installation
- Plugin management
- Modpack Integration:
- Supports Modrinth and CurseForge modpack installation
- Can download server packs automatically
- Handles mod installation and updates
- Feed the Beast (FTB) support
- Packwiz modpack support
- Data Persistence: Uses
/datavolume for:- World data
- Server configurations
- Mods and plugins
- Logs
- Health Monitoring: Built-in health checks
- RCON Support: Built-in RCON support for remote console access
- Resource Management: Memory and CPU allocation via Docker
Important Environment Variables
TYPE: Server type (VANILLA, PAPER, FORGE, FABRIC, etc.)VERSION: Minecraft version (LATEST, specific version, or SNAPSHOT)MEMORY: JVM memory allocationEULA: Must be set toTRUEto accept Minecraft EULAMOTD: Server message of the dayDIFFICULTY: Game difficultyMODE: Game mode (survival, creative, adventure, spectator)MODPACK: Modpack URL or ID for automatic installation
Mods and Plugins Management
Reference: itzg Mods and Plugins Documentation
Modpack Platforms Supported
- Modrinth: Auto-download modpacks from Modrinth
- CurseForge: Auto-download modpacks from CurseForge
- Feed the Beast (FTB): FTB modpack support
- Packwiz: Packwiz format modpacks
Modpack Installation Methods
-
MODPACK Environment Variable:
- Set
MODPACKto a zip file URL or container path - Automatically downloads and installs modpack
- Works with zip files containing jar files at top level
- Set
-
GENERIC_PACK / GENERIC_PACKS:
- Install all server content (jars, mods, plugins, configs) from zip/tgz
- Can apply CurseForge modpacks missing server start script
- Supports multiple packs:
GENERIC_PACKS=pack1,pack2 - Prefix/suffix support:
GENERIC_PACKS_PREFIXandGENERIC_PACKS_SUFFIX - Update checksum control:
SKIP_GENERIC_PACK_CHECKSUM,SKIP_GENERIC_PACK_UPDATE_CHECK,FORCE_GENERIC_PACK_UPDATE - Can disable specific mods:
GENERIC_PACKS_DISABLE_MODS
Individual Mod/Plugin Installation
-
MODS / PLUGINS Environment Variables:
- Comma or newline delimited list of:
- URLs of jar files
- Container paths to jar files
- Container paths to directories containing jars
- Example:
MODS: | https://example.com/mod1.jar /plugins/common/mod2.jar - Auto-removal: Entries removed from list automatically remove files from server
- Empty list removes all mods/plugins
- Comma or newline delimited list of:
-
MODS_FILE / PLUGINS_FILE:
- Path or URL to text file listing mod/plugin URLs (one per line)
- Blank lines and lines starting with
#are ignored - Useful for managing large mod lists
Volume Mount Points for Mods/Plugins
-
/pluginsVolume:- Syncs into
/data/pluginsfor plugin-based server types - Customizable:
COPY_PLUGINS_SRC,COPY_PLUGINS_DEST - Set
USES_PLUGINS=truefor hybrid mod-based loaders using plugins
- Syncs into
-
/modsVolume:- Syncs into
/data/modsfor mod-based server types - Customizable:
COPY_MODS_SRC,COPY_MODS_DEST
- Syncs into
-
/configVolume:- Syncs into
/data/configby default - Customizable:
COPY_CONFIG_SRC,COPY_CONFIG_DEST - Environment variable processing on config files
SYNC_SKIP_NEWER_IN_DESTINATION=falseto force overwrite
- Syncs into
-
Multiple Source Directories:
COPY_PLUGINS_SRC,COPY_MODS_SRC,COPY_CONFIG_SRCcan be comma/newline delimited lists- Allows combining shared and project-specific mods/plugins
Environment Variable Processing
- Config files matching suffixes in
REPLACE_ENV_SUFFIXES(default: "yml,yaml,txt,cfg,conf,properties,hjson,json,tml,toml") - Exclusions:
REPLACE_ENV_VARIABLES_EXCLUDES,REPLACE_ENV_VARIABLES_EXCLUDE_PATHS - Disable with:
REPLACE_ENV_DURING_SYNC=false
Removing Old Mods/Plugins
- REMOVE_OLD_MODS=TRUE: Delete old mods/plugins before installing new ones
- Fine-tuning options:
REMOVE_OLD_MODS_INCLUDE: Comma-separated glob patterns to includeREMOVE_OLD_MODS_EXCLUDE: Comma-separated glob patterns to excludeREMOVE_OLD_MODS_DEPTH: Maximum directory depth (default: 16)- Default: Only jar files are removed
Additional Configuration Files
- APPLY_EXTRA_FILES: Download/copy additional config files before server starts
- Format:
destination<source_urlordestination<source_path - Multiple entries with comma/newline separation
- Useful for baseline configs to be patched at runtime
- Processed before patch processing
Mods vs Plugins
- Mods: Client-side modifications for Forge/Fabric servers
- Modify rendering, add blocks, add behaviors
- Usually need to be installed on both client and server
- Plugins: Server-only modifications for Bukkit/Spigot/Paper
- Add behaviors, commands, features
- Only installed on server
- Hybrid: Some types like Magma use both mods and plugins
Usage Pattern
Stronghold will need to:
- Generate docker-compose.yml files or use Docker API to create containers
- Set appropriate environment variables based on user configuration
- Mount volumes for persistent data storage
- Expose appropriate ports
- Handle container lifecycle (start, stop, restart, delete)
itzg/docker-mc-proxy
GitHub: https://github.com/itzg/docker-mc-proxy
Overview
Docker image for running Minecraft proxy servers (BungeeCord, Waterfall, Velocity). Enables managing multiple Minecraft servers under a single proxy network.
Key Features
- Proxy Type Support:
- BungeeCord
- Waterfall (BungeeCord fork)
- Velocity
- Configuration Management:
- Configuration files via volume mounts
- Environment variable substitution in config files
- Automatic config synchronization
- Plugin Support:
- Plugins mounted via volumes
- Supports proxy-specific plugins
- Port Configuration:
- Default proxy port (25577) can be mapped
- Custom port configuration
- Health Checks: Built-in health monitoring
- Java Version Support: Multiple Java version tags available
- Multi-Architecture: Supports multiple CPU architectures
Usage Pattern
Stronghold will need to:
- Create proxy containers with appropriate type
- Configure proxy config files (config.yml, servers.yml, etc.)
- Link backend servers to the proxy
- Manage plugin installation
- Handle port mapping and routing
itzg/mc-router
GitHub: https://github.com/itzg/mc-router
Overview
Lightweight TCP reverse proxy/multiplexer for Minecraft Java servers. Routes client connections to backend servers based on the requested server address (SRV records or subdomain).
Key Features
- Dynamic Routing: Routes based on server address requested by client
- Docker Auto-Discovery: Automatically discovers running Minecraft containers
- Health Checks: Monitors backend server health
- Load Balancing: Can distribute connections across multiple servers
- REST API: Provides REST API for managing routes
- High Availability: Redirects to operational servers if one fails
- Configuration:
- Can be configured via environment variables
- Supports static route configuration
- Docker labels for dynamic discovery
Usage Pattern
Stronghold will need to:
- Deploy mc-router container alongside servers
- Configure routing rules (static or dynamic)
- Use Docker labels for auto-discovery
- Manage backend server registrations via REST API
- Monitor route health and availability
itzg/docker-rcon-web-admin
GitHub: https://github.com/itzg/docker-rcon-web-admin
Overview
Web-based admin interface for Minecraft servers via RCON (Remote Console).
Key Features
- RCON Integration: Connects to Minecraft servers via RCON protocol
- Web Interface: Browser-based console access
- Command Execution: Execute server commands remotely
- Log Viewing: View server logs in real-time
- Docker Integration: Runs as a side-car container
Usage Pattern
Stronghold may want to:
- Integrate RCON functionality directly rather than using separate container
- Use this as reference for RCON implementation
- Potentially use as a fallback/admin interface
Key Takeaways for Stronghold
-
Environment Variable Configuration: All itzg containers use extensive environment variable configuration. Stronghold needs a robust system for:
- UI to configure these variables
- Validating configurations
- Generating docker-compose.yml files or Docker API calls
-
Volume Management: Need to manage Docker volumes for:
- Server data persistence
- Configuration files
- Mods/plugins
- Backups
-
Network Management: Need to handle:
- Port allocation and mapping
- Internal Docker networking for proxy/server communication
- External port exposure
-
Lifecycle Management: Complete container lifecycle:
- Create (with proper configuration)
- Start/Stop/Restart
- Update/Upgrade
- Delete (with data handling)
-
Integration Points:
- Docker API for container management
- RCON for server console access
- Health checks for monitoring
- REST APIs (mc-router) for advanced routing
-
Mod/Plugin Management Complexity: The itzg container provides extensive mod/plugin management options:
- Multiple modpack platforms (Modrinth, CurseForge, FTB, Packwiz)
- Multiple installation methods (MODPACK, GENERIC_PACK, MODS/PLUGINS vars, file lists)
- Volume mounts for mods/plugins/configs
- Auto-removal of mods/plugins
- Environment variable substitution in configs
- Stronghold UI should simplify these options while exposing flexibility when needed
- Consider wizard-based flows for common scenarios (modpack installation) vs advanced configuration for power users