> For the complete documentation index, see [llms.txt](https://docs.mipcraft.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mipcraft.eu/network-manager/installation.md).

# Installation

NetworkManager is designed to be highly versatile. It runs on both proxies (Velocity/BungeeCord) and backend Minecraft servers (Spigot/Paper) using the same JAR, and offers multiple frontend web panel deployment models.

## Prerequisites

Before installing NetworkManager, ensure your network meets the following requirements:

* [**Velocity**](https://papermc.io/downloads/velocity) or [**BungeeCord**](https://hub.spigotmc.org/jenkins/job/BungeeCord/) (Latest recommended).
* [**DataManager**](https://www.spigotmc.org/resources/datamanager-velocity-bungeecord-spigot-paper.102622/) plugin (installed on the proxy for database pooling).
* [**NetworkManager**](https://www.spigotmc.org/resources/%E2%9C%85-network-manager-%EF%B8%8F%E2%9A%99%EF%B8%8F-games-server-managing-%E2%9C%85.113839/) plugin.

{% stepper %}
{% step %}

## DataManager Setup (Required)

NetworkManager relies on the **DataManager** plugin to manage database connections. You must configure DataManager before proceeding.

1. Download the **DataManager** plugin JAR.
2. Place the JAR in your proxy's `plugins/` directory.
3. Start the proxy once to generate the DataManager configuration files, then stop it.
4. Open the DataManager configuration file (typically `plugins/DataManager/config.yml` or `config.json`) and input your database credentials:

   ```yaml
   mysql:
     local: true
     host: "localhost"
     database: "database"
     username: "username"
     password: "password"
     port: 3306
   ```
5. Save the file and start your proxy to verify the database connection loads without errors.
   {% endstep %}

{% step %}

## Proxy Installation (Velocity or BungeeCord)

The proxy server acts as the primary administrator, running the API server and coordinating bans, playtime, and player histories.

1. Download the latest `NetworkManager.jar`.
2. Copy the JAR into your proxy's `plugins/` directory:
   * **Velocity**: `plugins/`
   * **BungeeCord**: `plugins/`
3. Start the proxy server to generate the default configuration file, then stop it.
4. Open `plugins/NetworkManager/config.yml` and adjust basic settings, then proceed to the web panel setup below if you want to use the web panel.
   {% endstep %}

{% step %}

## Backend Server Installation (Spigot or Paper)

Installing NetworkManager on your backend servers is **required for a network** if you want to support in-game GUI menus (such as `/games` and `/hubs`), automatically reboot servers from the panel, or use PlaceholderAPI.

1. Place the **same** `NetworkManager.jar` into the `plugins/` directory of each backend Spigot or Paper server.
2. Start the backend servers. They will automatically detect they are running on Bukkit/Spigot rather than a proxy and will enter **Backend Mode**.
3. Ensure your proxy configuration permits plugin channel communication:
   * By default, Spigot and Velocity/BungeeCord will automatically exchange plugin messaging on the `nm:channel` channel. Ensure no packet-filtering plugins block this channel.
     {% endstep %}

{% step %}

## Web Dashboard Deployment

{% hint style="danger" %}
**Security Warning: Secure Production Deployments**\
This web server requires strictly restricted access. For security, run this server **locally only** or deploy it behind a **reverse proxy (like Nginx) protected with SSL/TLS**. Do not expose this server directly to the public internet without an authentication layer.
{% endhint %}

You can deploy the web dashboard in two ways:

{% tabs %}
{% tab title="A: Built-in / Embedded (Same Server)" %}
The easiest setup. The plugin hosts the dashboard directly from your proxy.

1. Open `plugins/NetworkManager/config.yml` on your proxy.
2. Locate the `web` section and configure it:

   ```yaml
   web:
     enabled: true
     host: "0.0.0.0"       # Bind to all interfaces
     port: 8080            # Port to access the panel
     password: "my-pass"   # Change this to a secure password
     api_key: ""           # Leave blank; automatically generates on startup
   ```
3. Restart the proxy. The dashboard is now accessible at `http://<your-proxy-ip>:8080`.
4. Log in using your configured password.
   {% endtab %}

{% tab title="B: Remote / External Web Hosting" %}
For separate web hosts or high-traffic networks, run the JAR directly in Standalone Panel Server mode. This establishes an outbound WebSocket tunnel from the proxy to the panel, eliminating CORS issues and SSL/HTTPS mixed content blocks.

{% stepper %}
{% step %}
Start the Standalone Panel Server

```bash
java -jar NetworkManager.jar --panel --http-port 8000 --tunnel-port 8001 --secret test1234
```

* `--panel`: Runs in Standalone Panel Server mode.
* `--http-port`: Port the HTTP Dashboard serves on (default: `8000`).
* `--tunnel-port`: Port the WebSocket tunnel listens on for proxy connections (default: `8001`).
* `--secret`: Key to authenticate your Minecraft proxy.
  {% endstep %}

{% step %}
Configure the proxy

Configure `plugins/NetworkManager/config.yml` on your proxy:

```yaml
panel_tunnel:
  enabled: true
  url: "ws://<panel-ip-or-host>:8001/tunnel"
  secret: "test1234"
```

{% endstep %}

{% step %}
Restart the proxy

Restart your proxy. It connects and tunnels all API requests to the panel. Access the panel at `http://<panel-ip-or-host>:8000`.
{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mipcraft.eu/network-manager/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
