This guide provides detailed steps to bootstrap your your node using [Static Peers](/overview/concepts/static-peers) and discover peers in the Waku Network using [DNS Discovery](/overview/concepts/dns-discovery).
Until [node incentivisation](/overview/reference/research-in-progress#prevention-of-denial-of-service-dos-and-node-incentivisation) is in place, you should [operate extra nodes](/guides/nodes-and-sdks#run-a-waku-node) alongside the ones provided by the Waku Network. When running a node, we recommend using the [DNS Discovery and Static Peers](#configure-dns-discovery-and-static-peers) configuration to connect to both the Waku Network and your node.
The `@waku/sdk` package provides a built-in bootstrapping method that uses [DNS Discovery](/overview/concepts/dns-discovery) to locate peers from the `waku v2.prod``ENR` tree.
```js
import { createLightNode } from "@waku/sdk";
// Bootstrap node using the default bootstrap method
For example, consider a node that connects to two static peers on the same local host (IP: `0.0.0.0`) using TCP ports `60002` and `60003` with WebSocket enabled:
For local development using a `nwaku` node, use a `ws` address instead of `wss`. Remember that this setup is functional only when your web server is running locally.
For example, consider a node that uses the `waku v2.prod` and `waku v2.test``ENR` trees for `DNS Discovery`:
```js
import { enrTree } from "@waku/dns-discovery";
// Bootstrap node using DNS Discovery
const node = await createLightNode({
libp2p: {
peerDiscovery: [
wakuDnsDiscovery(
[enrTree["PROD"], enrTree["TEST"]],
NODE_REQUIREMENTS,
),
],
},
});
```
## Configure DNS Discovery and Static Peers
You can also bootstrap your node using [DNS Discovery](/overview/concepts/dns-discovery) and [Static Peers](/overview/concepts/static-peers) simultaneously:
```js
import { createLightNode } from "@waku/sdk";
import { bootstrap } from "@libp2p/bootstrap";
import { enrTree, wakuDnsDiscovery } from "@waku/dns-discovery";