EN · $ USD
Minecraft Server Guides

DiscordSRV Setup: Connect Minecraft Chat to Discord

7 min read Updated: OyunBulut technical team

In short

DiscordSRV setup takes four steps: create a bot in the Discord Developer Portal and enable the Server Members and Message Content intents, invite the bot to your Discord server, upload the plugin to your Paper or Spigot server's plugins folder, and add the BotToken and your chat channel's ID to config.yml. After that you can set up account linking with /discord link and role sync with synchronization.yml.

In this guide
  1. What is DiscordSRV and what does it do?
  2. Prerequisites
  3. 1. Create the Discord bot
  4. 2. Invite the bot to your Discord server
  5. 3. Get the channel IDs
  6. 4. Install and configure the plugin
  7. 5. Account linking
  8. 6. Role sync (LuckPerms)
  9. Customizing the message format
  10. Common problems
  11. Keeping your community active through Discord
  12. Next step: run your server and bots in the right place

Setting up DiscordSRV builds a bridge that sends your Minecraft server's in-game chat to a Discord channel and Discord messages back into the game. Configured properly, players can keep up with the community on Discord even when they're not in game, admins can watch the console from a channel, and players' ranks are automatically matched to Discord roles. This guide covers every step from creating the bot to role sync, along with the most common errors.

What is DiscordSRV and what does it do?

DiscordSRV is a Minecraft plugin built for Bukkit-based servers (Paper, Spigot, Purpur). It runs through a Discord bot and offers these features:

  • Chat bridge: In-game messages show up in a Discord channel, and Discord messages show up in game.
  • Event notifications: Player joins, leaves, death messages and advancements are posted to the channel.
  • Console channel: The server console is mirrored to a separate channel; staff can also run commands from there.
  • Account linking: Players link their Minecraft accounts to their Discord accounts.
  • Role sync: Groups in a permissions plugin like LuckPerms are matched to Discord roles.

Prerequisites

  • A Minecraft server running Paper, Spigot or Purpur (Fabric/Forge need different bridge mods).
  • A Discord server where you have admin permissions.
  • For role sync, Vault and a Vault-compatible permissions plugin such as LuckPerms.

1. Create the Discord bot

  1. Go to the Discord Developer Portal, create an application with New Application and give it your server's name.
  2. Switch to the Bot tab on the left. Generate the token with Reset Token and copy it somewhere safe. The token is the bot's password; never share it with anyone.
  3. In the Privileged Gateway Intents section on the same page, turn on Server Members Intent and Message Content Intent. If these are off, DiscordSRV can't read messages or manage roles.
  4. Optionally, turn off Public Bot so others can't add the bot to their own servers.

2. Invite the bot to your Discord server

  1. In the URL generator on the OAuth2 tab, select the bot and applications.commands scopes.
  2. Under bot permissions, check at least: View Channels, Send Messages, Read Message History, Embed Links, Attach Files, Manage Roles (for role sync), Manage Nicknames (if you'll use nickname sync).
  3. Open the generated link in your browser and add the bot to your server.
  4. In Discord under Server Settings > Roles, move the bot's role above the roles it will manage. A bot can't assign roles that sit above its own.

3. Get the channel IDs

In Discord, turn on Developer Mode under User Settings > Advanced. Then right-click the channel you'll use for the chat bridge and choose Copy Channel ID. Create a separate channel for the console that only staff can see, and get its ID too.

4. Install and configure the plugin

  1. Download the latest DiscordSRV .jar file from its official source and upload it to your server's plugins folder.
  2. Start and stop the server once; the plugins/DiscordSRV folder and config files are created.
  3. Edit these lines in plugins/DiscordSRV/config.yml:
BotToken: "BURAYA_BOT_TOKENINIZ"

Channels: {"global": "123456789012345678"}

DiscordConsoleChannelId: "234567890123456789"

global is the name of the main in-game chat channel; its value is the Discord channel ID. When you restart the server, the bot comes online and in-game messages start showing up in the channel. Only open the console channel to staff you trust; every message posted there runs as a server command.

Token security: never share your config.yml with anyone, and don't show the token in screenshots. If the token leaks, reset it right away in the Developer Portal. For details, see our Discord bot token security guide.

5. Account linking

Account linking matches a player's Minecraft UUID to their Discord user ID. Role sync and rules like "players without a linked account can't join" depend on it.

  1. The player types /discord link in game and gets a four-digit code.
  2. They send that code to the bot in a direct message.
  3. The bot confirms the match; the player's account is now linked.

Linking behavior is managed in the linking.yml file. There you can define a Discord role given automatically to linked accounts, and optionally require a linked account to join the server. It's a powerful tool for servers that want a registered, trackable community; but since it's an extra step for new players, write the join message clearly and in your players' language.

6. Role sync (LuckPerms)

Role sync matches LuckPerms groups to Discord roles. A player who gets VIP in game automatically gets the VIP role on Discord too. The configuration lives in synchronization.yml:

GroupRoleSynchronizationGroupsAndRolesToSync: {"vip": "345678901234567890", "moderator": "456789012345678901"}

The value on the left is the LuckPerms group name, and the one on the right is the Discord role ID (right-click the role and choose Copy Role ID). In the same file you can set the sync direction, meaning whether it runs from Minecraft to Discord or both ways. For security, it's safer to keep staff roles (admin, moderator) one-way, from Minecraft to Discord; that way a role accidentally given on Discord doesn't grant permissions in game. If you haven't set up your group structure yet, start with our guide on ranks and permissions with LuckPerms.

Customizing the message format

DiscordSRV's default messages are in English. The format of player join, leave, death and server start messages, as well as messages coming from Discord into the game, is edited in the messages.yml file. For example, you can change the "joined the server" text posted to the channel when a player joins to your own wording or your community's language, and decide what color and prefix messages from Discord show with in game.

Three things to watch out for:

  • Don't delete placeholders: Expressions like %displayname% and %message% in the messages are replaced with the player name and message content. If you remove them, messages show up empty.
  • Save the file as UTF-8: Make sure your editor uses UTF-8 so special characters (such as Turkish ğ, ş, ı or accented letters) don't get garbled.
  • Follow YAML indentation: A single wrong space can stop the file from loading; check the console for errors after making changes.

You can also set a length limit in config.yml for messages relayed from Discord to the game and turn off relaying bot messages into the game; this keeps other bots in the channel from cluttering in-game chat.

To test your changes, join and leave the game with a second account and check that the message shows up in the Discord channel the way you expect. A quick test beats the community seeing broken messages on a live server. Once the message format is settled, back up a copy of the file; it makes comparing easier when plugin updates add new settings.

Common problems

SymptomLikely causeFix
The bot shows as offlineWrong or reset tokenRegenerate the token and put it in config.yml in quotes
Messages go from the game to Discord, but not the other wayMessage Content Intent is offTurn on the intent in the Developer Portal and restart the server
Roles aren't being assignedThe bot's role is below the target roles or it lacks Manage Roles permissionMove the bot's role up and add the permission
Messages land in the wrong channelWrong channel IDCopy the ID again with Developer Mode
Connection error in the consoleThe server's outbound connection or a temporary issue on Discord's sideReview the /discord debug output

After changing settings, /discord reload reloads many of them; for token and intent changes, a full restart is the safest.

Keeping your community active through Discord

  • Separate channels: Use separate channels for the chat bridge, player join/leave notifications and the staff console so your main chat channel doesn't turn into a flood of notifications.
  • Server status: Showing the online player count in the channel topic or a status message pulls Discord members into the game.
  • Linked account reward: Giving players who link their accounts a small in-game reward increases the link rate.
  • Extra bots: If you want to host bots other than DiscordSRV yourself, such as ticket, moderation or music bots, keeping them separate from the Minecraft server protects the performance of both. For a general Discord setup, see our guide on setting up a Discord server for a gaming community.

Next step: run your server and bots in the right place

DiscordSRV runs inside the Minecraft server, so it doesn't need an extra server; but as your plugin count grows, the server's memory headroom becomes important. The OB-MC-3 Minecraft server with 8 GB RAM and 4 CPUs easily handles DiscordSRV, LuckPerms and a typical survival plugin set, and comes with DDoS protection and a web panel. If you want to run your own or open-source Discord bots for your community 24/7, the KVM-based Discord Bot VDS plans with root access give you a separate environment for that. You can compare OyunBulut's options in our Istanbul data center on the Minecraft server plans page, and open a support ticket if you get stuck during setup.

Frequently asked questions

The DiscordSRV bot is online but messages don't reach the game. Why?

The most common cause is Message Content Intent being turned off in the Discord Developer Portal. Turn on this intent and Server Members Intent, then restart the server.

Where do I find the channel ID for DiscordSRV?

In Discord, turn on Developer Mode under User Settings > Advanced, then right-click the channel and use the Copy Channel ID option.

How do I link my Minecraft account to Discord?

Type /discord link in game and send the four-digit code you get to the DiscordSRV bot as a direct message. Once the bot confirms the match, your accounts are linked.

Why isn't DiscordSRV assigning roles?

The bot's role on Discord may be below the roles it needs to assign, or it may be missing the Manage Roles permission. Move the bot's role up in the role list and add the permission.

Does DiscordSRV work on Fabric or Forge servers?

No, DiscordSRV is built for Bukkit-based servers such as Paper, Spigot and Purpur. Fabric and Forge servers use Discord bridge mods made specifically for those platforms.

For this guide

Recommended plans

For a Discord-connected community server running plugins like DiscordSRV and LuckPerms, OB-MC-3 with 8 GB RAM is a comfortable foundation; to run your community's other bots separately and 24/7, the Discord Bot VDS plans with root access are a good fit.

OB-MC-3

Recommended

8 GB RAM

$6.88/mo

+VAT

  • Processor4 CPU
  • Disk55 GB NVMe
  • LocationIstanbul
  • DDoS Protection
  • Automatic Setup
  • Web Panel
  • 7/24 Support

2 GB RAM

$1.96/mo

+VAT

  • Processor2 vCPU
  • ModelAMD Ryzen / Intel
  • Disk30 GB NVMe
  • LocationIstanbul
  • Port: 1G Port
  • Traffic: Fair use
  • Virtualization: KVM
  • Multi-layer DDoS protection

3 GB RAM

$2.26/mo

+VAT

  • Processor4 vCPU
  • ModelAMD Ryzen / Intel
  • Disk35 GB NVMe
  • LocationIstanbul
  • Port: 1G Port
  • Traffic: Fair use
  • Virtualization: KVM
  • Multi-layer DDoS protection

Minecraft — tüm paketler Discord Bot VDS — tüm paketler

Need help with setup?

Send questions about your service in a support ticket, and our technical team will walk you through it step by step.