# Configuring lws for selfdns.org usage

## CMake options

```
$ cmake .. -DLWS_WITH_JOSE=1 -DLWS_WITH_GENCRYPTO=1 -DLWS_WITH_DHT=1 -DLWS_WITH_SYS_ASYNC_DNS=1 -DLWS_WITH_SYS_ASYNC_DNS_DNSSEC=1 -DLWS_WITH_AUTHORITATIVE_DNS=1 -DLWS_WITH_LWSWS=1
```

## Global Policy Configuration

lws now uses a common, top-level JSON policy file located at `/etc/lwsws/policy`. It provides a centralized place to define basic node configuration, such as where dnssec keys reside, and a list of root DHT nodes to join the network.

During installation (`make install`), this file is automatically generated if it does not already exist.

```json
{
    "dns_base_dir": "/etc/dnssec",
    "seeds": [ "selfdns.org", "uk1.selfdns.org", "asia1.selfdns.org" ]
}
```

The server components utilizing DHT (like `lws-minimal-raw-dht-zone-client` or `lwsws`) will automatically read this policy and randomize their initial connection across the available seed nodes.
