Plugins with only host, instance or ctl code have no reason to ship a webpack build, yet the plugin list showed "Missing dist/web/manifest.json" as an error for them and the controller logged a warning on every start. Decide whether a build is expected from the plugin declaration, using the same rule the create tool uses to decide when to generate one: a web or controller entrypoint, or any config fields. Plugins outside that rule get no bundle path and no error, the web UI skips loading them, and the plugin pages show them as having no web module instead of an error or a prompt to reload. Fixes #1004 Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Clusterio Controller
Communication hub for Clusterio clusters. The controller forwards data between Clusterio hosts connected to it and allows the cluster to be remotely managed through WebSocket connections to it either by using the included web interface or the Clusterio ctl command line utility.
Usage
npx clusteriocontroller <command>
Common options:
-
--plugin-list <file>JSON file to use for storing the list of plugins that are available to the controller. Defaults toplugin-list.jsonand will be created if it does not exist. See theplugincommand for managing this list. -
--config <file>JSON file to use for storing configuration for the controller. Defaults toconfig-controller.jsonand will be created if it does not exist. See theconfigcommand for inspecting and modifying the configuration.
plugin <command>
Configure plugins available to be loaded by the controller. The available plugins will be loaded unless they have been disabled in the configuration, see the config command for disabling plugins.
plugin add <path>
Add plugin either by require path or relative/absolute path to the plugin directory. A relative path must start with ./ or ../ (or .\ and ..\ on Windows) otherwise it will be assumed to be a require path for an installed package in node_modules.
For example, installing the Subspace Storage plugin:
npm install @clusterio/plugin-subspace_storage
npx clusteriocontroller plugin add @clusterio/plugin-subspace_storage
Since the plugin-list.json is shared between controller, host and ctl you usually only need to do this once per machine.
plugin remove <name>
Remove a plugin by its name. This should be done before uninstalling the plugin, otherwise there will be an error when Clusterio tries to load the info from the plugin. Removing and unistalling a plugin is usually not neccessary as the functions provided by the plugin can be disabled in the config.
For example, uninstalling the Subspace Storage plugin:
npx clusteriocontroller plugin remove subspace_storage
npm uninstall @clusterio/plugin-subspace_storage
Since the plugin-list.json is shared between controller, host and ctl you usually only need to do this once per machine.
plugin list
Lists the plugins set up to be available by name followed by path.
config
Manage the controller configuration offline. This should only be used when the controller is stopped, otherwise the config read might be out of date and config changes will be overwritten when the controller shuts down.
config set <config-entry> [value]
Set a config entry to the given value. If value is not provided the entry is set to null. If the config entry is of type object the value must be a valid JSON serialization of an object.
See docs/configuration.md in the main repositiory for the available configuration entries.
config show <config-entry>
Shows the value for a single config entry.
config list
Lists up all configuration entries with their currently configured values.
bootstrap
Commands for setting up initial admin acount and access to the cluster.
bootstrap create-admin <name>
Creates a new user account with the given name if it does not already exist in the cluster and grant it full cluster admin permission. You should be using your own Factorio multiplayer username here.
bootstrap generate-user-token <name>
Generate an access token for logging in and possibly managing the cluster from the given user account.
This can be used both in the web interface and as the controller_token to connect with clusterioctl.
bootstrap create-ctl-config <name>
Creates a clusterioctl config for the given user with url and token set up for connecting to the cluster.
copy-static [target]
Copies the static web assets to the given target folder (which defaults to ./static/).
Useful in case you want to host the assets on a CDN or separate web server and want provide the files directly instead of fetching them from the controller.
Note that mod pack exports will create additional static files that also have to be hosted, these are written to the ./static/ folder in the clusterio installation directory.
See also the controller.public_url config option for setting where static assets are loaded from.
run
Runs the controller.
See Also
The Clusterio repository for instructions on how to set up a cluster.