Files
BastiaanandClaude Opus 5.5 2cca280e30 Use controller.hosts.records for the host datastore (#520)
clusterio #1180 made controller.hosts a HostManager. The datastore with
set and the update event now lives on controller.hosts.records.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 14:29:58 +00:00
..
2026-10-13 21:01:48 +01:00
2026-10-28 23:58:51 +00:00
2026-09-26 23:26:00 +01:00
2026-09-17 19:39:31 +00:00

ExpGaming - Auto Restart

Restarts hosts, and optionally the controller, that need a restart once nobody is playing on them.

A host needs a restart after a plugin is installed or updated, after a clusterio update, and after a config change that only applies on restart. The web UI shows this as "Restart Required". This plugin waits until the host has had no players online for a while and then sends it the same restart request the web UI button does.

Restarting a host stops every instance on it. Once the host is back, the instances that were running are started again. Instances with auto start enabled are started by the host itself.

Requirements

  • Hosts must be run with --can-restart so their process monitor starts them again. The systemd units and run scripts written by the installer do this.
  • controller.system_metrics_interval must be above 0. That poll is how the controller learns a host needs a restart.
  • Plugins added outside clusterio, for example checked out into external_plugins, do not mark the host as needing a restart. Use "Mark Restart Required" on the host page, or clusterioctl host mark-restart-required <host>, so this plugin picks it up.
  • With restart_controller enabled, the controller must also be run with --can-restart. The controller is not restarted if the installed clusterio version is older than the running one.

Config

All fields are on the controller.

Field Default Description
exp_auto_restart.idle_seconds 300 How long a host must have had no players online before it is restarted.
exp_auto_restart.scope host With cluster, players on any host hold back every restart.
exp_auto_restart.start_instances true Start the instances that were running again once the host is back.
exp_auto_restart.restart_controller false Also restart the controller when it needs it and no players are online anywhere.

Hosts are checked every 10 seconds. A host that refuses the restart, for example because it was not run with --can-restart, is logged once and left alone until its process changes.