Source RCON - Alderon-Games/pot-community-servers GitHub Wiki

You can use Source RCON protocol to help moderate your server. You can configure and setup RCON with the following steps.

Important Note: The server must be stopped / restarted for these changes to take effect.

  1. Inside the WindowsServer folder, edit the Game.ini file. Path: /Config/WindowsServer/Game.ini
  2. Underneath the [SourceRCON] header, create the entries specified in the below example.

Example Game.ini

[SourceRCON]
bEnabled=true
bLogging=true
Password="password"
Port=0
IP="0.0.0.0"
MaxFailedAttempts=5
Timeout=60
PageTimeout=5 (Rev 27297+)
MaxConnectionsPerIP=3

Command Line Arguments

These Commands will override the equivalent RCON Game.ini commands. Use case is scenarios where the entity in control of the physical server is assigning specific RCON Ports and IPs to different server instances. This is to prevent the enduser manager of a server instance from overriding Ports and IPs in Game.ini in a datacenter server.

  • -RconPort=0
  • -RconIP=0.0.0.0

Config Information

  • When IP is set to 0.0.0.0 will bind to all local addresses, if you want it to only bind to one adapter please insert that local address there instead.
  • MaxFailedAttempts will ban the IP from RCON connections after this many failed attempts.
  • MaxConnectionsPerIP will close oldest connections when new connections are made over this amount
  • Timeout will cause the RCON server to close automatically after the amount of seconds without any packet sent
  • A default port of 0 will auto determine the port which will be Game Server Port + 2.
7778 = Default Query Port + 1
7779 = Default Rcon Port + 2
7780 = Default Stats Port + 3

Connecting to RCON

  • We recommend installing an RCON Client, in this example we will use the mcrcon RCON found here: https://github.com/Tiiffi/mcrcon
  • However you should be able to use any Source / Valve RCON compatible client. Some however might crash if they have implemented the protocol incorrectly.

mcrcon is a command line tool, you will need to run it via command prompt. By default it will output text and automatically close so clicking the executable won't work.

  • Please replace 127.0.0.1 with your servers external IP address
./mcrcon -H 127.0.0.1 -P 7778 -p password
  • After connecting you can run the help command to list what commands you can run.

Executable Commands

Commands do not need to be executed with a / or # unlike the previous rcon implementation.

Example:

  • teleportall talonspoint will teleport all players to Talons Point.

The following link contains a list of all chat commands and if they are supported by RCON: Admin Commands.

Long Responses (Paged Responses) (Rev 27297+)

Responses longer than 4000 characters will be broken up into pages. Paged responses are prefixed with some page information in the form of [Page(Key {KeyNum}) {PageIndex}/{MaxPages}]. (Example: [Page(Key 1) 1/5]) If you receive a paged response, all pages of that response will be stored for the amount of time specified by PageTimeout. To request this page data, send a request in the form of Page:{KeyNum}-{PageIndex}. (Example: page:1-3 will return page 3 of key 1) The text inside each page begins and ends immediately after and before other pages (excluding the page info prefix). This is to ensure all pages can be appended together to produce the original response again.