# How to Set Up RCON on Your Minecraft Server (/docs/minecraft/setup-rcon)



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

**RCON** (Remote Console) is Minecraft's built-in protocol for sending console commands to your server from outside the game. It's how external tools, Discord bots, web dashboards, and automation scripts run commands without logging in as a player.

> **Do you actually need RCON?** The [XGamingServer Panel](https://panel.xgamingserver.com) **Console** already gives you full command access from a browser. RCON is only worth setting up if you're integrating with external tools (Discord bots, monitoring dashboards, custom scripts).

When to Use RCON [#when-to-use-rcon]

| Use case                                  | RCON needed?           |
| ----------------------------------------- | ---------------------- |
| Run commands from the panel               | ❌ Use Console instead  |
| Run commands from in-game                 | ❌ Use OP + chat        |
| Discord bot that runs Minecraft commands  | ✅ Yes                  |
| Monitoring dashboard / web panel          | ✅ Yes                  |
| Custom backup or restart scripts          | ✅ Yes                  |
| Tebex / Stripe purchase delivery          | ✅ Yes (or HTTP plugin) |
| `mcrcon` from terminal for quick commands | ✅ Yes                  |

Enable RCON [#enable-rcon]

<Steps>
  <Step>
    Stop the server [#stop-the-server]

    In the panel, open **Console** and stop your server.
  </Step>

  <Step>
    Edit server.properties [#edit-serverproperties]

    Click **Files** in the sidebar and open `server.properties`. Set:

    ```properties
    enable-rcon=true
    rcon.password=your-strong-random-password
    rcon.port=25575
    broadcast-rcon-to-ops=false
    ```

    | Setting                 | Recommended           | Notes                                                                     |
    | ----------------------- | --------------------- | ------------------------------------------------------------------------- |
    | `enable-rcon`           | `true`                | Enables the RCON listener                                                 |
    | `rcon.password`         | 20+ random characters | **Must not be weak** — anyone with this password runs commands as console |
    | `rcon.port`             | `25575`               | Standard RCON port — change if conflicts                                  |
    | `broadcast-rcon-to-ops` | `false`               | Hide RCON commands from OP players                                        |

    > **Critical:** RCON authentication is plaintext. The password is sent over the wire on every connect. **Never use a real password** — generate a random string with a password manager.
  </Step>

  <Step>
    Add the RCON port to Network [#add-the-rcon-port-to-network]

    In the panel, click **Network** in the sidebar. Click **Create Allocation** and add port `25575` (or your custom port).

    Note the **public IP and port** — that's what your RCON client will connect to.
  </Step>

  <Step>
    Start the server [#start-the-server]

    Start from **Console**. RCON activates on the new port.
  </Step>

  <Step>
    Test the connection [#test-the-connection]

    From your local machine, install [mcrcon](https://github.com/Tiiffi/mcrcon/releases) and run:

    ```bash
    mcrcon -H your-server-ip -P 25575 -p your-password "list"
    ```

    You should see the player list. If you see "connection refused", check the Network allocation.
  </Step>
</Steps>

RCON Clients [#rcon-clients]

| Client                                                     | Platform              | Best for                       |
| ---------------------------------------------------------- | --------------------- | ------------------------------ |
| **[mcrcon](https://github.com/Tiiffi/mcrcon)**             | Windows / Mac / Linux | Quick CLI commands and scripts |
| **[rcon-cli](https://github.com/itzg/rcon-cli)**           | Cross-platform        | Docker-friendly                |
| **[KingsRCON](https://github.com/PressF12/KingsRCON)**     | Windows GUI           | Visual interface               |
| **[mctools.org](https://mctools.org/rcon-client)**         | Web                   | Quick test from a browser      |
| **[Source RCON Protocol libraries](https://wiki.vg/RCON)** | Any language          | Building custom integrations   |

For Discord bots, use a library:

* **JavaScript / TypeScript**: `rcon-client` from npm
* **Python**: `mcrcon` or `aiomcrcon`
* **Go**: `gorcon/rcon`

Security Best Practices [#security-best-practices]

1. **Generate a long random password** — 20+ characters, no dictionary words
2. **Never reuse the password** elsewhere
3. **Restrict the RCON port to known IPs** if possible (use firewall rules at the network level)
4. **Don't enable RCON on a publicly-advertised port** unless you trust your firewall
5. **Rotate the password** if you ever share or accidentally commit it
6. **Set `broadcast-rcon-to-ops=false`** so OP players can't see what RCON is doing
7. **Audit who has the password** — every team member with access can run any command

> **Remember:** RCON commands run as **console**. That means full permissions, no OP check, no rate limit. A leaked password is equivalent to giving someone server root.

Common Commands via RCON [#common-commands-via-rcon]

Most server commands work the same as in Console:

```bash
mcrcon -H ip -P 25575 -p pw "say Server restarting in 5 minutes"
mcrcon -H ip -P 25575 -p pw "save-all flush"
mcrcon -H ip -P 25575 -p pw "stop"
mcrcon -H ip -P 25575 -p pw "give Steve diamond 64"
mcrcon -H ip -P 25575 -p pw "list"
```

Settings Reference [#settings-reference]

| Setting                 | Default | Description                                 |
| ----------------------- | ------- | ------------------------------------------- |
| `enable-rcon`           | `false` | Master switch for RCON                      |
| `rcon.password`         | empty   | Authentication password                     |
| `rcon.port`             | `25575` | TCP port to listen on                       |
| `broadcast-rcon-to-ops` | `true`  | Whether OPs see RCON command output in chat |

Common Issues [#common-issues]

| Problem                             | Fix                                                                |
| ----------------------------------- | ------------------------------------------------------------------ |
| Connection refused                  | RCON port not allocated in **Network**, or `enable-rcon=false`     |
| Authentication failed               | Wrong password — check `rcon.password` for typos                   |
| Connection times out                | Wrong IP, or firewall blocking the port                            |
| `Empty password` error              | RCON refuses empty passwords — set one                             |
| Commands run but return no output   | Some commands have no output — check the actual server state       |
| Port conflict                       | Change `rcon.port` to a different value, update Network allocation |
| RCON works locally but not remotely | Network allocation not added, or external firewall blocks it       |

Common Mistakes [#common-mistakes]

| Mistake                                        | Fix                                                                |
| ---------------------------------------------- | ------------------------------------------------------------------ |
| Using a weak / reused password                 | Generate a long random one — RCON is full server access            |
| Forgetting to add the port allocation          | RCON listens on the port but isn't reachable without Network entry |
| Sharing the password in support tickets        | Reset it after sharing                                             |
| Enabling RCON when Console works fine          | Adds attack surface for no benefit — only enable if you need it    |
| Not restarting after editing server.properties | RCON loads at startup                                              |

Related Guides [#related-guides]

* [Server Properties](/docs/minecraft/server-properties)
* [OP Permissions](/docs/minecraft/op-permissions)
* [Setup DiscordSRV](/docs/minecraft/setup-discordsrv)
* [Setup Tebex](/docs/minecraft/setup-tebex)
