<a id="startup-configuration"></a>

# Startup configuration

This is the non-reloadable part of the configuration.
*halon-policyd* loads the non-reloadable configuration from `/etc/halon/policyd.yaml`.

It is described by, and can be validated with, the
[policyd.schema.json](http://lbovet.github.io/docson/index.html#https://docs.halon.io/json-schemas/policyd/1.1/policyd.schema.json).

<a id="api-listener"></a>

<a id="listener-directives"></a>

## Listener directives

This listener is used to receive requests from applications such as the [Halon web UI](https://docs.halon.io/web/).

<a id="confval-listeners-.port"></a>

### listeners[].port

Which TCP port to listen on. **Required**

<a id="confval-listeners-.address"></a>

### listeners[].address

IPv4 or IPv6 address to listen on.
The default is to listen to all IPv4 and IPv6 addresses.

<a id="confval-listeners-.pki"></a>

### listeners[].pki

The X.509 certificate and private key to use for transport security.
The private key and certificate should have either a `path` or `data` property.

```yaml
pki:
  certificate:
    data: |-
      -----BEGIN CERTIFICATE-----
      ...
  privatekey:
    data: |-
      -----BEGIN PRIVATE KEY-----
      ...
```

<a id="confval-listeners-.pki.certificate"></a>

### listeners[].pki.certificate

The X.509 certificate to use for transport security.
The public certificate should have either a `path` or `data` property.

<a id="confval-listeners-.pki.privatekey"></a>

### listeners[].pki.privatekey

The X.509 private key to use for transport security.
The private key should have either a `path` or `data` property.

<a id="websocket"></a>

<a id="websocket-directives"></a>

## WebSocket directives

This listener is used to to communicate with the [smtpd](https://docs.halon.io/manual/) instances.

<a id="confval-websocket.listener.port"></a>

### websocket.listener.port

Which TCP port to listen on. **Required**

<a id="confval-websocket.listener.address"></a>

### websocket.listener.address

IPv4 or IPv6 address to listen on.
The default is to listen to all IPv4 and IPv6 addresses.

<a id="confval-websocket.listener.pki"></a>

### websocket.listener.pki

The X.509 certificate and private key to use for transport security.
The private key and certificate should have either a `path` or `data` property.

```yaml
pki:
  certificate:
    data: |-
      -----BEGIN CERTIFICATE-----
      ...
  privatekey:
    data: |-
      -----BEGIN PRIVATE KEY-----
      ...
```

<a id="confval-websocket.listener.pki.certificate"></a>

### websocket.listener.pki.certificate

The X.509 certificate to use for transport security.
The public certificate should have either a `path` or `data` property.

<a id="confval-websocket.listener.pki.privatekey"></a>

### websocket.listener.pki.privatekey

The X.509 private key to use for transport security.
The private key should have either a `path` or `data` property.

<a id="elasticsearch-directives"></a>

## Elasticsearch directives

<a id="confval-elasticsearch"></a>

### elasticsearch

The settings for Elasticsearch. **Required**

<a id="confval-elasticsearch.index.actions"></a>

### elasticsearch.index.actions

The index for storing action events. **Required**

<a id="confval-elasticsearch.nodes"></a>

### elasticsearch.nodes[]

A list of Elasticsearch nodes. **Required**

<a id="confval-elasticsearch.nodes-.url"></a>

### elasticsearch.nodes[].url

The Elasticsearch URL to connect to. **Required**

<a id="confval-elasticsearch.auth"></a>

### elasticsearch.auth

Specify any credentials for authentication.

<a id="confval-elasticsearch.auth.username"></a>

### elasticsearch.auth.username

The username for basic authentication.

<a id="confval-elasticsearch.auth.password"></a>

### elasticsearch.auth.password

The password for basic authentication.

<a id="confval-elasticsearch.tls.verify"></a>

### elasticsearch.tls.verify

If the server certificate should be verified. The default is **true**.
