- Explain the host field and Start after creation in the create modal
- Mention Restart and listing in the in-game server browser
- Say where the Factorio credentials come from and what sharing them
with hosts means
- Explain that built in mods can be disabled but not removed
- Accounts are created for joining players with or without save
patching, the host falls back to reading joins from the server log
- Roles only need permissions on top of Player, and warn about
dangerous permissions and role self-assignment
- clusterioctl can live in any directory on any computer, and the web
interface can download its config
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/managing-a-cluster.md goes through the day to day tasks in the
web interface: logging in, hosts, instances, saves, mod packs, users
and roles, plugins and logs, each linking to the matching ctl
commands. It explains the data export needed for item icons, names
and mod settings, including that a host with only the headless build
exports no base game icons.
The mod section of the README moves into the guide so there is one
copy of it, and the README points to the guide and the ctl docs.
Part of #1254
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a setup section covering the installer, create-ctl-config, a
hand-made config and self-signed certificates. Documents the commands
that were missing or marked "To be written": controller and host
stop, restart and config, instance start, restart, stop, start-all,
stop-all, load-scenario, delete, send-rcon and export-data, saves,
config set-prop, mods, mod packs, user show and revoke-token, roles,
permissions and logs.
Part of #1254
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The document is a reference for the clusterioctl commands. The name
is freed up for a guide to managing a cluster.
Part of #1254
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Banned switch is now a staged edit like the roles and ban reason,
so Apply sends one ban that includes the reason. The ban reason only
shows while Banned is on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename save Copy to Duplicate, shorten the save buttons, move Load
scenario into the instance control button and Create template into
More, square off the online players table, show the bind address and
public URL on the controller page, restyle the user settings like the
role page, add a favicon with a controller.favicon_url override, and
put the page name in the tab title.
Closes#1260
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add save selection, name search and bulk transfer to the saves table
Rows get checkboxes and the header checkbox selects every save matching
the name search, including those on other pages. Selected saves can be
copied or moved to another instance in one go, with copy on by default.
Closes#1253
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add bulk copy, download and delete for selected saves
Copy picks name-2.zip, name-3.zip and so on, skipping names already
taken, because the host refuses to overwrite on copy. Downloads use a
link with the download attribute so several in a row do not cancel
each other.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Drop bulk copy from the selected saves actions
Copy on the same instance is rarely needed in bulk, and Transfer with
Copy ticked covers copying to another instance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy on the same instance is rarely needed in bulk, and Transfer with
Copy ticked covers copying to another instance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy picks name-2.zip, name-3.zip and so on, skipping names already
taken, because the host refuses to overwrite on copy. Downloads use a
link with the download attribute so several in a row do not cancel
each other.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A plugin action can be disabled, and it becomes the main button when
the user has no restart permission. Only the main button is disabled so
the menu stays usable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds control.hooks.pageActions. A plugin returns a function per page
(ControllerPage, HostViewPage, InstanceViewPage, UserViewPage) that is
called during render and returns menu items. Keys are prefixed with the
plugin name. Plugin items go after the built-in ones and before stop and
delete. The user page and instance templates get a More dropdown only
when a plugin adds actions.
Closes#1243
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows get checkboxes and the header checkbox selects every save matching
the name search, including those on other pages. Selected saves can be
copied or moved to another instance in one go, with copy on by default.
Closes#1253
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stop is always followed by a start, so the start is the one place that
needs it. The crash restart calls _startSave directly to keep its count.
Rename _runningSinceMs to _startedAtMs to match InstanceDetails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds instance.restart_after_crash (default off) and
instance.crash_retry_attempts (default 3, 0 for no limit). The host only
restarts an instance that ran for at least 10 minutes before exiting
unexpectedly, so a boot loop stops after one crash. A user stop, kill or
restart resets the count; it is not persisted across host restarts.
Closes#1251
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add a prepare release script
scripts/prepare_release.mts takes a version, sets it in the package.json
files under packages/ and plugins/, adds the pr_to_changelog.mts output to
the top of CHANGELOG.md, then commits "Prepare <version>" and tags it
v<version>. It does not push.
pr_to_changelog.mts now exports generateReleaseNotes() so the output can
be reused. The template comment in CHANGELOG.md is removed so the first
"## " heading is always the latest release.
Closes#1240
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Stop prepare_release on changelog problems unless --force
generateReleaseNotes() returns the errors and warnings from the pull
request changelogs instead of printing them. prepare_release.mts lists
them and aborts before touching any file, --force continues anyway.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The Version column is now a dropdown of every version of that mod on
the controller, newest first. Versions built for a different Factorio
version than the pack say so, and a pack version missing from the
controller stays listed as "(missing)". Mods with no other version,
built-in mods and removed mods still show plain text.
Closes#1245
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
generateReleaseNotes() returns the errors and warnings from the pull
request changelogs instead of printing them. prepare_release.mts lists
them and aborts before touching any file, --force continues anyway.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both pages share a useUploadProgress hook that wraps antd's default
request, lists each upload with bytes sent and a Cancel button, and
notifies with the controller's error message when an upload fails.
Mod uploads showed nothing before, and failures were silent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the connection drops while the body is being written, the pipe
destroys the file stream with an error before it has closed.
events.once then rejects on that error, so the temporary file was
never unlinked. A save upload cancelled from the web UI left a
<name>.tmp.zip in the instance saves folder, listed as a save.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/prepare_release.mts takes a version, sets it in the package.json
files under packages/ and plugins/, adds the pr_to_changelog.mts output to
the top of CHANGELOG.md, then commits "Prepare <version>" and tags it
v<version>. It does not push.
pr_to_changelog.mts now exports generateReleaseNotes() so the output can
be reused. The template comment in CHANGELOG.md is removed so the first
"## " heading is always the latest release.
Closes#1240
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plugins.checkEnabled(name) tells if a plugin is in the load list.
#plugin_module is renamed to #import_plugin. loadPluginMigrations moves
into PluginLoader.ts, leaving plugin_loader.ts with plugin discovery and
details, so it is renamed to plugin_info.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
controller.transfer_min_speed is now the speed that is never closed.
A check requires that speed over 60 s less 2 MiB, which covers the
bursts the OS sends data in, so at the default of 64 KiB/s the cutoff
is about 30 KiB/s. The requirement is at least 1 byte, so a transfer
that moved nothing is still closed at low settings.
The slow receiver test sends 16 MiB so that it spans real checks, and
two upload tests with set bursts cover the allowance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PluginLoader.load takes the plugin type, context, export name and base
class as options and is used by the controller, host, instance, ctl, web
interface and migrations. Module imports go through #plugin_module so the
node variant stays out of the web bundle. loadPlugin.ts and the loading
half of plugin_loader.ts are merged into it.
The loader lives for one load. Plugins reach it through context.plugins,
with waitFor(name, timeoutMs) and checkInstalled(name), replacing the
waitForPlugin methods. Waiting on a plugin that is not in the load list or
failed to load settles right away, as loading can't finish while the
waiting entrypoint is still running.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guard measures a proxy stream on completed writes to the receiver.
The OS buffers a couple of MiB per connection and only takes more once
a large part has been sent, so a slow receiver can go a long time with
no write completing. At the old default of 30 KiB per 30 s, downloads
well above that could be closed, and the slow receiver test failed
every run on Linux.
controller.transfer_min_progress (KiB per 30 s) is replaced by
controller.transfer_min_speed (KiB/s), defaulting to 64. At that speed
the measured 1.6 MB bursts come within the 30 second check. Configs
on the old default move to the new one, other values are converted.
The slow receiver test checks every 3 s instead of 500 ms, as with a
500 ms check it fails at any minimum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep yauzl and yazl types out of lib's published declarations
ZipArchive exposed yauzl.ZipFile and yauzl.Entry in its public members
and zipOutputStream took a yazl.ZipFile, so @types/yauzl and @types/yazl
had to be runtime dependencies of @clusterio/lib. They pull in
@types/node and undici-types, about 2.7 MB in every server install.
Entries are now typed with a local ZipEntry interface, the yauzl
ZipFile is private, and zipOutputStream takes any object with an
outputStream and an error event. ZipWriter.addEntry reads the
compressed bytes through the new ZipArchive.openRawStream. Both type
packages move to devDependencies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Explain why ZipEntry is a local type
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The assert polyfill is 28 KB in the web interface bundle and link only
uses it for plain truthiness checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ModPack and map exchange strings need synchronous inflate and deflate.
In the browser these came from the browserify-zlib polyfill, which
brings pako, assert and util along. The browser build now imports
fflate through a #zlib_sync subpath import, Node.js keeps node:zlib.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reading a mod zip needs zip_ops, which pulled yauzl into the web
interface bundle through the data classes. ModStore is node only, so
the zip reading now lives there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ZipArchive exposed yauzl.ZipFile and yauzl.Entry in its public members
and zipOutputStream took a yazl.ZipFile, so @types/yauzl and @types/yazl
had to be runtime dependencies of @clusterio/lib. They pull in
@types/node and undici-types, about 2.7 MB in every server install.
Entries are now typed with a local ZipEntry interface, the yauzl
ZipFile is private, and zipOutputStream takes any object with an
outputStream and an error event. ZipWriter.addEntry reads the
compressed bytes through the new ZipArchive.openRawStream. Both type
packages move to devDependencies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>