Rust Wiki

Setting up a discord bot for your Rust server

A Discord bot offers a simple and effective way to showcase your Rust server right within your Discord. It’s a common feature that nearly every Rust server uses.

Method #1 - No Hosting Needed & Free

PlayerCountBot.com

PlayerCountBot supports Rust using A2S queries or RCON (for more advanced data such as "joining" player count). Below is a full walkthrough on how to link your Rust server with your custom Discord bot using PlayerCountBot.

🤖 Creating your Discord bot

You’ll first need to create a Discord bot using the Discord Developer Portal. Follow the steps below:

  1. Go to the Developer Portal
  2. At the top, click New Application
  3. Give your bot a Name, and select a team (Personal is fine), then click Create
    • This name will be visible publicly on the bot
    • You can set a profile picture later in the settings
  4. Great! Now continue with the rest of the guide below.

🔗 Linking your Rust server with PlayerCountBot

This part is quick and easy — you’ll also be able to configure custom status templates and scrolling messages!

  1. Visit https://physgun.com/playercountbot and click Login to Discord ->
  2. Click the Create button
  3. Enter your Server Information (name, game type = Rust), then click Next
  4. Fill out the Query Setup:
    • For Rust:
      • Use your server’s IP and port
      • If you want to show joining players, you must use the Rust RCON method
      • Enable RCON in your Rust server startup with the following:
        +rcon.port 28016 +rcon.password "yourSecurePassword" +rcon.web 1
      • Ensure the RCON port is accessible via your firewall and hosted IP
  5. Click Next

Now we’ll link your bot:

  1. Open the Discord Developer Portal and select your bot
  2. Click on the OAuth2 tab
  3. Click Copy under the CLIENT ID

  1. Go back to PlayerCountBot and paste the CLIENT ID into the Bot Client ID field

  1. Go back to the Developer Portal and click the Bot tab

  2. Under TOKEN, click Reset Token – this is required to generate a new token
    ⚠️ NEVER share this token with anyone.

  3. After the token is generated, click Copy

  4. Return to PlayerCountBot and paste the token into the Bot Token input

  5. Click Create — you’re done!

✅ Invite the bot to your Discord

To invite the bot to your server, simply click the Invite button at the top right of PlayerCountBot.

| TIP: Want a profile picture for your bot? Go back to the Bot tab in the Developer Portal and upload a custom icon and banner.


PlayerCountBot will now automatically update your Discord bot’s status with live Rust server data such as player count, and if using RCON, even track players that are joining.

If you run into issues or need help, visit https://playercountbot.com and join the support Discord!

Method 2: Self-hosted NodeJS Bot

If you'd rather not use the hosted version, there's an open source alternative available that you can run yourself.

You can find it here: https://github.com/Killa4/Rust-Player-Count-Bot

This version runs locally and updates your Discord bot’s status with Rust server info using A2S queries. It requires basic Node.js knowledge and a machine or server to host the script.