# Running & Administration

### Starting the Server

Once your configuration file is ready, you can start the Floating Server in one of the following ways:

#### Method 1: Executable

If you are using the executable, run the binary matching your operating system:

```bash
./floating-server
```

#### Method 2: Docker

{% stepper %}
{% step %}

### Pull the image

```bash
docker pull licensespring/floating-server-v2:v2.4.0
```

{% endstep %}

{% step %}

### Set up PostgreSQL

* Start a PostgreSQL instance (local or containerized).
* Note the `host`, `port`, `username`, `password`, and `database` name.
* Update your configuration file with these details.
  {% endstep %}

{% step %}

### Prepare configuration and certificates

* Place the configuration file in a local directory.
* Place certificates in another directory.
  {% endstep %}

{% step %}

### Run the container

Mount both the configuration and certificate directories so that the container has access:

```bash
docker run -d  \
--name fsv2 \
--network fsnet \
-v /path/to/config:/app/config \
-v /path/to/certs:/app/certs \
-p 8080:8080 \
licensespring/floating-server-v2:v2.4.0
```

{% endstep %}

{% step %}

### Notes

* Replace `/path/to/config` with your config directory.
* Replace `/path/to/certs` with your certificates directory.
* Adjust `-p` if exposing on a different port.
  {% endstep %}
  {% endstepper %}

{% hint style="success" %}

* **Replace** /path/to/config with your config directory.
* **Replace** /path/to/certs with your certificates directory.
* **Adjust** `-p` if exposing on a different port.
  {% endhint %}

#### Method 3: Docker Compose

A prebuilt `docker-compose.yml` is included in the documentation. Running it sets up both PostgreSQL and the Floating Server in one step:

```bash
docker-compose up -d
```

This is the fastest way to get everything running.

### First-Time Admin Setup

When the server starts for the first time, no users or admins exist. You must set the initial **admin password**.

{% hint style="info" %}

* Default username: **admin**
* **Password:** defined during setup.
  {% endhint %}

#### Setting the Password

You can set it via:

{% stepper %}
{% step %}

### UI

Navigate to the Floating Server’s URL. You’ll be redirected to the password setup page.

![Running the Floating Server for the first time: Setting initial Admin Password](/files/0bffd714d51060eec800dc88b08e094375af4819)
{% endstep %}

{% step %}

### API

Call the endpoint:

```http
POST /api/v5/auth/initial-password
```

{% endstep %}
{% endstepper %}

**Request body:**

```json
{
  "password": "string"
}
```

**Responses:**

| Code  | Description                                    |
| ----- | ---------------------------------------------- |
| `200` | Password set successfully  returns a JWT token |
| `400` | Invalid input                                  |
| `401` | Authentication failed                          |

#### Logging In

Once the initial password is set:

* Log in using `admin` and your chosen password.
* You will then access the Floating Server admin panel.

![Image of the Floating Server Running](/files/fa9612a46a8adb2d9986de2537669844d0d1965f)

* From here, you can create additional user accounts.

{% hint style="info" %}
After starting the server:

* **Executable:** A log file is generated automatically.
* **Docker:** Use `docker logs` to view server output.
  {% 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.licensespring.com/floating-server/floating-server-v2/running-and-administration.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.
