<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ARCON</id>
	<title>Minecraft:RCON - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ARCON"/>
	<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:RCON&amp;action=history"/>
	<updated>2026-10-20T01:16:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Minecraft:RCON&amp;diff=230582&amp;oldid=prev</id>
		<title>SyncBot: Sync: new page from Minecraft</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:RCON&amp;diff=230582&amp;oldid=prev"/>
		<updated>2026-10-19T11:19:51Z</updated>

		<summary type="html">&lt;p&gt;Sync: new page from Minecraft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{exclusive|java}}&lt;br /&gt;
{{Warning|It is &amp;#039;&amp;#039;&amp;#039;dangerous&amp;#039;&amp;#039;&amp;#039; to expose RCON ports to the internet. RCON is not encrypted and can be a subject to {{w|man-in-the-middle attack}}s.}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Remote console&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;RCON&amp;#039;&amp;#039;&amp;#039;) is a {{w|TCP/IP}}-based protocol that allows server administrators to remotely execute [[Minecraft:commands]]. Introduced in [[Minecraft:Java Edition Beta 1.9 Prerelease 4]], it&amp;#039;s an implementation of the [https://developer.valvesoftware.com/wiki/Source_RCON_Protocol Source RCON protocol] for &amp;#039;&amp;#039;Minecraft&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== server.properties ==&lt;br /&gt;
{{main|server.properties}}&lt;br /&gt;
&lt;br /&gt;
To enable RCON, you need to edit your [[Minecraft:server.properties]] file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=ini&amp;gt;&lt;br /&gt;
enable-rcon=true&lt;br /&gt;
rcon.password=&amp;lt;your password&amp;gt;&lt;br /&gt;
rcon.port=&amp;lt;1-65535&amp;gt;&lt;br /&gt;
broadcast-rcon-to-ops=false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default port is 25575.&lt;br /&gt;
&lt;br /&gt;
== Packet format ==&lt;br /&gt;
&lt;br /&gt;
Integers are {{wp|little-endian}}, in contrast with the [[Minecraft:Java Edition protocol|&amp;#039;&amp;#039;Java Edition&amp;#039;&amp;#039; protocol]].&lt;br /&gt;
&lt;br /&gt;
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&amp;#039;re trying to send commands without first logging in), request ID will be set to &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 ! Field name&lt;br /&gt;
 ! Field type&lt;br /&gt;
 ! Notes&lt;br /&gt;
 |- &lt;br /&gt;
 | Length&lt;br /&gt;
 | int32&lt;br /&gt;
 | Length of &amp;#039;&amp;#039;remainder&amp;#039;&amp;#039; of packet&lt;br /&gt;
 |-&lt;br /&gt;
 | Request ID&lt;br /&gt;
 | int32&lt;br /&gt;
 | Client-generated ID&lt;br /&gt;
 |-&lt;br /&gt;
 | Type&lt;br /&gt;
 | int32&lt;br /&gt;
 | &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; for login, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; to run a command, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for a multi-packet response&lt;br /&gt;
 |-&lt;br /&gt;
 | Payload&lt;br /&gt;
 | byte[]&lt;br /&gt;
 | NULL-terminated ASCII text&lt;br /&gt;
 |-&lt;br /&gt;
 | 1-byte pad&lt;br /&gt;
 | byte&lt;br /&gt;
 | NULL&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Note on ASCII text: &lt;br /&gt;
Some servers reply with color codes prefixed by a section sign in their replies (for example Craftbukkit for Minecraft 1.4.7).&lt;br /&gt;
&lt;br /&gt;
The section sign is sent by those servers as byte 0xA7 or 167. This is not part of the US-ASCII charset and will cause errors for clients that strictly use the US-ASCII charset.&lt;br /&gt;
&lt;br /&gt;
Using the ISO-LATIN-1/ISO-8859_1 charset instead of the US-ASCII charset yields much better results for those servers.&lt;br /&gt;
&lt;br /&gt;
Alternatively removing byte 167 and one subsequent byte from the payload will remove all color tokens making the text more human readable for clients that do not subsequently colorize those tokens.&lt;br /&gt;
&lt;br /&gt;
== Packets ==&lt;br /&gt;
&lt;br /&gt;
=== 3: Login === &lt;br /&gt;
&lt;br /&gt;
Outgoing payload: password. &lt;br /&gt;
&lt;br /&gt;
If the server returns a packet with the same request ID, auth was successful (note: packet type is 2, not 3). If you get a request ID of -1, auth failed (wrong password).&lt;br /&gt;
&lt;br /&gt;
=== 2: Command ===&lt;br /&gt;
&lt;br /&gt;
Outgoing payload should be the command to run, e.g. &amp;lt;code&amp;gt;time set 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0: Command response ===&lt;br /&gt;
&lt;br /&gt;
Incoming payload is the output of the command, though many commands return nothing, and there&amp;#039;s no way of detecting unknown commands.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Fragmentation ==&lt;br /&gt;
&lt;br /&gt;
Maximum C-&amp;gt;S packet payload length: 1446 (total: 1460) - outdated?&lt;br /&gt;
&lt;br /&gt;
Maximum S-&amp;gt;C packet payload length: 4096 (total: 4110)&lt;br /&gt;
&lt;br /&gt;
The Minecraft server can fragment responses across multiple packets. There&amp;#039;s no simple way to know when the last response packet has been received; approaches include:&lt;br /&gt;
&lt;br /&gt;
# Wait until we receive a packet with a payload length &amp;lt; 4096 (not 100% reliable!)&lt;br /&gt;
# Wait for &amp;#039;&amp;#039;n&amp;#039;&amp;#039; seconds&lt;br /&gt;
# Send &amp;#039;&amp;#039;two&amp;#039;&amp;#039; command packets; the second command triggers a response from the server with the same Request ID, and from this we know that we&amp;#039;ve already received the full response to the first command.&lt;br /&gt;
#* The second packet should use a command that will not produce fragmented output&lt;br /&gt;
#* An alternative is for the second C-&amp;gt;S packet to use an invalid type (say, 200); the server will respond with a &amp;#039;Command response&amp;#039; packet with its payload set to &amp;#039;Unknown request c8&amp;#039;. (200 in hexadecimal)&lt;br /&gt;
&lt;br /&gt;
== Example implementations ==&lt;br /&gt;
&lt;br /&gt;
; C&lt;br /&gt;
* https://github.com/tiiffi/mcrcon (synchronous, Zlib license)&lt;br /&gt;
; C#&lt;br /&gt;
* https://github.com/willroberts/minecraft-client-csharp (synchronous, GPL 3.0 license)&lt;br /&gt;
; Dart&lt;br /&gt;
* https://github.com/aidanlok/mc_rcon (client, asynchronous, BSD 3-Clause license)&lt;br /&gt;
; Go&lt;br /&gt;
* https://github.com/micvbang/pocketmine-rcon (synchronous, MIT license)&lt;br /&gt;
* https://github.com/willroberts/minecraft-client (asynchronous, GPL 3.0 license)&lt;br /&gt;
* https://godoc.org/github.com/Tnze/go-mc/net#RCONConn (client and server, synchronous, MIT license)&lt;br /&gt;
; Java&lt;br /&gt;
* https://github.com/jobfeikens/rcon (synchronous, GPL 3.0 license)&lt;br /&gt;
* https://github.com/CatCoderr/JRcon (asynchronous, AGPL-3.0 license)&lt;br /&gt;
; JavaScript&lt;br /&gt;
* https://github.com/tehbeard/node-rcon (Node.js, asynchronous, MIT license)&lt;br /&gt;
* https://github.com/MinecraftJS/rcon (Node.js, asynchronous, MIT license)&lt;br /&gt;
* https://github.com/EnriqCG/rcon-srcds (Node.js, asynchronous, MIT license)&lt;br /&gt;
* https://github.com/willroberts/minecraft-client-ts (Node.js, asynchronous, GPL 3.0 license)&lt;br /&gt;
* https://github.com/janispritzkau/rcon-client (Node.js, asynchronous, no license)&lt;br /&gt;
; Kotlin&lt;br /&gt;
* https://github.com/willroberts/minecraft-client-kotlin (synchronous, GPL 3.0 license)&lt;br /&gt;
* https://github.com/Aliorpse/mcutils#remote-console (client, synchronous, MIT license)&lt;br /&gt;
; PHP&lt;br /&gt;
* https://gist.github.com/1292348 (synchronous, no license)&lt;br /&gt;
; Python 3&lt;br /&gt;
* https://github.com/Iapetus-11/aio-mc-rcon (asynchronous, MIT license)&lt;br /&gt;
* https://github.com/MrReacher/async-mcrcon (asynchronous, MIT license)&lt;br /&gt;
* https://github.com/barneygale/MCRcon (synchronous, MIT license)&lt;br /&gt;
* https://github.com/coNQP/mcipc (synchronous, GPL 3.0 license)&lt;br /&gt;
; Rust&lt;br /&gt;
* https://github.com/willroberts/minecraft-client-rs (synchronous, GPL 3.0 license)&lt;br /&gt;
; Scala&lt;br /&gt;
* https://github.com/A2PLab/minelib (connection-per-request, no license)&lt;br /&gt;
* https://github.com/willroberts/minecraft-client-scala (synchronous, GPL 3.0 license)&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;VS Code Extension&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*https://github.com/jaketcooper/minecraft-rcon (TypeScript, asynchronous, no license)&lt;br /&gt;
&lt;br /&gt;
== Navigation ==&lt;br /&gt;
{{Navbox Java Edition technical|general}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Java Edition protocol]]&lt;br /&gt;
{{license wiki.vg}}&lt;br /&gt;
&lt;br /&gt;
[[Minecraft:pt:RCON]]&lt;br /&gt;
[[Minecraft:fr:RCON]]&lt;br /&gt;
[[Minecraft:zh:远程控制台协议]]&lt;/div&gt;</summary>
		<author><name>SyncBot</name></author>
	</entry>
</feed>