Backend for Minecraft Servers?

Hello there.

I recently got to know Nakama and I’m thinking about using it for an unusual purpose:
As a backend for a network of multiple Minecraft servers.

In doing so, I have the following requirements:

  • A Nakama connection is made on a Minecraft server
  • Players are authenticated at Nakama with the UUID of the Minecraft account
  • Individual player data is stored in the Nakama storage
  • Minecraft servers can communicate with each other
  • A website can request data from a Nakama server
  • Matchmaking is not needed

The challenge is that I need to make about 100 parallel Nakama connections on each Minecraft server.

Do you think this is technically feasible? Before I discovered Nakama, I was thinking of a microservice architecture, but I welcome solutions that save development time while allowing worry-free scaling.

Hi @Glowdragon,

Please can you explain why you need 100 parallel connections to Nakama from each Minecraft server?

What sort of data are you looking to transfer between an individual Minecraft server and a Nakama instance?

Answering these questions will help me to understand if there is a more suitable way to achieve what you’re trying to accomplish.

Kind regards,
Tom

Hi @tom,

A Minecraft server instance will handle about 100 CCU and I want to be able to authenticate each user and also send notifications to specific users. Without Nakama, I would consider Firebase for authentication and RabbitMQ for notifications.

To the second question:
I would like to use Nakama to store data centrally. This includes, for example, player data (inventory, currencies, friends) and world data (cities, plots, configurations of certain blocks). Since I need to balance database access, I was thinking of implementing a webservice for this or using Nakama.

In general I want to use Nakama in this project for

  • authentication
  • chat
  • friendlists
  • leaderboards
  • database access
  • cross-server logic (don’t want to run macro logic on a Minecraft server)
  • interaction between Minecraft servers

On top of that I want to have a good foundation for rapid player growth (up to 10000 CCU), and that’s the reason I considered Nakama in the first place.

Hi @Glowdragon,

Thanks for the additional context, that’s very useful.
Firstly, to answer your initial question regarding whether it is technically feasible, the answer is absolutely. Nakama is battle tested to support millions of CCU, so supporting 100 or even 10,000 CCU is completely possible.

With regards to your specific implementation, rather than open an individual socket per user in the Minecraft server, I would recommend that each Minecraft server authenticates itself with Nakama and opens a single socket connection, then acts on behalf of each connected user.

For communication you could use Nakama’s authoritative matches, where each server has its own match. When the Minecraft server receives a message from the match it would then be responsible for handing off said message to the appropriate user.

This is just one option, there are a few others but the key point is to have the Minecraft server be the communication point with Nakama and have it relay data on behalf of its connected users. This means helping Nakama understand which users are connected to each MC server and giving it a channel to reach them via the MC server, the authoritative match is just a convenient way to do this.

Hopefully this gives you something actionable to get you going.

1 Like