Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

What DiscordSRV does and where to install it

DiscordSRV carries messages between the game and Discord:

  • in-game chat appears in a Discord channel, and messages from that channel appear in game;
  • joins, leaves, deaths, advancements and server startup can be announced;
  • players can link their Minecraft account to their Discord account, and get a role;
  • a private channel can act as a console, with all the precautions described below.

DiscordSRV needs a server compatible with the Bukkit API: Paper, Purpur or Spigot. It does not work on Fabric, Forge or NeoForge. To choose the server software, see Paper, Purpur or Spigot.

Download the .jar file from the plugin's official page, put it in the plugins folder, then restart the server. The plugins/DiscordSRV folder is created, with config.yml. It also appears in our selection of essential Minecraft plugins.

02

Create the application and the bot on Discord

The bot is created on the Discord developer portal, https://discord.com/developers/applications, with your Discord account:

  1. Click New Application and give it a name, your server's name for example.
  2. In the Installation tab, disable User Install and set Install Link to None, as the DiscordSRV documentation asks.
  3. In the Bot tab, untick Public Bot: nobody else will be able to invite it to their own Discord server.
  4. Still in Bot, under Privileged Gateway Intents, enable Server Members Intent and Message Content Intent. Without the Message Content intent, the bot cannot read message content: nothing reaches the game.
  5. Click Reset Token and copy the token shown.

The token is a password. Anyone who has it can control your bot, and therefore write to your console if you enable it. Never paste it in a channel, a screenshot or a shared file. If it leaks, click Reset Token again: the old one stops working immediately.

Inviting the bot. Copy the Application ID from the General Information page, then open this address, replacing VOTRE_ID:

https://discord.com/oauth2/authorize?client_id=VOTRE_ID&scope=bot+applications.commands

Choose your Discord server and confirm. Then create a role for the bot and give it the permissions it needs: at minimum, viewing the relevant channels, sending messages there and embedding links (for death and join announcements). The Administrator permission also works, but it grants far more than needed. For role synchronization, the bot's role must sit above the roles it manages.

03

Configure config.yml

In Discord, enable Developer Mode (User Settings, then Advanced). Right-clicking a channel then offers Copy Channel ID. Open plugins/DiscordSRV/config.yml and fill in:

BotToken: "le-jeton-du-bot"
Channels: {"global": "123456789012345678"}
DiscordConsoleChannelId: ""
DiscordInviteLink: "https://discord.gg/votre-invitation"
  • BotToken: the token copied above. This setting requires a full server restart.
  • Channels: on the left, an in-game channel name (global for normal chat), on the right the numeric ID of the Discord channel. The name on the left is not the Discord channel's name.
  • Other channels: all messages go to the first channel unless you declare one for a specific type, for example {"global": "111…", "deaths": "222…", "join": "333…"}. The recognized types are listed in a comment in the file (status, awards, deaths, join, leave…).
  • DiscordConsoleChannelId: leave it empty to disable the console channel. The original file contains a string of zeros: replace it.
  • DiscordInviteLink: the invite shown to players who type /discord.

After changing Channels, the /discord reload command is enough. For the token, restart. Finally, check the server log: DiscordSRV writes its connection and configuration errors there.

04

Link Minecraft and Discord accounts

A player types /discord link in game: they get a 4-digit code to send to the bot as a private message. The accounts are then linked. /discord linked shows the link and /discord unlink removes it.

This link enables several things:

  • A Discord role: the MinecraftDiscordAccountLinkedRoleNameToAddUserTo setting in config.yml gives a role (Linked by default) to every player who links their account.
  • A Discord-based whitelist: in linking.yml, set Enabled to true under Require linked account to play, then restart. An unlinked player is kicked with a message giving them their code. By default, players already on the regular whitelist get in without a link (Whitelisted players bypass check). The guide Minecraft server whitelist compares the two methods.
  • The Bypass names list in the same file contains two names out of the box, those of the plugin's developers: remove them if you do not want anyone to get in without a link.

Commands have their own permissions (discordsrv.link, discordsrv.reload…), which you set with a manager such as LuckPerms (see LuckPerms: ranks and permissions).

05

The console channel, with caution, and common issues

The console channel receives the server log, line by line, and every message written in it is run as a console command, with full rights. If you enable it:

  • create a private channel, visible to administrators only; never use the same channel as the chat;
  • keep the DiscordConsoleChannelBlacklistedCommands list, which blocks op, deop and execute out of the box, and extend it;
  • to allow only a few commands, set DiscordConsoleChannelBlacklistActsAsWhitelist to true: the list then becomes the list of allowed commands;
  • commands sent through this channel are recorded in a Console-date.log file: read it from time to time.

A hacked administrator Discord account, or a leaked token, then gives control of the server: enable two-factor authentication on your team's accounts. For most needs, the host's console and the Minecraft admin commands are enough.

Common issues:

  • The bot stays offline: the token is wrong or has been regenerated. Copy it again and restart.
  • Chat goes to Discord but nothing reaches the game: the Message Content intent is not enabled, or the bot cannot see the channel.
  • No message reaches Discord: the channel ID is wrong (a name instead of the number) or the bot is not allowed to write there.
  • Roles do not synchronize: the bot's role sits below the roles to manage.
06

On CloudFive

On our Minecraft hosting plans, Paper and Purpur install in one click from the client area. You put DiscordSRV in plugins through the file manager or over SFTP, edit config.yml directly in the editor, and the client area console accepts the discord reload command. Keep the token in that file only, and not in a screenshot sent to support.

The servers run in France on Ryzen 9 9950X, with DDR5 memory and NVMe storage, with Anti-DDoS Premium included. Plans are monthly, with no commitment, starting at €8, with French-speaking support 7 days a week by ticket, on Discord and by phone.

07

Frequently asked questions

How do I install DiscordSRV on a Minecraft server?

Put the DiscordSRV .jar file in the plugins folder of a Paper, Purpur or Spigot server and restart. Then create a bot on the Discord developer portal, paste its token into BotToken and the channel ID into Channels, in plugins/DiscordSRV/config.yml, and restart.

Why don't Discord messages show up in game?

Most often, the Message Content intent is not enabled in the Bot tab of the developer portal. Without it, the bot cannot read message content. Also check that the bot can see the channel and that its ID is correct in Channels.

What should I do if the DiscordSRV bot token has leaked?

Click Reset Token in the Bot tab of the Discord developer portal: the old token stops working immediately. Paste the new one into BotToken and restart the server. If the console channel was enabled, check its command log.

How do I link a Minecraft account to Discord with DiscordSRV?

Type /discord link in game: the plugin gives you a 4-digit code. Send that code to the bot as a private message on Discord, and the accounts are linked. The /discord unlink command removes the link.

Is the DiscordSRV console channel dangerous?

It can be: any message written in that channel is run as a console command, with full rights. Restrict it to administrators, never mix it up with the chat channel, and extend the list of blocked commands.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay