# Overview & Installation

### What is the Floating Server V2?

The Floating Server is LicenseSpring’s self-hosted licensing platform, providing the core features of the cloud platform locally. Version 2 introduces improved setup, configuration, and management workflows to make deployment, provisioning, and administration easier. This document focuses on v2, detailing installation, configuration, and best practices for running the Floating Server in your environment.

#### Key Highlights & Compatibility

| Feature                  | Details                                                                      |
| ------------------------ | ---------------------------------------------------------------------------- |
| Supported Platforms      | Windows and Linux                                                            |
| Supported SDKs (initial) | C++, .NET, Java, Python, Go, node.js                                         |
| Database Support         | SQLite (dev/test), PostgreSQL (prod)-**Production Recommendation**PostgreSQL |
| Provisioning Options     | Certificates or YubiKey tokens                                               |

### Installation Options

{% stepper %}
{% step %}

### Native Executable (Recommended)

Download the appropriate binary:

* <https://s3.eu-central-1.amazonaws.com/floating-server/floating-server-linux-amd-2.3.3.zip>
* <https://s3.eu-central-1.amazonaws.com/floating-server/floating-server-windows-amd-2.3.3.zip>

Unzip and run directly, no Docker required.
{% endstep %}

{% step %}

### Docker Image

* Pull the image from Docker Hub.
* Run the container from the pulled image.

{% hint style="info" %}
The configuration file and provisioning steps are identical for both methods. The only difference with Docker is that you must mount the configuration and provisioning files so the container can access them.
{% endhint %}
{% endstep %}
{% endstepper %}

### Run Floating Server v2 with PostgreSQL and Docker

Create a shared network:

```bash
docker network create fsnet
```

Start PostgreSQL:

{% code title="Start Postgres" %}

```bash
docker run -d \
  --name fs-postgres \
  --network fsnet \
  -e POSTGRES_USER=fsuser \
  -e POSTGRES_PASSWORD=fspassword \
  -e POSTGRES_DB=fsdb \
  -v pgdata:/var/lib/postgresql/data \
  -p 5432:5432 \
  postgres:16
```

{% endcode %}

change the setting as needed.

Modify Floating Server config file:

{% code title="default.yaml" %}

```yaml
database:
  type: postgres
  host: fs-postgres
  port: 5432
  user: fsuser
  password: fspassword
  name: fsdb
  sslmode: "disable"
```

{% endcode %}

Pull the Floating Server v2 image:

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

### Run Floating Server v2

Mount the config file and the certs (certificates and private key generated in provisioning) folder from provisioning:

{% code title="Run Floating Server" %}

```bash
docker run -d \
  --name fsv2 \
  --network fsnet \
  -p 8080:8080 \
  -v "$(pwd)/config:/app/config:ro" \
  -v "$(pwd)/certs:/app/certs:ro" \
  licensespring/floating-server-v2:v2.3.3
```

{% endcode %}

In this sample, we have assumed the config file is located in `./config` and certificates and private key in `./certs`.

Verify

* Floating Server API: `http://localhost:8080`
* Postgres: available at `fs-postgres:5432` inside the Docker network

### Docker Compose

The steps mentioned above are all included in the following docker compose file. Place this file in the directory with folders `config` and `certs` (config containing `default.yaml` and certs containing all the certificates and private key generated in provisioning), and then run:

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

Make any needed adjustments.

{% code title="docker-compose.yaml" %}

```yaml
services:
  postgres:
    image: postgres:16
    container_name: fs-postgres
    environment:
      POSTGRES_USER: fsuser
      POSTGRES_PASSWORD: fspassword
      POSTGRES_DB: fsdb
    volumes:
      - pgdata:/var/lib/postgresql/data
    ports:
      - "5432:5432"
    networks:
      - fsnet
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-fsuser} -d ${POSTGRES_DB:-fsdb}"]
      interval: 5s
      timeout: 5s
      retries: 10
    restart: unless-stopped

  fsv2:
    image: licensespring/floating-server-v2:latest
    container_name: fsv2
    depends_on:
      postgres:
        condition: service_healthy
    ports:
      - "8080:8080"
    volumes:
      - ./config:/app/config:ro
      - ./certs:/app/certs:ro
    networks:
      - fsnet
    restart: unless-stopped

networks:
  fsnet:
    name: fsnet
    # If you've already created fsnet with `docker network create fsnet`,
    # uncomment the next line to reuse it instead of letting Compose create it:
    # external: true

volumes:
  pgdata:
```

{% endcode %}


---

# 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/overview-and-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.
