# Installation

Flopsar is installed in two parts: the **server** (which also serves the Workstation web application) and the **agents** (attached to your JVM applications). This chapter walks through both, plus the step that ties them together — issuing an agent token.&#x20;

Before you begin, make sure that:

* you have a 64-bit GNU/Linux host for the server, with a few gigabytes of free disk space for the collected data;
* your network allows TCP connections from your application hosts to the server.

## Installation Order

The order of the steps matters. Install Flopsar in the following sequence:

1. **Install the server.** Set up the Flopsar server, accept the EULA, and start the service. See [Server](/7/administrator-guide/installation/server.md).
2. **Create an agent token.** For each application you want to monitor, generate an agent token (a pre-shared key) on the server. See Agent Tokens.
3. **Install the agents.** Attach the agent to each JVM, configuring it with the application name, the server address, and the token from the previous step. See Agent.

{% hint style="warning" %}
You must complete these steps **in order**. An agent will only connect once the server is running and the agent is configured with a valid token for its application. If you start an agent before the server exists or without a matching token, the agent cannot authenticate — and the instance will **not appear** in the Workstation. Always install the server and create the agent token first, then install the agents.
{% endhint %}

## What Gets Installed

* **Server** — a single binary with an embedded HTTP server that serves the REST API and the Workstation. It listens for agent connections, stores the collected data, and enforces licensing. See Server.
* **Agent** — a native library loaded into each monitored JVM. It connects to the server, applies the instrumentation profile it receives, and streams telemetry back. See Agent.

{% hint style="info" %}
The Workstation web application is built into the server in Flopsar 7 — there is no separate Workstation package to install for the standard, standalone deployment.
{% endhint %}

### Server Configuration

The server stores its [configuration](/7/administrator-guide/server.md#configuration) globally in `/etc/flopsar/settings.yml` file. You must edit this file to make at least two changes. The first one is required and you must accept the [EULA](https://cdn.flopsar.com/#/eula) by setting option `eula: true` otherwise, you will not be able to run the server. The second one is to set the `data` option, which points to you environment directory.

{% hint style="info" %}
This new environment will be created with some default settings. Adjust these settings to your needs accordingly. Please, refer to the [server configuration](/7/administrator-guide/server.md#configuration) for more details.
{% endhint %}

### Running the Server

Finally, you can start the server by executing the following command:

```shell-session
# systemctl start flopsar
```

If you installed the workstation application bundled with the Flopsar Server, then you can access the application at the address specified at the [server configuration](/7/administrator-guide/server.md#ui). If you installed the workstation application outside the Flopsar server, you can access it at the address specified in your web server configuration. In either case, you should be able to access the workstation application login page at the address: `https://<YOUR_IP>:9443`

<figure><img src="/files/4wvglTENz3dFJyMTePAi" alt=""><figcaption><p>Workstation Login Page</p></figcaption></figure>

{% hint style="info" %}
Default credentials are: `admin/flopsar`
{% endhint %}

### Docker Image

Alternatively, you can use a Docker image which has preinstalled the server along with the workstation.  All you need to do is pull the image.&#x20;

```shell-session
$ docker pull flopsar/server:6.2
```

#### Quick start

Next, run the server by executing the following command:

```shell-session
$ docker run -d -p 9443:9443 -p 9000:9000 -p 4137:4137 -p 4138:4138 flopsar/server:6.2
```

or if you use `podman`:

```shell-session
$ podman run -d -p 9443:9443 -p 9000:9000 docker.io/flopsar/server:6.2
```

{% hint style="info" %}
Please note, if the server is run in this way, the EULA is accepted automatically.
{% endhint %}

#### External storage

Alternatively, if you want to store the Flopsar data outside the container execute the following command:

```shell-session
$ docker run -d --name flopsar -p 9443:9443 -p 9000:9000 -p 4137:4137 -p 4138:4138 \\
    -v /your/directory:/opt/flopsar flopsar/server:6.2
```

{% hint style="info" %}
The Flopsar server is run by `flopsar` user (`uid=999`), so make sure they have write access to `/your/directory`.
{% endhint %}

### Quick Sample Installation

This section presents a sample, quick installation of the Flopsar server. First download the installation package along with the workstation application. Next, execute the following command:

```shell-session
$ sudo dpkg -i flopsar-server.amd64.deb
```

or if you use `rpm` package:

```shell-session
$ sudo rpm -i flopsar-server.x86_64.rpm
```

Next, let's create a new Flopsar environment at `/opt` directory:

```shell-session
$ sudo flopsar-server create --app flopsar-workstation.zip /opt/flopsar
```

If the environment has been created successfully, the following output should be displayed:

<pre><code><strong> Creating a new Flopsar Server environment...
</strong> Unpacking Flopsar Workstation application...
 Flopsar Server environment created successfully.
</code></pre>

Next, change the ownership of the environment directory to `flopsar` user:

```shell-session
$ sudo chown -R flopsar /opt/flopsar
```

Next, open the `/etc/flopsar/settings.yml` file:

{% code lineNumbers="true" %}

```yaml
eula: false
name: my environment
data: /change/me
max_ext_size: 1MiB
agent:
  server_ip: 0.0.0.0
  server_port: 9000
ui_srv:
  server_ip: 0.0.0.0
  server_port: 9443
  ssl: false
otlp:
  enable: true
  http:  
    server_ip: 0.0.0.0
    server_port: 4318
  grpc:
    server_ip: 0.0.0.0
    server_port: 4317
    ssl: false
ssl:
  cert: server.crt
  key: server.pem
logger:
  backend: Local
  max_size: 50MiB
  max_files: 5
archive:
  enable: false
  policy: purge
  start_at: 03:00:00.0
  retention: 3days
pass_policy:
  enable: false 
  min_len: 8
  digits: false 
  special_chars: false
  capital_letters: false
  forbidden_chars: ''
```

{% endcode %}

and make changes in both `eula` and `data` options (line 1 and 3):

{% code lineNumbers="true" %}

```yaml
eula: true
name: my environment
data: /opt/flopsar
max_ext_size: 1MiB
agent:
  server_ip: 0.0.0.0
  server_port: 9000
ui_srv:
  server_ip: 0.0.0.0
  server_port: 9443
  ssl: false
otlp:
  enable: true
  http:  
    server_ip: 0.0.0.0
    server_port: 4318
  grpc:
    server_ip: 0.0.0.0
    server_port: 4317
    ssl: false
ssl:
  cert: server.crt
  key: server.pem
logger:
  backend: Local
  max_size: 50MiB
  max_files: 5
archive:
  enable: false
  policy: purge
  start_at: 03:00:00.0
  retention: 3days
pass_policy:
  enable: false 
  min_len: 8
  digits: false 
  special_chars: false
  capital_letters: false
  forbidden_chars: ''
```

{% endcode %}

And finally, start the server:

```shell-session
$ sudo systemctl start flopsar
```

Now, you should be able to access the workstation application at [https://localhost:9443](https://localhost:9443/)

## Agent

To install the Flopsar agent, follow carefully the instructions below:

1. select the agent library file for your platform and architecture.
2. copy the agent library to your server machine.
3. configure the agent.
4. restart your application.

## OpenTelemetry Agents

To install OpenTelemetry agents, please refer to [OpenTelemetry documentation](https://opentelemetry.io/docs/getting-started/ops/) and the [server section](/7/administrator-guide/server.md#opentelemetry).


---

# 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.flopsar.com/7/administrator-guide/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.
