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:
- Go to the Developer Portal
- At the top, click
New Application
- Give your bot a
Name
, and select a team (Personal
is fine), then clickCreate
- This name will be visible publicly on the bot
- You can set a profile picture later in the settings
- 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!
- Visit https://physgun.com/playercountbot and click
Login to Discord ->
- Click the
Create
button - Enter your
Server Information
(name, game type = Rust), then clickNext
- 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
- For Rust:
- Click
Next
Now we’ll link your bot:
- Open the Discord Developer Portal and select your bot
- Click on the
OAuth2
tab - Click
Copy
under theCLIENT ID
- Go back to PlayerCountBot and paste the
CLIENT ID
into theBot Client ID
field
Go back to the Developer Portal and click the
Bot
tabUnder
TOKEN
, clickReset Token
– this is required to generate a new token
⚠️ NEVER share this token with anyone.After the token is generated, click
Copy
Return to PlayerCountBot and paste the token into the
Bot Token
inputClick
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.