External Server Guide

From Minehut Wiki
Jump to navigation Jump to search

What is an External Server?

External servers are servers hosted outside of Minehut that are connected to the Minehut proxy in order for them to use Minehut's advertising features. The original guide on how to setup an External Server can be found here.

Creating an External Server

In order to connect an external server to Minehut, you first need to pick an external hosting provider and create a server on their platform. The instructions for doing this vary depending on your host, and you will need to figure this part out on your own.

An external server can be either run as a Velocity, Waterfall, or Lilypad proxy network, or a standalone Paper server. Bungeecord is currently not supported.

If you are new to setting up a proxy, we recommend starting with Velocity, which you can find instructions here to get going. Alternatively, instructions for Paper can be found here if you do not wish to run a proxy. Also please ensure that your proxy works properly before attempting to do any of the steps to connect it to Minehut.

Configuring Minehut Player Authentication

Before players can connect to your server through Minehut, you will need to set up your server to use Minehut’s authentication service. Players will only be able to join if you complete this step.

Velocity

Add the following CLI flag to your start script:

-Dmojang.sessionserver=https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined

When you are done, your script may look something like the following:

java -Dmojang.sessionserver=https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined -jar velocity.jar

Waterfall

Add the following CLI flag to your start script:

-Dwaterfall.auth.url="https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined?username=%s&serverId=%s%s"

When you are done, your script may look something like the following:

java -Dwaterfall.auth.url="https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined?username=%s&serverId=%s%s" -jar waterfall.jar

Bungeecord

This proxy type is currently not supported due to an issue in Bungeecord; please use Waterfall instead or switch to Velocity until this is resolved.

Lilypad

Set the following environment variable LILYPAD_MOJANG_SESSIONSERVER_URL to https://api.minehut.com/mitm/proxy/session/minecraft/hasJoined

Paper

These instructions only apply if you are running Paper standalone and NOT under a proxy. If you are using Velocity, Waterfall, or Lilypad, you should have already configured this and you can safely skip this section.

Add the following CLI flags to your start script:

  • -Dminecraft.api.auth.host=https://authserver.mojang.com/
  • -Dminecraft.api.account.host=https://api.mojang.com/
  • -Dminecraft.api.services.host=https://api.minecraftservices.com/
  • -Dminecraft.api.session.host=https://api.minehut.com/mitm/proxy

When you are done, your script may look something like the following:

java -Dminecraft.api.auth.host=https://authserver.mojang.com/ -Dminecraft.api.account.host=https://api.mojang.com/ -Dminecraft.api.services.host=https://api.minecraftservices.com/ -Dminecraft.api.session.host=https://api.minehut.com/mitm/proxy -jar paper.jar

In addition, ensure that you have set enforce-secure-profile to false in your server.properties file.

Enable Proxy Protocol

Note: Skip this step if you’re using TCPShield for DDoS protection.

Enable proxy protocol in your proxy’s configuration file:

Velocity

In velocity.toml under advanced, set haproxy-protocol = true

Waterfall

In config.yml under listeners, set proxy_protocol: true

Paper

In config/paper-global.yml under proxies, set proxy-protocol: true

Connect Your External Server Plan on Minehut

Create a Minehut Account

Go to Minehut and create an account. You’ll use this account to manage your server.

Set Your Server Plan to External

  1. Go to your server (or create a new one)
  2. Activate your server and open the Server Panel by clicking “Manage”
  3. From your Server Panel, edit your server plan
  4. Set your server plan to “External” and press confirm
  5. You’re now ready to add your external server

External Server Settings

On Minehut, open your server’s server panel and navigate to the “External Server Settings” section.

External Server Settings
Complete All Fields
Field Description
IP Enter the public IP of your external server.

Your host will normally provide you with the public IP, which typically are four numbers separated by dots (for example 123.45.67.89). This information is usually visible somewhere within the server panel.

A domain name can also be used here if you have one (for example play.myserver.com configured as an A record pointing to 123.45.67.89).

If you are using TCPShield, this will instead be your DDoS-protected IP that they provided.

Proxy Type Select the type of proxy you’re using.

This will be “Velocity” or “Waterfall” if you are using either. If using anything else (for example, a standalone Paper server) select “Other”.

DNS Record Type Select the type of record used for your server.

Use “Port” if you are using a public IP address, DDoS-protected IP, or are using a domain that does not use an SRV record.

Use “SRV” only if you use an SRV record on your server. If you are not using an SRV record or have a misconfigured SRV record, selecting this will break your server.

Port The port used to connect to your external server.

The default Minecraft port is 25565 but many hosts will assign you a different port, so you should check to make sure. Normally the port is displayed in the same place as the IP. Players will not be able to connect if the port is wrong.

TCP Shield Select whether you have configured TCP Shield for DDoS protection.

Most servers should leave this as "Not Configured" as most hosts already have built-in DDoS protection.

Select "Configured" only if you have configured your external server on TCPShield.com, or this will break your server.

Set up TCPShield

Note: This section is not required.

TCPShield provides additional DDoS protection for servers. Keep in mind that normally if you are proxying through Minehut this will not be necessary since you will be protected behind Minehut’s network. To use TCPShield you will need to make some additional changes to the configuration in the Minehut panel as well as the TCPShield panel.

A custom domain is required to set up a TCPShield external server.

In TCPShield

  1. Go to https://panel.tcpshield.com/register and sign up for an account or log in if you already have one.
  2. Add a network with a name of your choice.
  3. Navigate to “Backends” and set up your proxy server by adding a set with your proxy IP. Make sure you leave “Proxy Protocol” here as “Disabled”.
  4. Navigate to “Domains” and verify your custom domain.
  5. Navigate back to “Backends” and click “Add” for the backend you created earlier.
  6. Scroll back up and follow the steps provided.

In your External Server Settings

  1. IP: Use the domain pointing to the CNAME record as the IP.
  2. TCPShield: Select “Configured Externally”.

Resource Packs

Main article: Resource Packs

Resource Packs allow you to modify the textures of the game for the player and can be really useful for servers who want to create custom experiences for their players. On Minehut, you can only serve resource packs through the whitelist links.

Rules and Guidelines

Due to the nature of how externally hosted servers work when connected to Minehut, Minehut staff are unable to widely moderate or act on behaviors that occur on those servers. External servers are welcome to access Minehut's network and share in their player community experiences, as well as advertise to players to join them, as long as they adhere to the following rules:

  1. Follow all the rules and guidelines as outlined on the community rules page as if you are an internally hosted Minehut community server.
  2. Only use the officially supported method for connecting your external server to the Minehut network. Other methods may be deprecated, removed, patched out, or seen as a rule violation if they disrupt other Minehut community experiences.
  3. Do not create multiple server listings in Minehut which point to the same external server. Multiple server listings can be created for the same network so long as the resulting location is an entirely different setting and gameplay than others you link to. Example: You cannot create three servers in Minehut which all link to the same lobby on your external network.
  4. External servers are held to a high standard for behaviors that can result in harm done to players, such as (but not limited to) creating an environment where players feel free to act in sexually suggestive or inappropriate ways, use server-created gambling mechanics, get involved in witch hunts or doxing schemes, building discriminatory content into their server features, or encouraging strong profanity in the public chats.
  5. If an external server is suspended from Minehut, that server has lost the privilege to connect to the Minehut community and cannot create alternate servers or accounts to attempt to evade the punishment.
  6. Do not instruct players who join via Minehut to leave Minehut’s network to connect directly to your external server address.