Updated Bukkit Set Up (markdown)
parent
8ab18dae6b
commit
0603b2d568
267
Bukkit-Set-Up.md
267
Bukkit-Set-Up.md
|
@ -1,111 +1,253 @@
|
|||
![Plan Header](http://puu.sh/AXSg7/5f2f78c06c.jpg)
|
||||
# Setup on a Sponge/Bukkit based server
|
||||
![Plan Header](https://puu.sh/AXSg7/5f2f78c06c.jpg)
|
||||
|
||||
This is the Set-Up tutorial for game servers.
|
||||
If you're installing the plugin on a network (Proxy server, Bungee/Velocity) refer to [[Bungee Set-Up]]
|
||||
# Server Set-Up
|
||||
This is the set up tutorial for game server platforms; **Bukkit**, **Spigot**, **Sponge** & **Nukkit** based servers.
|
||||
Use this tutorial for proxy platforms: [Network Set-up](https://github.com/plan-player-analytics/Plan/wiki/Bungee-Set-Up)
|
||||
|
||||
----
|
||||
|
||||
## ✔️ Requirements
|
||||
|
||||
- An unused open port for Plan webserver on your Minecraft server machine
|
||||
|
||||
> 💭 **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](https://github.com/plan-player-analytics/Plan/wiki/External-WebServer-Use) 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
|
||||
|
||||
- .. 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
|
||||
|
||||
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
|
||||
|
||||
----
|
||||
|
||||
## Step 0: Prepare
|
||||
|
||||
> 🚧 **Cauldron / Thermos Users**
|
||||
>
|
||||
> ASM 5 is required, see [this section](https://github.com/plan-player-analytics/Plan/wiki/Bukkit-Set-Up#cauldron--thermos--kcauldron) on how to update the library before getting started.
|
||||
|
||||
Download `Plan.jar` - If you don't have one get one from [Releases](https://github.com/plan-player-analytics/Plan/releases)
|
||||
|
||||
## Step 1: Install
|
||||
|
||||
Place the .jar to the `plugins` or `mods` folder and restart the server
|
||||
Place Plan.jar to the plugin directory (`/plugins/` or `/mods/`) and restart the server.
|
||||
|
||||
> If the plugin fails to enable, `/plan reload` is available to restart the plugin after config changes.
|
||||
`Plan/config.yml` should appear in the plugin directory.
|
||||
|
||||
## Step 2: Change Webserver Port
|
||||
|
||||
Plan has a built in webserver - **extra web hosting provider is not required** if you have an open port on your server.
|
||||
> 💡 **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.
|
||||
If 8804 is not available or you want to use another port, change `Webserver.Port` to another value in the Plan config:
|
||||
|
||||
```
|
||||
```yml
|
||||
Webserver:
|
||||
Port: 8804
|
||||
```
|
||||
|
||||
**Reload the plugin after changing the port** `/plan reload`
|
||||
Make sure to use a Port that is not designated for another protocol like FTP or Java will fail to bind to the address.
|
||||
Reload the plugin after changing the port with `/plan reload` to apply changes.
|
||||
|
||||
### Unsure about which port to use?
|
||||
> 📢 **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](https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers) if necessary. (Generally, don't use ports below 1024.)
|
||||
|
||||
If you hosting has limited the amount of ports available to you, try contacting their support for assistance.
|
||||
|
||||
> **Pterodactyl users**
|
||||
> The port must be allocated to be accessible, see [Possible Additional Setup section](https://github.com/plan-player-analytics/Plan/wiki/Bukkit-Set-Up#pterodactyl-users)
|
||||
> 🚧 **Pterodactyl Panel Users**
|
||||
>
|
||||
> Port needs to be allocated before it can be used, see [this section](https://github.com/plan-player-analytics/Plan/wiki/Bukkit-Set-Up#pterodactyl-panel) to do so.
|
||||
|
||||
## Step 3: Open Port from Firewall
|
||||
|
||||
If you are using a firewall, make sure that the port you selected in the last step is open.
|
||||
|
||||
How to do this depends on the operating system and firewall program you have installed.
|
||||
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.
|
||||
|
||||
- [Windows Server 2012](https://support.rackspace.com/how-to/managing-the-windows-server-2012-firewall/)
|
||||
- [Windows 10](http://www.tomshardware.co.uk/faq/id-3114787/open-firewall-ports-windows.html)
|
||||
- [Linux/Debian iptables](https://wiki.debian.org/iptables)
|
||||
- [Linux/Debian/Ubuntu uwf](https://wiki.debian.org/Uncomplicated%20Firewall%20%28ufw%29)
|
||||
|
||||
If you don't control your firewall, please contact your hosting for support on getting a port open that supports HTTP or HTTPS.
|
||||
> 💡 **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](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal)
|
||||
|
||||
## Step 4: Check that the address is correct
|
||||
|
||||
Find the address in the Plan enable log on the console and try to access it with a browser.
|
||||
```
|
||||
Now Plan should have enabled.
|
||||
Find the address in the Plan enable log on the console.
|
||||
```log
|
||||
[INFO]: [Plan] Webserver running on PORT #### (<Address is here>)
|
||||
```
|
||||
If you are unable to access the address, change `Webserver.Alternative_IP` settings to point to your machine (Don't replace `%port%`):
|
||||
```
|
||||
|
||||
> 💭 **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:
|
||||
```yml
|
||||
Webserver:
|
||||
Alternative_IP: true
|
||||
Address: "<address>:%port%"
|
||||
Address: "play.address.net:%port%"
|
||||
```
|
||||
|
||||
For example if you connect to your server with `play.address.net:25565` change to `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`.
|
||||
|
||||
If the page is still not accessible [try checking if the port is open](https://www.yougetsignal.com/tools/open-ports/).
|
||||
> 💡 **Advanced Tip**
|
||||
>
|
||||
> If you don't want to have `:PORT` at the end of the address, you can use a reverse-proxy like [Nginx](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) or [Apache](https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html).
|
||||
|
||||
## Step 5: (Optional) Protect the Website with a Login Prompt
|
||||
## Step 5: Try to access the page
|
||||
|
||||
In order to enable user authentication, HTTPS set up is required.
|
||||
This requires a Certificate to be installed in a Java Keystore:
|
||||
> 🚧 **Sponge Users**
|
||||
>
|
||||
> Webserver is disabled by default on Sponge. See how to enable it in [this section](https://github.com/plan-player-analytics/Plan/wiki/Bukkit-Set-Up#sponge)
|
||||
|
||||
- [[How to set up SSL Certificate|SSL Certificate (HTTPS) Set-Up]]
|
||||
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 analyze` 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)
|
||||
>
|
||||
> If these steps do not solve the issue, you can [ask for support on Discord](http://support.playeranalytics.net)
|
||||
|
||||
----
|
||||
|
||||
Now you should have a Plan properly set up on your server.
|
||||
Next section is about additional set-up
|
||||
|
||||
----
|
||||
|
||||
## (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.
|
||||
|
||||
> 💭 **Should I give all privileges?**
|
||||
>
|
||||
> [MySQL: Privilege-Granting Guidelines](https://dev.mysql.com/doc/refman/5.6/en/privileges-provided.html#privileges-provided-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:
|
||||
|
||||
```yml
|
||||
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.`
|
||||
- Set up [default time zone for MySQL](https://stackoverflow.com/questions/26515700/mysql-jdbc-driver-5-1-33-time-zone-issue/44720416#44720416)
|
||||
- or add `&serverTimezone=UTC` to `Database.MySQL.Launch_options`
|
||||
|
||||
----
|
||||
|
||||
## (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 set up SSL Certificate](https://github.com/plan-player-analytics/Plan/wiki/SSL-Certificate-%28HTTPS%29-Set-Up)
|
||||
|
||||
How to create users is also covered by the linked tutorial.
|
||||
|
||||
## Get a link to the website
|
||||
----
|
||||
|
||||
After installation you can use `/plan analyze` command to get a link to the website.
|
||||
# Extra (necessary) Set-up Section
|
||||
|
||||
# Possible additional set up
|
||||
## Sponge
|
||||
|
||||
**On Sponge WebServer & Geolocation gathering is disabled by default**, enable it with `Webserver.Disable_Webserver: false`
|
||||
Geolocation can be enabled with `Data_gathering.Geolocations: true`
|
||||
Webserver and Geolocations are disabled by default to match Ore guidelines.
|
||||
|
||||
## Empty IP in server.properties
|
||||
If IP in your server.properties is empty, you should change `Webserver.Alternative_IP.Address`to an address or IP that points to the Plan WebServer.
|
||||
For example if you connect to your server with play.address.net:25565 change it to `play.address:%port%`
|
||||
- Webserver can be enabled by setting `Webserver.Disable_Webserver` to `false`
|
||||
- Player Geolocation can be enabled by setting `Data_gathering.Geolocations` to `true`
|
||||
|
||||
After setting this set `Webserver.Alternative_IP`to true.
|
||||
[Back to step 5](https://github.com/plan-player-analytics/Plan/wiki/Bukkit-Set-Up#step-5-try-to-access-the-page)
|
||||
|
||||
```
|
||||
Webserver:
|
||||
...
|
||||
Alternative_IP: true
|
||||
Address: play.address:%port%
|
||||
```
|
||||
## Pterodactyl Panel
|
||||
|
||||
> **%port%** is a placeholder that is automatically replaced with `Webserver.Port`.
|
||||
> You don't need to replace it unless you set up a routing rule on your domain.
|
||||
On Pterodactyl the port Plan runs on needs to be allocated.
|
||||
|
||||
## MySQL
|
||||
Create a new database in your MySQL with `CREATE DATABASE _dbname_` and change the settings in the Plan config.
|
||||
- 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.
|
||||
|
||||
If you're using phpMyAdmin: [Creating a new Database on phpMyAdmin](http://webvaultwiki.com.au/Default.aspx?Page=Create-Mysql-Database-User-Phpmyadmin&NS=&AspxAutoDetectCookieSupport=1)
|
||||
After the steps change `Alternative_IP` settings in Plan config to point to the machine Pterodactyl is running on (in step 4).
|
||||
|
||||
*If MySQL connection fails on plugin startup the plugin is disabled. You can restart it with /plan reload after changing the config.*
|
||||
|
||||
[Back to step 2](https://github.com/plan-player-analytics/Plan/wiki/Bukkit-Set-Up#step-2-change-webserver-port)
|
||||
|
||||
## Cauldron / Thermos / KCauldron
|
||||
|
||||
[*Original on DiscordSRV wiki*](https://github.com/DiscordSRV/DiscordSRV/wiki/FAQ#fix-for-kcauldron)
|
||||
|
||||
The SpecialSource library included in Cauldron uses ASM4. Updating it to the latest version is required.
|
||||
Instructions for updating to ASM5:
|
||||
```
|
||||
|
@ -116,24 +258,5 @@ Instructions for updating to ASM5:
|
|||
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
|
||||
```
|
||||
[*copied from DiscordSRV wiki*](https://github.com/DiscordSRV/DiscordSRV/wiki/FAQ#fix-for-kcauldron)
|
||||
|
||||
## Pterodactyl users
|
||||
|
||||
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 (for all servers).
|
||||
- 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.
|
||||
|
||||
After the steps change `Alternative_IP` settings in Plan config to point to the machine Pterodactyl is running on.
|
||||
|
||||
## Azure or similar service
|
||||
|
||||
Make sure to [enable port forwarding on Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal)
|
||||
|
||||
## For further configuration refer to:
|
||||
- [[Bukkit Configuration]]
|
||||
- [Commands & Permissions](https://github.com/Rsl1122/Plan-PlayerAnalytics/wiki/Commands-%26-Permissions)
|
||||
[Back to step 0](https://github.com/plan-player-analytics/Plan/wiki/Bukkit-Set-Up#step-0-prepare)
|
Loading…
Reference in New Issue