Linking Minecraft and Discord With DiscordSRV
Connect your Minecraft server to Discord with DiscordSRV — creating the bot, required intents, chat and console channels, account linking, role sync and security tips.
On this page
Most Minecraft communities live on Discord as much as in the game. DiscordSRV bridges the two: in-game chat appears in a Discord channel and vice versa, join and death messages show up for everyone, and ranks can sync between LuckPerms and Discord roles. This guide sets it up on a Paper server and covers the security details that matter.
What DiscordSRV does
- Chat bridge — messages flow both ways between a Discord channel and in-game chat.
- Event messages — joins, leaves, deaths, advancements and server start/stop.
- Console channel — an optional Discord channel that mirrors the server console (with a serious security caveat, below).
- Account linking — players link their Minecraft and Discord accounts.
- Role synchronisation — Discord roles and LuckPerms groups kept in sync.
DiscordSRV runs its own Discord bot connection from inside your Minecraft server.
Step 1: Create a Discord bot
- In the Discord Developer Portal, create a new application and add a bot.
- Reset and copy the bot token. Treat it like a password.
- Under Privileged Gateway Intents, enable Server Members Intent and Message Content Intent. DiscordSRV needs message content to relay Discord chat into the game, and members for linking and role sync. Without them, the bot won’t connect or won’t see messages.
- Invite the bot to your server using the OAuth2 URL generator with the
botscope and permissions to read and send messages, embed links, and — if you’ll use role sync — manage roles. Place the bot’s role above any roles it needs to assign.
Use a dedicated bot for DiscordSRV. Sharing a token with another bot causes conflicts and makes a leak more damaging. See keeping your bot token safe — the same rules apply here.
Step 2: Install and configure
Download DiscordSRV from a trusted source (such as Modrinth or SpigotMC) into plugins/ and start the server once to generate plugins/DiscordSRV/config.yml. Then set:
BotToken: "your-bot-token"
Channels: {"global": "123456789012345678"}
DiscordConsoleChannelId: ""
BotToken— the token from step 1.Channels— maps in-game chat channels to Discord channel IDs.globalis the main chat. Get a channel ID by enabling Developer Mode in Discord’s settings and right-clicking the channel.DiscordConsoleChannelId— leave empty unless you need a console channel (see the security section).
Restart the server (or run /discord reload). Messages in-game should now appear in the Discord channel, and messages in the channel should appear in-game.
Customising messages
DiscordSRV’s messages.yml controls how chat, joins, leaves, deaths and advancements look on both sides. Common tweaks:
- Use webhooks for chat so messages appear with each player’s name and skin avatar instead of the bot’s name.
- Keep formats short — long prefixes clutter busy channels.
- Disable events your community finds noisy, such as every advancement.
Account linking
Players link accounts by running /discord link in-game, which gives them a code to send to the bot in Discord (or the reverse, depending on configuration). Linking enables:
- Discord nicknames or roles based on in-game ranks,
- restricting server access to linked accounts (useful for whitelisted communities),
- showing Discord names in game.
Linked account data can be stored in a MySQL database — useful on networks where several servers share links. See connecting Minecraft plugins to MySQL.
Role synchronisation with LuckPerms
In synchronization.yml, map LuckPerms groups to Discord role IDs:
GroupRoleSynchronizationGroupsAndRolesToSync:
"member": "234567890123456789"
"moderator": "345678901234567890"
Decide which side is the source of truth — usually Minecraft (LuckPerms), so promotions in-game update Discord roles. Syncing in both directions can cause surprises if staff change roles in both places. Make sure the bot’s role is above the synced roles, or Discord will refuse the changes. LuckPerms setup is covered in permissions done right with LuckPerms.
Security: be very careful with the console channel
A console channel doesn’t just show the console — commands typed in that channel are run on your server as the console, with full power: stop, op, lp user X permission set *, anything.
If you enable it:
- Put it in a private channel visible only to the owner and the most trusted admins.
- Double-check the channel’s permission overwrites — a category permission change can expose it.
- Consider leaving it off entirely and using your hosting panel’s console instead, which is protected by your panel login.
Also keep in mind:
- Anyone with the bot token controls the bot. Keep it only in the config file, never in screenshots or shared configs.
- Limit what the bot can do in Discord: it rarely needs Administrator.
- Filter what’s relayed from Discord into the game if you have younger players — DiscordSRV can block mentions and certain content.
Performance
DiscordSRV is generally light, but it does keep a Discord connection and processes every chat message. On very busy servers, disable features you don’t use and keep the plugin updated. If you use spark and see DiscordSRV high in the profile, check for misconfigured features like frequent role sync of large servers.
Troubleshooting
The bot never comes online — wrong token, or the privileged intents aren’t enabled in the Developer Portal. The startup log shows the specific error.
Minecraft → Discord works, Discord → Minecraft doesn’t — the Message Content Intent is disabled, or the channel ID in Channels is wrong.
Role sync fails — the bot lacks Manage Roles, or its role is below the roles it’s trying to assign.
Messages appear twice — another plugin or bot is also relaying chat.
Hosting
On Kerit Cloud’s Minecraft hosting, staff can install and configure DiscordSRV as part of your setup, and the free MySQL or PostgreSQL database included with every paid server is ready for linked-account storage.
Summary
DiscordSRV bridges Minecraft and Discord chat, relays server events, links accounts and syncs LuckPerms groups with Discord roles. Create a dedicated bot with the Server Members and Message Content intents, set the token and channel IDs in config.yml, use webhooks for nicer chat, and choose one direction for role sync. Treat the console channel as full server access — keep it private or off — and guard the bot token like a password.