| Crates.io | rconc |
| lib.rs | rconc |
| version | 1.1.0 |
| created_at | 2025-03-09 02:48:39.16442+00 |
| updated_at | 2025-03-09 05:09:58.705366+00 |
| description | A simple RCON client. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1585054 |
| size | 42,156 |
rconc)A simple command-line RCON (Remote Console) client.
RCON is a protocol used to remotely execute commands on a game server, typically used for administrative tasks. This client allows you to connect to an RCON server and send commands from the command line.
RCON is used for many popular games, such as:
This crate is intentionally left “featureless”. It is simple, and perfect for scripting, for example in CRON jobs. It features two modes:
Both modes can be used in scripts.
rconc <host> <port> --password-file=<PWD> -- <command>
For example, to list all players on a Minecraft server:
rconc example.org 25575 --password-file /run/secrets/rcon_password -- list
rconc <host> <port> --password-file=<PWD>
For example, to give everyone a diamond, a free emerald, and a free netherite sword:
rconc example.org 25575 --password-file /run/secrets/rcon_password <<EOF
give @a diamond
give @a emerald
give @a netherite_sword
EOF
There are four ways to provide the RCON password:
rconc … --password=<PWD> …: Provide the password directly.rconc … --password-file=<PATH> …: Read the password from a file.RCON_PASSWORD=<PWD> rconc …: Read the password from the RCON_PASSWORD environment variable.RCON_PASSWORD_FILE=<PATH> rconc …: Read the password from the file specified in the RCON_PASSWORD_FILE environment variable.Especially when scripting, it is recommended to pass the password through a properly secured file.
Simply run rconc --help to see the available options:
A simple RCON client.
Usage: rconc [OPTIONS] <--password <PASSWORD>|--password-file <PASSWORD_FILE>> <HOST> <PORT> [COMMAND]...
Arguments:
<HOST> RCON server host
<PORT> RCON server port
[COMMAND]... By default, rcon-client will read a series of commands from stdin, one per line. You can also
provide a single command as arguments, which will run the client in "one-shot" mode. In this
mode, any stdin input will be ignored
Options:
--password <PASSWORD> RCON password [env: RCON_PASSWORD=]
--password-file <PASSWORD_FILE> Path to a file containing the RCON password. This is the preferred method
for providing the password [env: RCON_PASSWORD_FILE=]
--no-wait Don't wait for a response to the final command before exiting
--auth-timeout <AUTH_TIMEOUT> How many seconds to wait for the authentication response [default: 5]
-h, --help Print help
-V, --version Print version