68 Bukkit Set Up
Aurora Lahtela edited this page 2023-01-15 13:54:29 +02:00

Plan Header

Server Set-Up

This is the set up tutorial for game server platforms; Bukkit, Spigot, Sponge, Nukkit and Fabric based servers.
Use this tutorial for proxy platforms: Network Set-up

These icons are used to aid during installation

💭 Question about possible issues (Someone has had these before)
📢 Important note about the settings being changed
🚧 Additional steps for some users
💡 Extra stuff

There is also a video tutorial for a simple installation. Follow the text tutorial at the same time in case your platform needs extra steps.


✔️ Requirements

  • An unused open port for Plan webserver on your Minecraft server machine
  • Java 11 (If you don't meet this requirement install older version 5.4 build 1722)

💭 I'm using a host, how do I get an open port?

Some hosts offer a port range that contains open ports, while others need you to contact them to have a port opened.
If you have access to the firewall, you can open the port from there directly.

Opening port on a firewall is explained in this tutorial.

💭 I don't have an open port, what now?

You can try using an existing webserver on the same machine. Please note that the support for this is limited.


🚩 Installation Goals

Here are the goals the tutorial aims to guide you through.
At the end of this tutorial you will have

  • .. a link that points to Plan webserver
  • .. access to the webserver of Plan (Running on your server on the plugin)
    • .. an open port for Plan webserver

Additionally you might have

  • .. Accepted GeoLite2 EULA
  • .. if using Pterodactyl Panel, allocated a port for Plan
  • .. if using Azure or similar, enabled port forwarding
  • .. if using Cauldron or Thermos, updated ASM Library from v4 to v5.

After installing, it is also possible to

  • .. set up MySQL for Plan
  • .. set up Login and HTTPS on Plan webserver

Step 0: Prepare

Download Plan.jar (or PlanFabric.jar for fabric) - If you don't have one get one from Releases

🚧 Pterodactyl Panel Users

Port needs to be allocated before it can be used, see this section to do so.

🚧 Cauldron / Thermos Users

ASM 5 is required, see this section on how to update the library before getting started.

Step 1: Install

Place Plan.jar to the plugin directory (/plugins/ or /mods/) and restart the server.

Plan/config.yml should appear in the plugin directory.

Step 2: Change Webserver Port

💡 Tip

Plan has a built in webserver.
Extra web-hosting is not required if you have an open port.

Default Webserver Port is 8804.
If 8804 is not available or you want to use another port, change Webserver.Port to another value in the Plan config:

Webserver:
  Port: 8804

Reload the plugin after changing the port with /plan reload to apply changes.

📢 Important

Make sure to use a Port that is not designated for a non HTTP protocol like FTP.
You can find list of well-known ports on Wikipedia if necessary. (Generally, don't use ports below 1024.)

💭 Failed to bind port, what now?

The port is likely in use by another program, try using another port.

Step 3: Open Port from Firewall

Open the port you chose in Step 2 by using your firewall software. If your host has given you an open port you can skip this step.

💡 Tip

You can use this tool to test if the port is open:
https://www.yougetsignal.com/tools/open-ports/

🚧 Azure Users

Make sure to enable port forwarding on Azure

Step 4: Check that the address is correct

Now Plan should have enabled.
Find the address in the Plan enable log on the console.

[INFO]: [Plan] Webserver running on PORT #### (<Address is here>)

💭 Why is the address http://0.0.0.0:8804 or http://:8804?

These are invalid addresses.
Plan looks for the IP in server.properties - If the IP is not valid you will need to change the address, instructions below.

You can change the address with Webserver.Alternative_IP settings.

Point the address to your server:

Webserver:
    Alternative_IP:
        Enabled: true
        Address: "play.address.net:%port%"

📢 Important

Don't replace %port% in the address with any port, it is replaced with Webserver.Port by Plan automatically. Make sure to change Alternative_IP to true.

💡 Advanced Tip

If you don't want to have :PORT at the end of the address, you can use a reverse-proxy like Nginx or Apache.

Step 5: Try to access the page

If you didn't reload Plan after the last step, do so now with /plan reload.

Find the address in the Plan enable log on the console like in the previous step, and try to access it with your browser.

💡 Tip
You can also get a link to the page by using /plan server command.

💭 Why can't I access the page?

There can be multiple different causes depending on the error the browser gives you.

  • ERR_CONNECTION_REFUSED or ERR_TIMED_OUT: The browser could not connect to the address or port. Make sure you got the address right and check that the port is open (Redo steps 3 and 4 if necessary).
  • ERR_NAME_NOT_RESOLVED: The address could not be resolved, this is a problem with DNS. Set up DNS A-record to point to your server machine or change the address to something else (Step 4)
  • ERR_DNS_PROBE_FINISHED_NXDOMAIN: The DNS might not have not updated the A-record yet
  • See Access issues flowchart

If these steps do not solve the issue, you can ask for support on Discord


Now you should have a Plan properly set up on your server.
Next section is about additional set-up


So that Plan can download Geolocation database you need to accept GeoLite2 EULA in the Plan config under Data_gathering.Accept_GeoLite2_EULA

🚧 Sponge Users

Geolocation is disabled by default on Sponge. See how to enable it in this section

(Optional) MySQL

Plan does not create a new database automatically, so you need to either create or use an existing one.

  • Open your MySQL client or panel and connect to the MySQL.
  • Find 'Execute SQL' or similar, where you can execute SQL statements.
  • Create a new database with CREATE DATABASE <db_name> CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
  • Give the MySQL user privileges to the table with a GRANT statement. How to grant privileges

💭 Should I give all privileges?

MySQL: Privilege-Granting Guidelines

If you don't want to give all privileges, Plan needs at least the following: ALTER, CREATE, CREATE_TEMPORARY_TABLES, CREATE_VIEW, DELETE, DROP, INDEX, INSERT, LOCK_TABLES, REFERENCES, SELECT, SHOW_VIEW, UPDATE

  • Set Database.Type to MySQL and the other Database.MySQL settings appropriately:
Database:
  Type: MySQL
  MySQL:
    Address: localhost
    Port: 3306
    User: <user>
    Password: <password>
    Database: <db_name>
    Launch_options: "?rewriteBatchedStatements=true&useSSL=false"

⚠️ If you get MySQL time zone error on start-up

Example of the error: Failed to initialize pool: The server time zone value 'unknown' is unrecognized or represents more than one time zone.

⚠️ Public key retrieval not allowed error on start-up

Example of the error: Failed to initialize pool: Public Key Retrieval is not allowed

  • Remove &useSSL=false from Database.MySQL.Launch_options so that the public key is not retrieved publicly.

(Optional) Protect the Website with a Login Prompt

In order to enable user authentication, HTTPS set up is required. This requires a Certificate to be installed:

How to create users is also covered by the linked tutorial.

💭 I set this up correctly, why can't I access the page?

Make sure that the address has https:// in front of it.
Plan doesn't upgrade http traffic to https because it only has one port.


Extra (necessary) Set-up Section

Sponge

Geolocation is disabled by default to match Ore guidelines.

  • Player Geolocation can be enabled by setting Data_gathering.Geolocations to true

Back to step 2

Pterodactyl Panel

On Pterodactyl the port Plan runs on needs to be allocated.

  • Go to node category of your panel (http(s)://panel.domain.com/admin/nodes) & create a new node if you don't have one.
  • Navigate to The node > Allocation
  • On the right side in Assign New Allocations, put your IP Address (Alias is not necessary) & fill in the port(s) you wish to reserve.
  • Next, Choose a server from http(s)://panel.domain.fr/admin/servers & navigate to Build Configuration > Allocation Management
  • Click on Assign Additional Ports and choose what port(s) you wish to assign to this server. Click Update Build Configuration to save changes.
  • Restart docker container to apply changes to the build config

After the steps change Alternative_IP settings in Plan config to point to the machine Pterodactyl is running on (in step 4).

Back to step 0

Cauldron / Thermos / KCauldron

Original on DiscordSRV wiki

The SpecialSource library included in Cauldron uses ASM4. Updating it to the latest version is required.
Instructions for updating to ASM5:

1. Navigate to the bin\net\md-5\SpecialSource\1.7-SNAPSHOT folder of the server
2. Delete the SpecialSource-1.7-SNAPSHOT.jar jar file
3. Download SpecialSource v1.7.4 from http://central.maven.org/maven2/net/md-5/SpecialSource/1.7.4/SpecialSource-1.7.4.jar
4. (KCauldron) Copy the jar file to the bin\net\md-5\SpecialSource\1.7-SNAPSHOT folder
4. (Cauldron / Thermos) Copy the jar file to the libraries\net\md-5\SpecialSource\1.7-SNAPSHOT folder
5. Rename the jar file you just copied to SpecialSource-1.7-SNAPSHOT.jar

Back to step 0