# Linux Package Configuration

The Bindplane OTEL Collector Linux packages can be configured before installation. This configuration is optional. Users with advanced requirements can use this configuration to customize the installation behavior.

### Configuration File Location

Before installing the Bindplane OTEL Collector package, you can create a configuration file at one of the following locations:

* Debian-based distributions: `/etc/default/observiq-otel-collector`
* RHEL-based distributions: `/etc/sysconfig/observiq-otel-collector`

The package supports either file location on all platforms. Choose the location that best matches your distribution's conventions.

{% hint style="warning" %}
**IMPORTANT**

The configuration file must be created and configured **before** the initial package installation. Modifying the configuration file after installation may lead to undefined behavior.
{% endhint %}

### File Permissions

The configuration file should have the following permissions:

* Owner: `root`
* Group: `root`
* Permissions: `0644` (readable by all users, writable only by root)

The configuration file is read by your package manager during package installation, upgrade, and removal operations. It is also read by the collector's updater during updates pushed by Bindplane. This means unprivileged users require read access to the configuration file.

### Configuration Options

#### BDOT\_SKIP\_RUNTIME\_USER\_CREATION

Controls whether the package creates the `bdot` user and group during installation. This option is useful if you have advanced user requirements, such as specific uid and gid or you are integrating with an external authentication system such as LDAP.

{% hint style="info" %}
**NOTE**

This configuration option is supported as of collector version v1.82.0.
{% endhint %}

* **Default**: `false`
* **Values**: `true` or `false`

When set to `true`, the package will skip creating the `bdot` user and group. In this case, you must create the user and group manually before installation.

The following commands create the `bdot` user and group:

```bash
groupadd bdot
useradd \
  --shell /sbin/nologin \
  --system bdot \
  -g bdot
```

You can verify this parameter is working correctly by inspecting the output from the package installation.

The following is logged when skipping user and group creation:

> BDOT\_SKIP\_RUNTIME\_USER\_CREATION is set to true, skipping user and group creation

#### BDOT\_CONFIG\_HOME

Specifies the directory where the Bindplane OTEL Collector is installed and stores its data.

{% hint style="info" %}
**NOTE**

This configuration option is supported as of collector version v1.82.0.
{% endhint %}

* **Default**: `/opt/observiq-otel-collector`
* **Values**: Any valid directory path

This directory contains:

* Collector binaries and executables
* Configuration files
* Log files
* Other persistent data required by the collector

Choose a location that meets your storage and backup requirements before installation.

You can verify this parameter is working correctly by checking the installation directory and the Systemd service file for the Bindplane OTEL Collector service.

Read the Systemd service file for the Bindplane OTEL Collector service:

```bash
sudo systemctl cat observiq-otel-collector
```

The output will contain the working directory and executable path matching the value you set in the configuration file.

```ini
[Unit]
Description=observIQ's distribution of the OpenTelemetry collector
After=network.target
StartLimitIntervalSec=120
StartLimitBurst=5

[Service]
Type=simple
User=root
Group=${username}
Environment=PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
Environment=OIQ_OTEL_COLLECTOR_HOME=/opt/observiq-otel-collector
Environment=OIQ_OTEL_COLLECTOR_STORAGE=/opt/observiq-otel-collector/storage
WorkingDirectory=/opt/observiq-otel-collector
ExecStart=/opt/observiq-otel-collector/observiq-otel-collector --config config.yaml
LimitNOFILE=65000
SuccessExitStatus=0
TimeoutSec=20
StandardOutput=journal
Restart=on-failure
RestartSec=5s
KillMode=process

[Install]
WantedBy=multi-user.target
```

#### BDOT\_UNPRIVILEGED

Controls whether the Bindplane OTEL Collector runs as an unprivileged user instead of root.

{% hint style="info" %}
**NOTE**

This configuration option is supported as of collector version v1.82.0.
{% endhint %}

* **Default**: `false`
* **Values**: `true` or `false`

When set to `true`, the collector will be configured to run as the `bdot` user instead of `root`. This provides better security by following the principle of least privilege.

When set to `false`, the collector will run as `root`, which may be necessary for collecting certain system-level metrics or accessing privileged ports.

{% hint style="info" %}
**NOTE**

The `bdot` user and group are always created during installation unless `BDOT_SKIP_RUNTIME_USER_CREATION=true` is set, regardless of the `BDOT_UNPRIVILEGED` value.
{% endhint %}

{% hint style="warning" %}
**IMPORTANT**

When `BDOT_UNPRIVILEGED=true` is set, the package creates a systemd override file. The main unit file will still show `User=root`, but an override at `/etc/systemd/system/observiq-otel-collector.service.d/10-package-customizations-username.conf` will configure the service to run as the `bdot` user.
{% endhint %}

You can verify this parameter is working correctly by checking the runtime user of the Bindplane OTEL Collector process.

Check the runtime user of the collector process:

```bash
ps aux | grep observiq-otel-collector
```

The output will show the process running as the `bdot` user when unprivileged mode is enabled.

#### BDOT\_USER and BDOT\_GROUP

Controls the runtime user and group. Usually used in conjunction with `BDOT_UNPRIVILEGED`.

{% hint style="info" %}
**NOTE**

This configuration option is supported as of collector version v1.84.0.
{% endhint %}

### Example Configuration

Here's an example configuration file:

```ini
# Skip user creation for LDAP integration
# Systemd administrator must pre-configure
# the user.
BDOT_SKIP_RUNTIME_USER_CREATION=true

# Install collector in a custom location
BDOT_CONFIG_HOME=/opt/custom-collector

# Run collector as unprivileged user
BDOT_UNPRIVILEGED=true

# Run collector as user "otelu" and group "otelg"
BDOT_USER=otelu
BDOT_GROUP=otelg
```


---

# 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.bindplane.com/configuration/bindplane-otel-collector/linux-package-configuration.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.
