What are Workflows?
Workflows define the sequence of actions executed during server lifecycle events. They handle everything from copying template files to installing plugins and applying configurations.How Workflows Work
During server preparation:- Serverhost receives a start request from the Controller
- Loads the setup workflow from
workflows/internal/setup.yml - Executes each step in order with the server context
- Reports status back to the Controller
- Server stop signal received
- Loads the cleanup workflow from
workflows/internal/cleanup.yml - Executes cleanup steps (cache push, directory deletion)
Workflow Structure
Workflows are YAML files in theworkflows/ directory:
Built-in Workflows
Setup Workflow
The default setup workflow (workflows/internal/setup.yml) performs:
- Cache Pull - Copy cached files from previous runs
- Template Copy - Apply template hierarchy (every, type, software, tagged)
- Plugin Installation - Download and install plugins
- Configuration - Apply configurators for server software
Cleanup Workflow
The cleanup workflow (workflows/internal/cleanup.yml) performs:
- Cache Push - Save reusable files for faster future starts
- Directory Deletion - Remove the server directory
Workflow Actions
copy
Copies files or directories from source to destination.
| Field | Type | Description |
|---|---|---|
from | path | Source file or directory |
to | path | Destination file or directory |
replace | boolean | Overwrite existing files (default: true) |
create-dirs | boolean | Create parent directories if missing (default: true) |
delete
Deletes a file or directory.
| Field | Type | Description |
|---|---|---|
path | path | File or directory to delete |
force | boolean | Force deletion (default: true) |
for-each
Iterates over a list and executes nested steps for each item.
| Field | Type | Description |
|---|---|---|
items | list | Items to iterate over |
as | string | Variable name for current item |
steps | list | Steps to execute for each item |
plugins-load
Installs plugins from configured sources (Modrinth, Hangar, Spigot, URL).
| Field | Type | Description |
|---|---|---|
dir | path | Directory to install plugins into |
- Server software (Paper, Velocity, etc.)
- Minecraft version
- Platform compatibility
configurator
Applies a configurator to configure server files.
| Field | Type | Description |
|---|---|---|
configurator | string | Configurator name (from options/configurators/) |
dir | path | Server directory to configure |
Placeholders
Workflows support dynamic placeholders replaced at runtime:Server Context
| Placeholder | Description |
|---|---|
{{server-dir}} | Server’s working directory |
{{server-name}} | Server name (e.g., lobby-1) |
{{group}} | Group name |
{{port}} | Assigned port |
{{max-players}} | Maximum player count |
{{memory}} | Allocated memory (MB) |
Path Context
| Placeholder | Description |
|---|---|
{{templates}} | Templates base directory |
{{running}} | Running servers directory |
{{cache}} | Cache directory |
Blueprint Context
| Placeholder | Description |
|---|---|
{{configurator}} | Configurator name from blueprint |
{{software}} | Server software (paper, velocity, etc.) |
{{minecraft-version}} | Minecraft version |
{{type}} | Server type (proxy, server, lobby) |
Custom Properties
Access custom properties from the server:$. prefix accesses the server’s properties map.
Default Setup Flow
The built-in setup workflow follows this order:Customizing Workflows
Override Default Workflow
Create your own setup workflow:Add Custom Steps
Extend the workflow with additional actions:Troubleshooting
Workflow Not Executing
- Check workflow file exists at
workflows/internal/setup.yml - Verify YAML syntax is valid
- Check serverhost logs for errors
Placeholder Not Replaced
- Ensure placeholder syntax is correct:
{{name}} - Verify the property exists in the server context
- For custom properties, use
{{$.property-name}}
Copy Action Fails
- Verify source path exists
- Check file permissions
- Ensure
create-dirsis enabled if parent directories don’t exist
Plugin Installation Fails
- Check network connectivity to plugin sources
- Verify plugin exists for the specified Minecraft version
- Check
options/modrinth-platform-mappings.ymlfor software mappings