mc run
mc run [OPTIONS]
Brings the instance in line with the manifest, then starts it. Anything
missing or out of date is installed first: the Java runtime, the Minecraft
binary, the mod loader, the mods (added, updated, and removed to match the
manifest), and the tunnel agent when a tunnel is configured. The generated
configuration files and player lists are rewritten from the manifest on
every start. A warning is printed for every key in the manifest’s
properties block that is not a known server property.
Only one running server is allowed per instance directory; a second
mc run refuses to start.
While the instance runs, mc supervises it, and scheduled backups fire when
enabled — see Backups. The instance’s console output
is hidden unless --server-logs is passed; it is always written to
instance/logs/ by the server itself. The console is not interactive; use
the remote console (RCON) for live administration.
mc reads the console output whether or not it is shown, and prints a status
line for the events it recognizes: a player joining or leaving the instance,
and a world save flushed to disk with the time it took. These are shown
with --verbose. A player dropped for any reason other than quitting or
the instance stopping, such as a timeout or a kick, is reported as a warning
with the reason in place of the leave line. A login turned away is reported
as a warning naming the cause: the allow list, a ban, a full instance, or a
taken name. Warnings are shown by default and hidden with --quiet.
Joined Notch
Saved all dimensions flushed to disk in 1.2s
warning: connection refused for Notch, the user is not in the allow list
With --server-logs, the console lines shown follow mc’s verbosity:
warnings and errors by default, more with --verbose. When the
jvm-arguments in the manifest select a logging configuration file of their
own, no events are recognized.
With a tunnel section, the tunnel agent starts beside the instance and
is restarted if it stops on its own; the public address is printed at
startup. The agent’s output is hidden unless --tunnel-logs is passed, and
goes to .tunnel/playitd.log otherwise. The first start from a terminal prints a claim link to approve in a
browser and saves the resulting secret under .tunnel/. Without a terminal
and without a secret, mc run fails with instructions rather than waiting —
see Tunnels.
Stopping
Ctrl-C (or SIGTERM, e.g. from a service manager, or SIGHUP, e.g. when the
terminal that started the instance closes) asks the instance to save the
world and shut down, and waits for it to exit before returning. If the
instance hangs past a grace period, or a second signal arrives, it is forced
down immediately.
A scheduled backup caught in flight is cancelled: it discards its partial archive and never damages stored backups — see Backups.
mc does not restart a crashed instance; run it under a supervisor for that — see Running under systemd.
Exit status
When the instance ends abnormally, mc run fails and propagates the
instance’s exit code.
Options
--manifest-path <PATH>— path tomc.kdl. Defaults to./mc.kdl.--lockfile-path <PATH>— path tomc.lock. Defaults to./mc.lock.--server-logs— show the instance’s console output in the terminal.--tunnel-logs— show the tunnel agent’s output in the terminal.