# ⚙️ Core Configuration

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

This file controls the global behavior of NexusProxy.

It includes:

* License settings
* Global permissions
* Cluster identity
* Redis connection
* Database connection
* Core messages
* Runtime storage settings

Module-specific settings are not configured here.

Each module has its own YAML file inside:

```
plugins/NexusProxy/modules/<module>/<module>.yml
```

***

### Main Configuration File

The main configuration file is generated after the first proxy startup.

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

Use this file to configure global NexusProxy settings.

Examples of global settings include:

* License key
* Proxy identity
* Redis connection
* Database storage
* Core messages
* Global permissions

{% hint style="info" %}
Most feature-specific settings are not located in `nexusproxy.yml`.

Each module has its own configuration file inside the `modules` folder.
{% endhint %}

***

### Cluster Settings

The cluster section identifies this proxy inside NexusProxy.

Example:

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

***

### proxy\_id

The `proxy_id` is the internal ID used by NexusProxy for Redis synchronization, player presence, storage, and cross-proxy systems.

Every Velocity proxy must have a different `proxy_id`.

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.

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"
```

Unlike `proxy_id`, this value can be more readable and user-friendly.

***

### Storage Settings

NexusProxy supports different storage modes depending on your setup.

Storage can be used for:

* Redis synchronization
* Database persistence
* Memory-only setups

The main storage section is configured in:

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

***

### Redis

Redis is used for cross-proxy synchronization.

Enable Redis if your network uses multiple Velocity proxies or needs shared data between proxies.

Redis can be used for:

* Global online counts
* Proxy online counts
* Server online counts
* Shared player presence
* Friends online status
* Staff synchronization
* Announcement synchronization
* Donation synchronization
* PlaceholderAPI expansion data

Example structure:

```yaml
storage:
  redis:
    enabled: true
    host: "127.0.0.1"
    port: 6379
    password: ""
    database: 0
    channel_prefix: "nexusproxy"
```

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

***

### Redis Channel Prefix

The Redis `channel_prefix` is used by NexusProxy to separate its Redis data from other systems.

Default:

```yaml
channel_prefix: "nexusproxy"
```

If you use the NexusProxy PlaceholderAPI expansion, the expansion must use the same Redis connection and the same channel prefix.

{% hint style="warning" %}
If the Velocity plugin and the PlaceholderAPI expansion use different Redis settings, backend placeholders may return incorrect values or `0`.
{% endhint %}

***

### Database Storage

NexusProxy supports optional database storage.

Supported database types:

```yaml
none
mysql
mongodb
mongo
```

Use `none` if you do not want persistent database storage.

Example:

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

Use MySQL or MongoDB if you want persistent data for supported systems.

Database storage is recommended for:

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

***

### MySQL

MySQL can be used for persistent NexusProxy data.

Example structure:

```yaml
storage:
  database:
    type: "mysql"
    mysql:
      host: "127.0.0.1"
      port: 3306
      database: "nexusproxy"
      username: "root"
      password: "password"
      use_ssl: false
      allow_public_key_retrieval: true
```

***

### MongoDB

MongoDB can also be used for persistent NexusProxy data.

Example structure:

```yaml
storage:
  database:
    type: "mongodb"
    mongodb:
      uri: "mongodb://localhost:27017"
      database: "nexusproxy"
```

***

### Runtime Libraries

NexusProxy keeps the main plugin jar lightweight.

When optional systems require extra libraries, NexusProxy downloads them into:

```
plugins/NexusProxy/libraries/
```

This may include libraries for:

* MySQL
* MongoDB
* Redis
* Discord bot mode / JDA

{% hint style="info" %}
HelpOp Discord bot mode does not require a separate JDA addon jar.

The required JDA runtime libraries are handled by NexusProxy.
{% endhint %}

***

### Reloading NexusProxy

To reload NexusProxy, use:

```
/nexusproxy reload
```

Aliases:

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

To check loaded modules:

```
/nexusproxy modules
```

To check Redis and database status:

```
/nexusproxy storage
```

***

### Configuration Tips

* Use a unique `proxy_id` for every Velocity proxy.
* Use the same Redis settings on every proxy.
* Use the same Redis and database settings in the PlaceholderAPI expansion.
* Enable only the modules your network needs.
* Restart the proxy after large configuration changes.
* Use `/nexusproxy storage` after editing Redis or 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/core-configuration.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.
