# 🛠️ Installation

***

### Step 1: Stop the proxy

Before installing NexusProxy, stop your Velocity proxy completely.

Do not install, remove, or replace plugin jars while the proxy is running.

***

### Step 2: Install NexusProxy

Place the NexusProxy jar inside your Velocity `plugins` folder.

Example:

```
velocity/
└── plugins/
    └── NexusProxy-x.x.x.jar
```

{% hint style="warning" %}
Install NexusProxy on the Velocity proxy only.

Do not install the main NexusProxy jar on backend servers.
{% endhint %}

***

### Step 3: Start the proxy

Start your Velocity proxy once.

NexusProxy will generate its main folder, configuration file, module folders, and libraries folder.

After the first startup, you should see:

```
plugins/
└── NexusProxy/
    ├── nexusproxy.yml
    ├── modules/
    └── libraries/
```

***

### Step 4: Configure the license

Open:

```
plugins/NexusProxy/nexusproxy.yml
```

If your build requires a license key, configure it under the license section.

Example:

```yaml
license:
  key: "YOUR_LICENSE_KEY"
```

If licensing is not enabled in your build, you can skip this step.

***

### Step 5: Configure the proxy identity

Each Velocity proxy should have a unique internal proxy ID.

In `nexusproxy.yml`, configure:

```yaml
cluster:
  proxy_id: "Proxy-1"
  proxy_name: "Proxy 1"
```

#### proxy\_id

The `proxy_id` is the internal ID used by NexusProxy for Redis, storage, synchronization, and presence tracking.

It must be unique for every Velocity proxy.

Correct example:

```yaml
# First proxy
cluster:
  proxy_id: "Proxy-1"

# Second proxy
cluster:
  proxy_id: "Proxy-2"
```

Incorrect example:

```yaml
# First proxy
cluster:
  proxy_id: "Proxy"

# Second proxy
cluster:
  proxy_id: "Proxy"
```

{% hint style="danger" %}
Do not use the same `proxy_id` on multiple Velocity proxies.

Using duplicated proxy IDs can break online counts, presence tracking, friends online status, and cross-proxy synchronization.
{% endhint %}

#### proxy\_name

The `proxy_name` is the display name used in messages and commands.

Example:

```yaml
cluster:
  proxy_name: "Main Proxy"
```

***

### Step 6: Configure Redis

Redis is optional, but strongly recommended for multi-proxy networks.

Enable Redis if you need:

* Global online counts
* Cross-proxy player presence
* Friends synchronization
* Staff synchronization
* Synced announcements
* Synced donation broadcasts
* PlaceholderAPI expansion data across servers

Redis is configured in:

```
plugins/NexusProxy/nexusproxy.yml
```

Make sure every proxy uses the same Redis connection settings.

This includes:

* Host
* Port
* Password
* Database
* Channel prefix

{% hint style="warning" %}
Every proxy should use the same Redis settings, but each proxy must have a different `proxy_id`.
{% endhint %}

***

### Step 7: Configure database storage

If you want persistent data, configure MySQL or MongoDB.

Database storage is recommended for:

* Friends
* Known player profiles
* Ignored players
* Private message data
* HelpOp history
* History-backed features

If you do not need persistent data, use memory-only mode.

Example:

```yaml
storage:
  database:
    type: "none"
```

***

### Step 8: Enable modules

Each module has its own folder and YAML file inside:

```
plugins/NexusProxy/modules/
```

Example:

```
plugins/NexusProxy/modules/messaging/messaging.yml
plugins/NexusProxy/modules/staff/staff.yml
plugins/NexusProxy/modules/friends/friends.yml
```

To enable a module, open its YAML file and set:

```yaml
module:
  enabled: true
```

To disable a module, set:

```yaml
module:
  enabled: false
```

{% hint style="info" %}
Enable only the modules your network actually needs.

The Main module is enabled by default.
{% endhint %}

***

### Step 9: Restart or reload

After editing the configuration, restart the proxy.

You can also reload NexusProxy with:

```
/nexusproxy reload
```

Aliases:

```
/nproxy reload
/np reload
```

If module-specific reload is supported, you can reload a specific module with:

```
/nexusproxy reload <module>
```

***

### Step 10: Check storage status

Use the storage command to confirm whether Redis and database storage are connected correctly:

```
/nexusproxy storage
```

Aliases:

```
/nproxy storage
/np storage
```

***

### Important Files

| Path                                                         | Purpose                                                                                                            |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `plugins/NexusProxy/nexusproxy.yml`                          | Main configuration file. Controls license, permissions, cluster identity, Redis, database, and core messages.      |
| `plugins/NexusProxy/modules/<module>/<module>.yml`           | Per-module configuration files. Controls module commands, aliases, permissions, messages, cooldowns, and settings. |
| `plugins/NexusProxy/libraries/`                              | Runtime libraries downloaded by NexusProxy when optional features require them.                                    |
| `plugins/PlaceholderAPI/expansions/expansion-nexusproxy.jar` | Optional PlaceholderAPI expansion for backend lobby servers.                                                       |
| `plugins/PlaceholderAPI/expansions/NexusProxy/config.yml`    | PlaceholderAPI expansion configuration. Must match NexusProxy Redis and database settings.                         |


---

# Agent Instructions: 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:

```
GET https://nexusproxy.nemesismc.net/getting-started/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
