Set up Multiple Minecraft Servers on 1 IP

May 2014

SSD Dedicated Server Hosting

Why run multiple Minecraft servers on a single IP?

It’s been a growing trend to see customers requesting an IP for each Minecraft server they run. This is mainly due to wanting to run each server on the default port (25565), so that there is no confusion for players on how to access the server. While that is a major plus for usability and lack of complexity for new players, it does add to the operational costs.

  • IP Space –  There are very few IP blocks left in the world, so you can expect the cost of a single IP to increase 2 to 5 times once supply dries out and demand increases.
  • DDoS Protection – Protection is typically sold on a per-IP basis as this is how most companies asses “risk” and “usage” for their systems. So basically, the more IPs protected, the bigger of a target the server is. Protecting a single IP with multiple servers on it will give you major cost savings. (Though ReliableSite offers free DDoS protection against attacks under 10 Gbps, this applies to higher-level protection).

The good news is that Minecraft (since version 1.3.1) now supports SRV records, eliminating the port woes for players. You can set up multiple Minecraft servers on 1 IP, running on different ports, and set up a SRV record to automatically direct a player to the right port.

Example:
mc1.reliablesite.net > 1.2.3.4 port 25565
mc2.reliablesite.net > 1.2.3.4 port 25566
mc3.reliablesite.net > 1.2.3.4 port 25567

Setting up the SRV Record

A SRV record has the following format:

_minecraft._tcp.name TTL class SRV priority weight port target
  • name: the domain name for which this record is valid.
  • TTL: standard DNS time to live field.
  • class: standard DNS class field (this is always IN).
  • priority: the priority of the target host, lower value means more preferred.
  • weight: A relative weight for records with the same priority.
  • port: the TCP/UDP port where the Minecraft server is hosted on.
  • target: the host name of the machine providing the service.

If your DNS provider asks for service, put in _minecraft and if it asks for proto or protocol, put in _tcp.

For example, if your server is hosted on 11.12.13.14 port 25565, the SRV record in textual form in a zone file will be the following:

_minecraft._tcp.mc  3600    IN  SRV 0   5   25565   mc1.reliablesite.net
mc1	IN  A   11.12.13.14

This points to a server named mc1.reliablesite.net redirecting to a Minecraft server running on 11.12.13.14 on port 25565. The priority is set to 0, and the weight is set to 5.

Similar to MX records, the target in SRV records must point to hostname with an address record. Pointing to a hostname with a CNAME record is not a valid configuration.

Once this goes through, you will be able to run multiple servers on just 1 IP without burdening any players.

Have more questions about Minecraft game servers? Try out ReliableSite’s community forum.