Difference between revisions of "RCON"
m (Removed swears)
|Line 1:||Line 1:|
RCON is a protocol introduced in 1.9pre4 for the purpose of remote administration of a server. It's basically
RCON is a protocol introduced in 1.9pre4 for the purpose of remote administration of a server. It's basically implementation of the Source RCON protocol [http://developer.valvesoftware.com/wiki/Source_RCON_Protocol]
== Server Config ==
== Server Config ==
Revision as of 01:09, 9 December 2015
RCON is a protocol introduced in 1.9pre4 for the purpose of remote administration of a server. It's basically an implementation of the Source RCON protocol for Minecraft 
enable-rcon=true rcon.password=<your password> rcon.port=<1-65535> broadcast-rcon-to-ops=false
The default port is 25575.
Integers are little-endian, in contrast with the Beta protocol.
Responses are sent back with the same Request ID that you send.
In the event of an auth failure (i.e. your login is incorrect, or you're trying to send commands without first logging in), request ID will be set to
|Field name||Field Type||Notes|
|Length||int||Length of remainder of packet|
|Request ID||int||Client-generated ID|
|2-byte pad||byte, byte||Two null bytes|
Outgoing payload: password.
If the server returns a packet with the same request ID, auth was successful (note: packet type is 2, not 3). If you get an request ID of -1, auth failed (wrong password).
Outgoing payload should be the command to run, e.g.
time set 0
0: Command response
Incoming payload is the output of the command, though many commands return nothing, and there's no way of detecting unknown commands.
The output of the command may be split over multiple packets, each containing 4096 bytes (less for the last packet). Each packet contains part of the payload (and the two-byte padding). The last packet sent is the end of the output.
Maximum request length: 1460 (giving a max payload length of 1446)
Code exists in the notchian server to split large responses (>4096 bytes) into multiple smaller packets. However, the code that actually encodes each packet expects a max length of 1248, giving a max response payload length of 1234 bytes.
- https://github.com/barneygale/MCRcon (python, basic, synchronous)
- https://gist.github.com/1292348 (php, basic, synchronous)
- https://github.com/tehbeard/node-rcon (node.js, basic, asyncronous)
- https://bitbucket.org/jyc/rcon.js (RingoJS, synchronous, BSD-licensed)
- https://bitbucket.org/jyc/rcon (PHP, synchronous, BSD-licensed)
- https://github.com/A2PLab/minelib (basic, Scala)
- https://github.com/tiiffi/mcrcon (C, synchronous, zlib/libpng License)
- https://github.com/katnegermis/pocketmine-rcon (go, basic, synchronous)
- https://github.com/SommerEngineering/MinecraftServerRCONSharp (.NET/Mono, C#, thread-safe)