Difference between revisions of "RCON"

From SDG Wiki
Jump to: navigation, search
(tried to prettify)
Line 3: Line 3:
 
The '''Remote Console''' tools exist to help you administer your server without connecting as a player.
 
The '''Remote Console''' tools exist to help you administer your server without connecting as a player.
  
There are two ways to invoke Rcon: HTTP Requests or the Rcon Protocol
+
There are two ways to invoke Rcon: HTTP Requests, and the Rcon Protocol.
  
=== Setup ===
+
== Setup ==
  
 
''to-doc''
 
''to-doc''
 
The setup process isn't finalized yet, as I want you to be able to assign Rcon keys permissions and configure the port in the server config.
 
The setup process isn't finalized yet, as I want you to be able to assign Rcon keys permissions and configure the port in the server config.
  
=== HTTP Requests ===
+
== HTTP Requests ==
  
 
Intended for web-based control panels to run commands on the server.
 
Intended for web-based control panels to run commands on the server.
  
Requests can be sent to {Server}/rcon/{Command}?key={Key}&arg1=value1&arg2=value2
+
Requests can be sent to <code>{Server}/rcon/{Command}?key={Key}&arg1=value1&arg2=value2</code>.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 29: Line 29:
 
Responses are returned in JSON. If a command was found and executed the response looks like:
 
Responses are returned in JSON. If a command was found and executed the response looks like:
  
<code>
+
<pre>
 
{
 
{
 
"Success": true,
 
"Success": true,
 
"Output": "{Logs}"
 
"Output": "{Logs}"
 
}
 
}
</code>
+
</pre>
  
 
Whereas a failed response which didn't execute a command will contain an error explanation:
 
Whereas a failed response which didn't execute a command will contain an error explanation:
  
<code>
+
<pre>
 
{
 
{
 
"Success": false,
 
"Success": false,
 
"Error": "{Explanation}"
 
"Error": "{Explanation}"
 
}
 
}
</code>
+
</pre>
=== Rcon Protocol ===
+
 
 +
== Rcon Protocol ==
  
 
''to-doc''
 
''to-doc''
 
Using the protocol is more complex than the HTTP requests, but has the advantage of streaming log data from the server.
 
Using the protocol is more complex than the HTTP requests, but has the advantage of streaming log data from the server.

Revision as of 17:14, 14 June 2018

Template:Ambox/Documentation

The Remote Console tools exist to help you administer your server without connecting as a player.

There are two ways to invoke Rcon: HTTP Requests, and the Rcon Protocol.

Setup

to-doc The setup process isn't finalized yet, as I want you to be able to assign Rcon keys permissions and configure the port in the server config.

HTTP Requests

Intended for web-based control panels to run commands on the server.

Requests can be sent to {Server}/rcon/{Command}?key={Key}&arg1=value1&arg2=value2.

Key Value
Command Id of a command as would be used in chat, e.g. teleport or tp
Key An authorized Rcon key you've assigned permissions to run this command.
Arg Key=Value pairs of arguments to the command.

Responses are returned in JSON. If a command was found and executed the response looks like:

{
"Success": true,
"Output": "{Logs}"
}

Whereas a failed response which didn't execute a command will contain an error explanation:

{
"Success": false,
"Error": "{Explanation}"
}

Rcon Protocol

to-doc Using the protocol is more complex than the HTTP requests, but has the advantage of streaming log data from the server.