Skip to content

How to use external Rcon tools

Updated June 14, 2026
Rust
How to Use External RCON Tools | GameServerKings KB

How to Use External RCON Tools

RCON (Remote Console) lets external tools talk to your Rust server: send commands, read chat, kick players, and pull live stats. Tools like RustAdmin, BattleMetrics, Server Armour, and Discord bots all use RCON to do their job.

This guide configures RCON on the GSK panel and connects RustAdmin as a working example.

What RCON Provides

Through RCON you can:

  • Run any console command remotely (the same commands you would type into the panel Console)
  • Subscribe to chat messages and player events
  • Pull server FPS, player list, and entity count
  • Issue kicks, bans, ownerid changes
  • Trigger plugin commands

It is the API that lets you manage a server without opening the panel for every action.

RCON Settings on the GSK Panel

Open the Startup tab. The fields you need:

FieldWhat to set
RCON PasswordA strong password. Pick something long; this is your master remote control key
RCON PortThe port for RCON. By default, it is your game port + 1 (e.g., game on 28015, RCON on 28016). Your Network tab shows the assigned port
RCON WebSet to true to enable WebSocket RCON, which is what most modern tools use

Save and restart the server. After boot, the panel Network tab will show your RCON IP and port:

Code
203.0.113.10:28016

That is the address you give your external tools.

Connecting RustAdmin

RustAdmin is a free Windows GUI for managing Rust servers. Download it from rustadmin.com.

  1. Open RustAdmin and click Add a server.
  2. Fill in:
    • Name: Anything memorable (your community name)
    • IP: Your server's RCON IP (from the Network tab)
    • Port: Your RCON port
    • Password: The RCON password from the Startup tab
  3. Click Connect.

If the connection succeeds, you will see live server stats, chat scroll, and a player list. If it fails:

  • Double-check the port. Game port and RCON port are not the same.
  • Verify the password matches exactly (no trailing spaces).
  • Confirm RCON Web is set to true.

Connecting BattleMetrics

BattleMetrics (battlemetrics.com) is the standard for server tracking, player history, and ban networks. To connect a Rust server:

  1. Sign up at battlemetrics.com and add a server (RustMetrics will detect the game type automatically once it sees the server).
  2. Once added, open the server's dashboard.
  3. Click RCON > Add RCON Connection.
  4. Enter:
    • IP: RCON IP
    • Port: RCON port
    • Password: RCON password
  5. Save. Within a minute, the dashboard will start showing chat, kills, and player events.

Once connected, you can manage players directly from BattleMetrics (kick, ban, notes). Bans created in BattleMetrics also push to other servers in the same ban list, which is useful for community-wide enforcement.

Connecting a Discord Bot

A common request: pipe chat and events into Discord. Two main approaches:

Approach A: Discord Bot via RCON (External)

Tools like BattleMetrics RCON Workshop, RCON.io, or custom Discord bots use RCON to relay events. They run on the bot host's servers and just need RCON credentials.

Approach B: In-Server Plugin

The DiscordCore + DiscordMessages plugin pair (see Popular Plugins) runs inside Rust itself, no external bot host needed. This is simpler for most owners.

Use Approach A for advanced features (cross-server chat, ban appeals UI). Use Approach B for the simple "post chat in Discord" use case.

Security: Treat the RCON Password Like a Production Secret

Anyone with the IP, port, and password can do anything an admin can: ban people, wipe data, run plugin commands. Treat it accordingly:

  • Use a long, random password (32+ characters)
  • Do not paste it into screenshots
  • Rotate it if a staff member with access leaves
  • Restrict which IPs can connect by configuring a firewall rule (advanced; submit a ticket if you want a connection IP allowlist)

To rotate the password:

  1. Generate a new password.
  2. Set it in the Startup tab.
  3. Restart the server.
  4. Update every tool (RustAdmin, BattleMetrics, Discord bot) with the new password.

Programmatic RCON

If you want to write your own scripts or bots, Rust's RCON uses WebSocket. The connection URL pattern:

Code
ws://<ip>:<rcon_port>/<rcon_password>

You send JSON messages of the form:

JSON
{
  "Identifier": 1,
  "Message": "serverinfo",
  "Name": "WebRcon"
}

The server replies with another JSON object containing Message (the command output) and Type (Generic, Chat, etc.).

Popular libraries:

  • rust-rcon (Rust language, ironically)
  • rcon (Python)
  • node-rcon (Node.js)

A minimal Node.js example:

JAVASCRIPT
const WebSocket = require('ws');
const ws = new WebSocket('ws://203.0.113.10:28016/your_rcon_password');

ws.on('open', () => {
  ws.send(JSON.stringify({ Identifier: 1, Message: 'serverinfo', Name: 'MyBot' }));
});

ws.on('message', (data) => {
  const msg = JSON.parse(data);
  console.log(msg.Message);
});

Common Issues

  • Connects but commands time out: Sometimes RCON Web is false. Set to true and restart.
  • Works for a bit, then disconnects: The connecting tool may not be sending keepalive pings. Most production tools (RustAdmin, BattleMetrics) handle this; custom scripts may need explicit ping.
  • Bans through RCON do not stick: After banning, run server.writecfg from the same RCON session to persist the ban list.
Made with 💜 by GameServerKings