# How to Set Up RCON and Telnet on Your Soulmask Server (/docs/soulmask/rcon-setup)



import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';

Soulmask supports two remote-console protocols: **RCON** (Source-protocol, supports remote clients) and **Telnet** (loopback only). Both let you run admin commands without being logged into the game.

| Protocol | Default port  | Remote use?                        | How to enable                        |
| -------- | ------------- | ---------------------------------- | ------------------------------------ |
| RCON     | `19000` (TCP) | Yes — with password + IP allowlist | Set `-rconpsw` launch parameter      |
| Telnet   | `18888` (TCP) | **No — loopback only**             | Always on (set port via `-EchoPort`) |

> Use **RCON** for off-server admin (Discord bots, RCON tools, automation). Telnet works only from the same machine the server is running on.

***

Enable RCON [#enable-rcon]

<Steps>
  <Step>
    **Stop your server** from the [XGamingServer Panel](https://panel.xgamingserver.com).
  </Step>

  <Step>
    Open the **Startup** tab and add to the launch parameters:

    ```
    -rconpsw="YourStrongPassword" -rconport=19000
    ```

    | Parameter         | Description                                                       |
    | ----------------- | ----------------------------------------------------------------- |
    | `-rconpsw="..."`  | RCON authentication password. **RCON is OFF unless this is set.** |
    | `-rconport=19000` | TCP port for the RCON listener. Defaults to `19000` if omitted.   |
    | `-rconaddr=<ip>`  | Optional bind address. Defaults to all interfaces.                |
  </Step>

  <Step>
    **Add an IP allowlist** — RCON requires both the password **and** the client IP to be whitelisted. Open `WS/Saved/Config/WindowsServer/Engine.ini` (or `LinuxServer` on Linux), add:

    ```ini
    [Server.SafeIP]
    IP=203.0.113.10
    IP=203.0.113.11
    ```

    List every IP that needs to connect. Restrict to known IPs only — never open to `0.0.0.0`.
  </Step>

  <Step>
    Start the server. Confirm `WS/Saved/Logs/WS.log` shows the RCON listener started.
  </Step>
</Steps>

***

Connect with rcon-cli [#connect-with-rcon-cli]

The Soulmask team recommends [`gorcon/rcon-cli`](https://github.com/gorcon/rcon-cli). Any Source-protocol RCON client (mcrcon, BattleMetrics, RCON GUI tools) is also protocol-compatible.

```bash
rcon-cli --address SERVER_IP:19000 --password "YourStrongPassword"
```

Once connected, type `help` (or `?` or `1`) to list commands. Each command also has a numeric ID and a short alias.

***

Add Allowed IPs Without Restarting [#add-allowed-ips-without-restarting]

You can update the IP allowlist live over RCON:

```
Update_RconClientAddress 1 203.0.113.20
```

* First arg: `1` to add, `0` to remove
* Second arg: IP address

***

Telnet (Local Only) [#telnet-local-only]

Telnet binds to `127.0.0.1` only — there is no remote-Telnet option. To use it, you need shell access to the server host.

```bash
telnet 127.0.0.1 18888
```

Change the port with `-EchoPort=<port>` in startup parameters. The same command set as RCON is available.

***

Remote Console Commands [#remote-console-commands]

All commands accept a numeric ID, full name, or short alias. Parameters use space-separated values.

<Tabs items={['Server Control', 'Players & Lists', 'Spawning & Items', 'Permissions', 'Diagnostics']}>
  <Tab value="Server Control">
    | ID | Command                | Aliases                     | Parameters                               |
    | -- | ---------------------- | --------------------------- | ---------------------------------------- |
    | 0  | `Disconnect`           | `q`, `dc`, `quit`           | —                                        |
    | 1  | `ShowHelp`             | `help`, `?`                 | —                                        |
    | 2  | `SaveAndExit`          | `close`, `exit`, `shutdown` | `AfterSeconds [int]`                     |
    | 3  | `StopCloseServer`      | `cancelclose`, `cc`         | —                                        |
    | 4  | `SaveWorld`            | `sav`                       | `Force [int]`                            |
    | 5  | `BackupDatabase`       | `bk`                        | `InNewDBName [string]`                   |
    | 6  | `BackupDatabaseByHour` | `bkh`                       | —                                        |
    | —  | `SaveAndExitWithCode`  | —                           | `CloseAfterSeconds [int] ExitCode [int]` |
    | —  | `SetGameExitCode`      | —                           | `ExitCode [int]`                         |
    | —  | `IncGameSeconds`       | —                           | `Slice [int]`                            |
    | —  | `StartAI` / `StopAI`   | —                           | —                                        |
  </Tab>

  <Tab value="Players & Lists">
    | ID | Command                  | Aliases | Parameters               |
    | -- | ------------------------ | ------- | ------------------------ |
    | 11 | `ServerLoginStatus`      | `sl`    | `Pause [int]`            |
    | 14 | `List_OnlinePlayers`     | `lp`    | —                        |
    | 15 | `List_AllPlayers`        | `lap`   | —                        |
    | 16 | `List_SameBelongingObjs` | `ls`    | `InOpPlayer [string]`    |
    | 17 | `List_Guilds`            | `lg`    | —                        |
    | 18 | `List_GuildObjs`         | `lgo`   | `InOpGuild [string]`     |
    | 20 | `GotoPostion`            | `go`    | `InOpPlayer InX InY InZ` |
    | 21 | `GotoTarget`             | `gonpc` | `InOpPlayer InTarget`    |
    | 24 | `FlyMode`                | `fly`   | `InPlayer nMode`         |
    | 36 | `SayToSystemChannel`     | `say`   | `Content [string]`       |
  </Tab>

  <Tab value="Spawning & Items">
    | ID | Command                       | Aliases  | Parameters                                       |
    | -- | ----------------------------- | -------- | ------------------------------------------------ |
    | 19 | `List_AllNPCClass`            | `lcc`    | `NameSubStr [string]`                            |
    | 22 | `CreateSpecifiedMan`          | `cnpc`   | `InPlayer CreateNo Sex`                          |
    | 23 | `CreateSWByClass`             | `create` | `Account CreatureClass IsBaby Level Num Quality` |
    | 33 | `List_AllItemClass`           | `lai`    | `SubName [string]`                               |
    | 34 | `CreateItemForPlayer`         | `citem`  | `InOpPlayer ItemClass Nums Quality`              |
    | 35 | `List_AllTalent`              | `lat`    | `TelentLevel [int]`                              |
    | 37 | `DeleteItem`                  | `del`    | `InOpPlayer InItemClass InCount`                 |
    | 39 | `ClearAllNpc`                 | `can`    | —                                                |
    | —  | `List_AllProficiency`         | —        | —                                                |
    | —  | `CreateSpecifiedMan_ByConfig` | —        | `InOpPlayer Key`                                 |
  </Tab>

  <Tab value="Permissions">
    | ID | Command                       | Aliases | Parameters                         |
    | -- | ----------------------------- | ------- | ---------------------------------- |
    | 27 | `Set_ServerPermissionEnable`  | `ssp`   | `PermissionType bEnabled`          |
    | 28 | `Set_ServerPermissionFlag`    | `sspf`  | `PermissionFlag`                   |
    | 29 | `Update_ServerPermissionList` | `usp`   | `PermissionType bRemoveOrAdd Data` |
    | 30 | `List_ServerPermissionList`   | `lsp`   | —                                  |
    | —  | `Update_RconClientAddress`    | —       | `bAddOrRemove RconSafeAddress`     |
    | —  | `SetRCONSendMaxBytes`         | —       | `send_size [int]`                  |
  </Tab>

  <Tab value="Diagnostics">
    | ID | Command                     | Aliases | Parameters                |
    | -- | --------------------------- | ------- | ------------------------- |
    | 7  | `Dump_AllActorPositions`    | `dap`   | —                         |
    | 8  | `DrawActorImage`            | `dai`   | `ActorType [int]`         |
    | 9  | `QueryInvitationCode`       | `qi`    | —                         |
    | 10 | `ServerFPS`                 | `fps`   | —                         |
    | 12 | `QueryGridCount`            | `qg`    | —                         |
    | 13 | `DrawGrids`                 | `dg`    | —                         |
    | 25 | `Show_Coefficient_Settings` | `lc`    | `ContainNames [string]`   |
    | 26 | `Set_Coefficient`           | `sc`    | `ItemName Val`            |
    | 31 | `Set_OutputChats`           | `soc`   | `bOutputTolog [bool]`     |
    | 38 | `ExecScriptCommands`        | `run`   | `ScriptFileName [string]` |
    | —  | `DumpGzImg`                 | —       | `ObjType [int]`           |
  </Tab>
</Tabs>

> **In-game admin commands are different.** Most `gm`-prefixed commands documented in [Adding Admins](/docs/soulmask/admin-setup) **do not work over RCON**. The remote channel uses the names above, which take Steam-account-style parameters instead of in-game targeting.

***

Discord Bot Integration [#discord-bot-integration]

To wire RCON into a Discord bot or other automation:

1. Pick a Source-protocol RCON library for your language (Python: `mcrcon` / `aiomcrcon`; Node: `rcon-client`; Go: `gorcon/rcon`).
2. Use `SERVER_IP:19000` + your `-rconpsw` value to authenticate.
3. Add your bot host's IP to `[Server.SafeIP]` in `Engine.ini` (or via `Update_RconClientAddress`).
4. Send commands like `lp` to list players or `say Hello world` to broadcast.

> **Bot auth tip:** treat the RCON password like a root password. Do not commit it to a public repo, and rotate it whenever a team member loses access.

***

Troubleshooting [#troubleshooting]

**"Connection refused" on the RCON port**

* `-rconpsw` was not set — RCON only starts when a password is configured
* The port is blocked by your hosting firewall — confirm in the panel network settings
* Wrong port — check `-rconport` value against what your client is dialing

**Connects but immediately disconnects**

* Your client IP is not in `[Server.SafeIP]` — add it to `Engine.ini` or use `Update_RconClientAddress` from a whitelisted source
* Wrong password — verify `-rconpsw` matches what the client is sending

**Telnet works, RCON doesn't**

* Telnet is always on; RCON requires the password param. Check the Startup tab.

**Some `gm` commands don't work over RCON**

* Expected — the in-game admin command set and the remote console command set are different. Use the names from this page for RCON.

***

Related Guides [#related-guides]

* [Adding Admins & GM Commands](/docs/soulmask/admin-setup)
* [Server Configuration](/docs/soulmask/server-config)
* [Cluster Setup](/docs/soulmask/cluster-setup)
