mcrcon - Man Page

send rcon commands to a Minecraft server

Synopsis

mcrcon [ options ] [ commands ]

Description

mcrcon is Minecraft rcon client for remote administration and server maintenance scripts.

Options

-H

Server address (default: localhost)

-P

Port (default: 25575)

-p

Rcon password

-t

Terminal mode

-s

Silent mode

-c

Disable colors

-r

Output raw packets

-w

Wait for specified duration (seconds) between each command (1 - 600s)

-h

Print usage

-v

Output version information

Commands with spaces must be enclosed in quotes.
mcrcon will start in terminal mode if no commands are given.

Environment Variables

Server address, port and password can be set with following environment variables:

MCRCON_HOST
MCRCON_PORT
MCRCON_PASS

Note that command-line options will override environment variables.

Examples

Make rcon connection in terminal mode using default port

mcrcon -H my.minecraft.server -p password

Send "weather clear" command to server using custom port 1337

mcrcon -H my.minecraft.server -P 1337 -p password "weather clear"

Send three commands ("say", "save-all", "stop") and wait five seconds between the commands.

mcrcon -H my.minecraft.server -p password -w 5 "say Server is restarting!" save-all stop

Bugs

Report bugs to tiiffi+mcrcon at gmail or https://github.com/Tiiffi/mcrcon/issues/

Info

October 2021 Version 0.7.2