Skip to content

Commit 7656346

Browse files
authored
Merge pull request #726 from ethersphere/install-reorg
fix configuration page
2 parents c41e03a + 951173a commit 7656346

File tree

1 file changed

+68
-9
lines changed

1 file changed

+68
-9
lines changed

docs/bee/working-with-bee/configuration.md

Lines changed: 68 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,6 @@ Bee nodes can be configured using command-line flags, environment variables, or
427427
</Tabs>
428428
429429
430-
431-
432430
## Default Data and Config Directories
433431
434432
Depending on the operating system and startup method used, the default directories for your node will differ:
@@ -496,26 +494,87 @@ The default directories for your system may differ from the example above, so ma
496494
497495
## Create Password
498496
499-
A `password` option is also required for all modes, and can either be set directly as a configuration option or alternatively a file can be used by setting the `password-file` option to the path where your password file is located.
497+
A password is required for all modes, and can either be set directly in text through the `password` configuration option or alternatively a file can be used by setting the `password-file` option to the path where your password file is located.
500498
499+
## Setting Blockchain RPC endpoint
501500
501+
Full and light Bee nodes require a Gnosis Chain RPC endpoint so they can interact with and deploy their chequebook contract, see the latest view of the current postage stamp batches, and interact with and top-up postage stamp batches. A blockchain RPC endpoint is not required for nodes running in ultra-light mode.
502+
We recommend you [run your own Gnosis Chain node](https://docs.gnosischain.com/node/) if you are planning to run a full node, and especially if you plan to run a [hive of nodes](/docs/bee/installation/hive).
503+
If you do not wish to run your own Gnosis Chain node and are willing to trust a third party, you may also consider using an RPC endpoint provider such as [GetBlock](https://getblock.io/).
504+
For running a light node or for testing out a single full node you may also consider using one of the [free public RPC endpoints](https://docs.gnosischain.com/tools/RPC%20Providers/) listed in the Gnosis Chain documentation. However, these endpoint providers offer no [SLA](https://en.wikipedia.org/wiki/Service-level_agreement) or availability guarantees and are therefore not recommended for full node operators.
505+
To set your RPC endpoint provider, specify it with the `blockchain-rpc-endpoint` value, which is set to an empty string by default.
502506
503-
## Sepolia Testnet Configuration
507+
```yaml
508+
## bee.yaml
509+
blockchain-rpc-endpoint: https://rpc.gnosis.gateway.fm
510+
```
511+
512+
:::info
513+
The gateway.fm RPC endpoint in the example is great for learning how to set up Bee, but for the sake of security and reliability it's recommended that you run your [run your own Gnosis Chain node](https://docs.gnosischain.com/node/) rather than relying on a third party provider.
514+
:::
515+
516+
## Configuring Swap Initial Deposit (Optional)
504517
505-
Connecting to the Swarm testnet is as simple as adding the flag `--mainnet false` to your bee commandline, or `mainnet: false` to your configuration file. Swarm testnet smart contracts are deployed on Sepolia, so if you want to run a light or full node you will need to add a Sepolia RPC to your configuration and fund your node with Sepolia ETH. There are many public faucets you can use to obtain Sepolia ETH, such as [this one from Infura](https://www.infura.io/faucet/sepolia).
518+
When running your Bee node with SWAP enabled for the first time, your node will deploy a 'chequebook' contract using the canonical factory contract which is deployed by Swarm. Once the chequebook is deployed, Bee will (optionally) deposit a certain amount of xBZZ in the chequebook contract so that it can pay other nodes in return for their services. The amount of xBZZ transferred to the chequebook is set by the `swap-initial-deposit` configuration setting (it may be left at the default value of zero or commented out).
506519
507-
To get Sepolia BZZ (sBZZ) you can use [this Uniswap market](https://app.uniswap.org/swap?outputCurrency=0x543dDb01Ba47acB11de34891cD86B675F04840db&inputCurrency=ETH); just make sure that you've switched to the Sepolia network in your browser wallet.
520+
## Configuring Swap Initial Deposit (Optional)
521+
522+
When running your Bee node with SWAP enabled for the first time, your node will deploy a 'chequebook' contract using the canonical factory contract which is deployed by Swarm. Once the chequebook is deployed, Bee will (optionally) deposit a certain amount of xBZZ in the chequebook contract so that it can pay other nodes in return for their services. The amount of xBZZ transferred to the chequebook is set by the `swap-initial-deposit` configuration setting (it may be left at the default value of zero or commented out).
523+
524+
## NAT address
525+
526+
Swarm is all about sharing and storing chunks of data. To enable other Bees (also known as _peers_) to connect to your Bee, you must
527+
broadcast your public IP address in order to ensure that Bee is reachable on the correct p2p port (default `1634`). We recommend that you [manually configure your external IP and check
528+
connectivity](/docs/bee/installation/connectivity) to ensure your Bee is able to receive connections from other peers.
529+
530+
First, determine your public IP address:
531+
532+
```bash
533+
curl icanhazip.com
534+
```
535+
536+
```bash
537+
123.123.123.123
538+
```
539+
540+
Then configure your node, including your p2p port (default 1634).
541+
542+
```yaml
543+
## bee.yaml
544+
nat-addr: "123.123.123.123:1634"
545+
```
546+
547+
## ENS Resolution (Optional)
548+
549+
The [ENS](https://ens.domains/) domain resolution system is used to host websites on Bee, and in order to use this your Bee must be connected to a mainnet Ethereum blockchain node. We recommend you run your own ethereum node. An option for resource restricted devices is geth+nimbus and a guide can be found [here](https://ethereum-on-arm-documentation.readthedocs.io/en/latest/). Other options include [dappnode](https://dappnode.io/), [nicenode](https://www.nicenode.xyz/), [stereum](https://stereum.net/) and [avado](https://ava.do/).
550+
551+
If you do not wish to run your own Ethereum node, you may use a blockchain RPC service provider such as [Infura](https://infura.io). After signing up for Infura, simply set your `--resolver-options` to `https://mainnet.infura.io/v3/your-api-key`.
552+
553+
```yaml
554+
## bee.yaml
555+
resolver-options: ["https://mainnet.infura.io/v3/<<your-api-key>>"]
556+
```
557+
558+
## Sepolia Testnet Configuration
559+
560+
In order to operate a Bee node on the Sepolia testnet, you need to change `mainnet` to `false`, and provide a valid Sepolia testnet RPC endpoint through the `blockchain-rpc-endpoint` option.
508561
509562
Here is an example of a full configuration for a testnet full node:
510563
511564
```yaml
512-
data-dir: /home/username/bee/sepolia
565+
data-dir: /home/username/bee/sepolia # Specified an alternate "data-dir" for our testnet node data
513566
full-node: true
514-
mainnet: false
567+
mainnet: false # Changed to "false"
515568
password: password
516-
blockchain-rpc-endpoint: wss://sepolia.infura.io/ws/v3/<API-KEY>
569+
blockchain-rpc-endpoint: wss://sepolia.infura.io/ws/v3/<API-KEY> # Replaced the Gnosis Chain RPC with a Sepolia testnet RPC endpoint
517570
swap-enable: true
518571
verbosity: 5
519572
welcome-message: "welcome-from-the-hive"
520573
warmup-time: 30s
521574
```
575+
576+
### Funding Testnet Node
577+
578+
Make sure to fund your node with Sepolia ETH rather than xDAI to pay for gas on the Sepolia testnet. There are many public faucets you can use to obtain Sepolia ETH, such as [this one from Infura](https://www.infura.io/faucet/sepolia).
579+
580+
To get Sepolia BZZ (sBZZ) you can use [this Uniswap market](https://app.uniswap.org/swap?outputCurrency=0x543dDb01Ba47acB11de34891cD86B675F04840db&inputCurrency=ETH), just make sure that you've switched to the Sepolia network in your browser wallet.

0 commit comments

Comments
 (0)