|
| 1 | +# 🌐 DNS |
| 2 | + |
| 3 | +By default every dappnode package runs on the docker network `dncore_network` and uses default docker dns server for name resolution. During installation time, the package is assigned a unique domain name (apart from the ones set by default by docker: container name, service name, etc) that can be used to access the services running inside the package. This document aims to provide a comprehensive guide on how to access services running inside a package using the assigned domain name. |
| 4 | + |
| 5 | +## Multiservice packages |
| 6 | + |
| 7 | +In multi-services packages the name convention is: `<serviceName>.<shortDnpName>.dappnode` where `serviceName` is the name of the service running inside the package and `shortDnpName` is the name of the package. For example, if you have a package named `my-package` running a service named `my-service`, the domain name to access the service would be `my-service.my-package.dappnode`. |
| 8 | + |
| 9 | +:::info |
| 10 | +The short dnp name relies on the first part of the dnp name, which is the name of the package. For example, if the dnp name is `my-package.dnp.dappnode.eth`, the short dnp name would be `my-package`. |
| 11 | +::: |
| 12 | + |
| 13 | +**Example multiservioce:** [Prysm](https://github.com/dappnode/DAppNodePackage-prysm-generic) |
| 14 | + |
| 15 | +- Dnp name: `prysm.dnp.dappnode.eth` |
| 16 | +- Docker compose |
| 17 | + |
| 18 | +```yaml |
| 19 | +version: "3.5" |
| 20 | +services: |
| 21 | + beacon-chain: |
| 22 | + build: |
| 23 | + context: beacon-chain |
| 24 | + args: |
| 25 | + volumes: |
| 26 | + - beacon-chain-data:/data |
| 27 | + restart: unless-stopped |
| 28 | + environment: |
| 29 | + validator: |
| 30 | + build: |
| 31 | + context: validator |
| 32 | + args: |
| 33 | + restart: on-failure |
| 34 | + environment: |
| 35 | +volumes: |
| 36 | + beacon-chain-data: {} |
| 37 | + validator-data: {} |
| 38 | +``` |
| 39 | +
|
| 40 | +Aliases will be: |
| 41 | +
|
| 42 | +- beacon-chain service: `beacon-chain.prysm.dnp.dappnode` |
| 43 | +- validator service: `validator.prysm.dnp.dappnode` |
| 44 | + |
| 45 | +## Monoservice packages |
| 46 | + |
| 47 | +In mono-services packages the domain name is the same as the package name. For example, if you have a package named `my-package`, the domain name to access the service would be `my-package.dappnode`. It also follows the same convention as the multi-service packages. For example, if you have a package named `my-package` running only one service named `my-service`, the domain name to access the service would be `my-service.my-package.dappnode` or `my-package.dappnode`. |
| 48 | + |
| 49 | +**Example monoservice:** [Geth](https://github.com/dappnode/DAppNodePackage-geth-generic) |
| 50 | + |
| 51 | +- Dnp name: `geth.dnp.dappnode.eth` |
| 52 | +- Docker compose |
| 53 | + |
| 54 | +```yaml |
| 55 | +version: "3.5" |
| 56 | +services: |
| 57 | + geth: |
| 58 | + build: |
| 59 | + context: geth |
| 60 | + args: |
| 61 | + environment: |
| 62 | + restart: unless-stopped |
| 63 | +``` |
| 64 | + |
| 65 | +Alias will be: |
| 66 | + |
| 67 | +- geth service: `geth.dnp.dappnode` and `geth.dnp.dappnode.eth` |
| 68 | + |
| 69 | +## Staker packages - fullnode |
| 70 | + |
| 71 | +The staker packages are a special case in dappnode, they do follow the same DNS conventions mentioned above, with some extra additions: |
| 72 | + |
| 73 | +- **EVMs dedicated docker networks**: Each EVM network supported in dappnode has a dedicated docker network that is used by the staker packages to communicate each other. The docker network name follows the convenction `<network>_network`, i.e `hoodi_network` for the hoodi network or `mainnet_network` for the mainnet network. |
| 74 | +- **Fullnode aliases**: The selected Execution and Consensus client has an extra domain name to indicate that its actually the client selected by the user. This domain name can be used by other packages to query the RPC node, the validator API, the beaconchain API, etc (in some cases it might reqire auth). The name convention is: |
| 75 | + - Execution: `execution.<network>.dncore.dappnode`. i.e `execution.mainnet.dncore.dappnode` |
| 76 | + - Consensus: |
| 77 | + - Beacon-chain: `beacon-chain.<network>.dncore.dappnode`. i.e `beacon-chain.mainnet.dncore.dappnode` |
| 78 | + - Validator: `validator.<network>.dncore.dappnode`. i.e `validator.mainnet.dncore.dappnode` |
| 79 | + |
| 80 | +:::info |
| 81 | +The fullnode alias is added in both docker networks, `dncore_network` and `<network>_network`, so it can be accessed from any package running in the dappnode. |
| 82 | +::: |
0 commit comments