> For the complete documentation index, see [llms.txt](https://docs.flopsar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flopsar.com/7/administrator-guide/server.md).

# Server

The server collects data from agents, stores it, enforces licensing, and serves the REST API and the Workstation from the same HTTPS endpoint. It can also ingest OpenTelemetry traces over OTLP.

Package installation, EULA acceptance, and first sign-in are covered in [Installation → Server](/7/administrator-guide/installation/server.md). Every configuration option is documented in the [Server Configuration Reference](/7/administrator-guide/configuration/server-configuration-reference.md).

## CLI

List all commands:

```shell-session
$ flopsar-server --help
```

Common operations:

| Command                                                   | Purpose                                                          |
| --------------------------------------------------------- | ---------------------------------------------------------------- |
| `flopsar-server create <home>`                            | Create an empty environment directory                            |
| `flopsar-server create --archive ARCHIVE.zip <home>`      | Restore an environment from an archive                           |
| `flopsar-server start`                                    | Start the server (reads `/etc/flopsar/settings.toml` by default) |
| `flopsar-server local <home>`                             | Start in local mode for inspecting a restored archive            |
| `flopsar-server config <dir>`                             | Write a default `settings.toml`                                  |
| `flopsar-server gencerts <dir>`                           | Generate a self-signed TLS certificate and key                   |
| `flopsar-server genmkey --path <dir>`                     | Generate a 256-bit master key                                    |
| `flopsar-server users --reset <username> <home>`          | Reset a local user's password to `flopsar`                       |
| `flopsar-server audit --path <file>`                      | Verify the security audit log                                    |
| `flopsar-server info <home>`                              | Print storage information                                        |
| `flopsar-server index <home>`                             | Index stored calls                                               |
| `flopsar-server storage --info <dir>`                     | Print storage information for a database directory               |
| `flopsar-server storage --apps <dir>`                     | List applications in storage                                     |
| `flopsar-server storage --remove-app <name> --path <dir>` | Remove one application's stored data                             |

## OpenTelemetry

Flopsar accepts OTLP traces (not metrics or logs) and stores them alongside native agent data. Enable and bind the receivers in the `[otlp]` section of `settings.toml`. A license that includes OpenTelemetry is required.

### Collector

Add an OTLP exporter that points at the Flopsar OTLP endpoint:

```yaml
exporters:
  otlp/flopsar:
    endpoint: "<FLOPSAR_OTLP_GRPC_ENDPOINT>"
    tls:
      insecure: true

service:
  pipelines:
    traces:
      exporters: [otlp/flopsar]
```

Prefer TLS on OTLP/gRPC (`[otlp.grpc].ssl = true`) whenever telemetry leaves a trusted segment.

### No collector

Send traces directly from the application process:

```sh
java -javaagent:path/to/opentelemetry-javaagent.jar \
     -Dotel.service.name=<APP_NAME> \
     -Dotel.exporter.otlp.endpoint=http://<OTLP.HTTP.SERVER_IP>:<OTLP.HTTP.SERVER_PORT> \
     -Dotel.metrics.exporter=none \
     -Dotel.logs.exporter=none
```

Use the bind address and port from `[otlp.http]` in `settings.toml`. See also [OpenTelemetry](/7/user-guide/opentelemetry.md).

## Storage

Flopsar uses a hybrid store: a custom engine for recorded invocations and an SQL database for configuration.

### Data archiving

When archiving is enabled in `[archive]`, a daily job runs at `start_at`. Policy `purge` drops data older than `retention`. Policy `archive` compresses that data into `<server_home>/arch` (invocations, key-value data, and symbols).

### Restoring an archive

```shell-session
$ flopsar-server create --archive ARCHIVE.zip <TARGET_DIR>
$ flopsar-server local <TARGET_DIR>
```

Local mode is for inspecting archived data. Open the Workstation at `https://localhost:9443`. Listing and deleting files on a running server is done in [Archives](/7/administrator-guide/server/archives.md).
