# Installation

{% hint style="warning" %}
Ensure that your server meets the requirements. Otherwise, errors may occur during the installation!
{% endhint %}

1. **First**, navigate to the Wale Cloud Dashboard and then to the Download tab. Download the bootstrap file for the master from there.
2. After that, install the **HAProxy service** on your server. This module is **essential** for using the cloud, as it manages the distribution to the individual Minecraft proxy servers through the HAProxy server and a round-robin mechanism.

#### You can use the following command or refer to other documentation to install HAProxy on your server.

{% tabs %}
{% tab title="Ubuntu" %}
{% code title="# Tested on Ubuntu 22.04" %}

```bash
sudo apt install haproxy
```

{% endcode %}
{% endtab %}

{% tab title="Debian" %}
{% code title="# Tested on Debian 12.4" %}

```bash
sudo apt install haproxy 
```

{% endcode %}
{% endtab %}
{% endtabs %}

You must configure the HAProxy. The default config file is located at `/etc/haproxy/haproxy.cfg`

{% hint style="warning" %}
**The haproxy config must be end with the same line like in the following example**
{% endhint %}

```
global
    log /dev/log local0
    log /dev/log local1 notice
    log /dev/log local1 notice
    chroot /var/lib/haproxy
    stats socket /run/haproxy/admin.sock mode 660 level admin
    stats timeout 30s
    user haproxy
    daemon

defaults
    log global
    mode tcp
    option tcplog
    option forwardfor header X-Real-IP
    option dontlognull
    timeout connect 5000
    timeout client 50000
    timeout server 50000

frontend minecraft_front
    bind *:25565
    mode tcp
    default_backend minecraft_servers

backend minecraft_servers
    mode tcp
    balance roundrobin
```

#### After installing the HAProxy service, you can proceed with the installation of the master.

3. Navigate to the dashboard *(Projects > Your Project)* and set the **hostname**, which is the IP address of your **master server**, in your project.
4. Afterward, **navigate** to the *'Configuration'* tab in the dashboard and set the **hostname**, once again the IP address of your **master server**, there.

{% hint style="warning" %}
**Configure the master directly before proceeding with the installation. A detailed explanation of all settings is provided** [**here**](/wale-documentation/master-configuration.md)**.**
{% endhint %}

5. Drag the master bootstrap file onto your server (choose any directory) and execute it. Use the following command. The **'--key' parameter is essential**. You will receive your license key from the dashboard *(Projects > Your Project > License Key)*.

```sh
java -jar bootstrap.jar --key your_license_key
```

{% hint style="info" %}
If your configuration is correct, the cloud will start without errors. You can then proceed with setting up your templates and other configurations. A detailed guide on setting up templates can be found [here](/wale-documentation/templates.md).
{% endhint %}


---

# 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://docs.walecloud.com/wale-documentation/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.
