From 2eef37c05d3101c23d5ff0d744f1dc5f8dd69709 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 28 Sep 2021 18:42:32 -0300 Subject: [PATCH 1/2] DHT bootstrap guide --- documents/resources/dht-bootstrap.md | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 documents/resources/dht-bootstrap.md diff --git a/documents/resources/dht-bootstrap.md b/documents/resources/dht-bootstrap.md new file mode 100644 index 0000000..f771856 --- /dev/null +++ b/documents/resources/dht-bootstrap.md @@ -0,0 +1,32 @@ +--- +title: Hosting a DHT bootstrap node +description: How to setup a bootstrap DHT node +--- + +This guide will help you setup and maintain a LBRY DHT [bootstrap node](https://en.wikipedia.org/wiki/Bootstrapping_node). Those nodes are important so people can join the network on first startup. + +After finishing and checking that it works, if you want to add your node to the SDK bootstrap list just open a PR adding yourself to the [conf file](https://github.com/lbryio/lbry-sdk/blob/master/lbry/conf.py#L694) or an issue on the [SDK repo](https://github.com/lbryio/lbry-sdk/). + +## Requirements +- Being reachable over UDP on the internet at some port +- 1GB of memory +- Docker or Python 3.7 (check [pyenv](https://github.com/pyenv/pyenv) if your Linux distribution doesn't offer that version) + +## Running directly from Docker +This is the easiest way to run and maintain your node. Just run: +```bash +docker run -d -p 4444:4444 lbry/dht-bootstrap:latest +``` + +## Installing LBRY SDK from source +The most up to date guide for doing it will always be in the [INSTALL.md file](https://github.com/lbryio/lbry-sdk/blob/master/INSTALL.md). Please refer to it if you run into trouble. Otherwise, this should be enough most of the time (assuming requirements are all there): +```bash +git clone https://github.com/lbryio/lbry-sdk.git +make install +``` + +### Running a node from source +After installing, just: +```bash +python scripts/dht_node.py +``` From b46edd2ba09063e46680534901208482d4fda8ca Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 28 Sep 2021 18:55:34 -0300 Subject: [PATCH 2/2] add section to check the node --- documents/resources/dht-bootstrap.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/documents/resources/dht-bootstrap.md b/documents/resources/dht-bootstrap.md index f771856..4b7afad 100644 --- a/documents/resources/dht-bootstrap.md +++ b/documents/resources/dht-bootstrap.md @@ -30,3 +30,10 @@ After installing, just: ```bash python scripts/dht_node.py ``` + +### Checking if it is working +From another machine with the SDK installed, run: +```bash +python scripts/dht_node.py --bootstrap_node your-server-domain-here.com:4444 +``` +After 10-20 seconds, you should see more than 0 peers on the log messages. If that is not the case, check firewall on the bootstrap node and see if it is reachable.