---
description: Here we explain how to configure the master instance correctly.
---

# Master Configuration

{% hint style="info" %}
You can customize the master configuration in our dashboard. If, for any reason, it is found to be faulty, you can use the default configuration here or compare it with yours to discover potential errors.
{% endhint %}

### Default master configuration

```json
{
  "communication": {
    "hostname": "1.1.1.1",
    "port": 1510
  },
  "hetzner": {
    "api_token": "your_hetzner_api_token",
    "location": "nbg1",
    "server_type": "cpx",
    "blocked_servers": [],
    "ssh_keys": [],
    "configure_mode": true,
    "server_port": 22,
    "upscaling_at_percent_capacity": 80
  },
  "firewall_rules": [],
  "haproxy": {
    "config_path": "/etc/haproxy/haproxy.cfg",
    "entry_addition": "send-proxy"
  },
  "max_online_players": 100
}
```

### Now we will explain step by step what each setting is responsible for and how you can edit them correctly.

### Communication

* **Hostname:** This setting must correspond to the IP address of your master server. This setting does not take effect in real-time, as it is security-related and is fully applied only when the master instance is started.
* **Port:** That is the port for the internal communication of the cloud. This setting does not take effect in real-time, as it is security-related and is also fully applied only when the master instance is started.

### Hetzner

* **API Token:** The API key of your Hetzner Console account. You can obtain this [here](https://docs.hetzner.com/cloud/api/getting-started/generating-api-token/).
* **Configure Mode:** With this setting, you can enable or disable the configuration mode. When active, no Hetzner servers will be ordered. This mode is used for initial configuration or testing purposes.
* **Location:** Sets the location of your Hetzner servers. You can find all locations [here](https://docs.hetzner.com/cloud/general/locations/).
* **Server Type:** Determines the server types used in the system. An overview of all server types can be found [here](https://docs.hetzner.com/de/cloud/servers/overview/). You only need to enter the prefix there, e.g., `cpx` or `cx`.
* **Upscaling At Percent Capacity**: With this value, you can determine at what percentage of the total RAM usage of all nodes, a new cloud server should be ordered.
* **Server Port**: Sets the SSH port which is selected when the node is created.
* **Blocked servers:** With this, you can block Hetzner servers to prevent them from being ordered. This could be useful if, for example, you want to skip small servers because they have too little performance.

```json
"blocked_servers": [
      "cpx11",
      "cpx21"
]
```

* **SSH Keys:** Enter the names of your license keys that you have uploaded/created in your Hetzner project.

```json
"ssh_keys": [
    "your_ssh_key"
]
```

* **HAProxy Config Path:** The default path to your HAProxy server config. In most cases, this path is correct by default. However, you should still verify it.
* **Maximum Online Players:** Sets the limit of the maximum online players. The Wale plugin manages this value. When the server reaches the limit, a custom event is called. We will show you how to handle this [here](../api-documentation/events).
* **Firewall Rules:** Enter your own firewall rules if necessary. They must adhere to this format:

```json
"firewall_rules": [
    {
      "port": "22",
      "protocol": "tcp"
    },
    {
      "port": "33",
      "source_ips": [
        "123.123.12.123/32"
      ]
    },
      "source_ips": [
        "124.124.12.124/32"
      ]
    }
  ]
```

### If you have further questions about the configuration, you can contact us via [ticket support](https://walecloud.com/dashboard).
