Skip to content

Commit

Permalink
docs: document serving datalayer dat files improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastCicada committed Oct 18, 2024
1 parent d8ef2dd commit 042a356
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ npm run start

CADT relies on all participants publicly sharing their data over Chia Datalayer, which includes sharing the Chia-generated `.dat` files over HTTP. The files are located in `~/.chia/mainnet/data_layer/db/server_files_location_<NETWORK>/` (where `<NETWORK>` is the Chia network, usually either "mainnet" or "testneta") and can be shared over any web-accessible HTTP endpoint, including

* Using the built-in datalayer-http service (see [Installation](#installation) instructions below). Datalayer-http runs on port 8575 by default which may need to be opened in your firewall configuration or forwarded by your router.
* Using the built-in datalayer-http service (see [Installation](#installation) instructions below). Datalayer-http runs on port 8575 by default which may need to be opened in your firewall configuration or forwarded by your router. Additionally, a static IP address will be required, which is not offered by default on many hosting providers. On AWS, assign an Elastic IP to the EC2 instance or use an Application Load Balancer to solve this.

* Using Nginx, Apache, Caddy, or any other web server. One challenge is that the default location for the .dat files is in the user's home directory, which the web server software will not have read-access to. One simple solution is
* Using Nginx, Apache, Caddy, or any other web server. This also requires a static IP address, or dynamically assigned DNS record. Another challenge is that the default location for the .dat files is in the user's home directory, which the web server software will not have read-access to. One simple solution is
* `mv ~/.chia/mainnet/data_layer/db/server_files_location_<NETWORK> /var/www/` - move the datalayer file directory outside of the home directory
* `chmod -R 744 /var/www/server_files_location_<NETWORK>` - change permissions on all datalayer files to be read by any user
* `ln -s /var/www/server_files_location_<NETWORK> ~/.chia/mainnet/data_layer/db/server_files_location_<NETWORK>` - create a shortcut from the old location to the new
Expand All @@ -166,7 +166,8 @@ CADT relies on all participants publicly sharing their data over Chia Datalayer,
}
```

* Use [S3](https://aws.amazon.com/s3/) or other object store. Datalayer .dat files can be synced to any cloud file storage solution that can serve them publicly over HTTP. Chia installs with a [plugin that natively integrates with S3](https://docs.chia.net/guides/datalayer-permissions/#the-chia-s3-plugin), but it requires all participants to have an AWS login, which is not appropriate for the public nature of CADT. To use S3 to serve .dat files publicly, [use this script and follow the installation and usage instructions in the README](https://github.com/TheLastCicada/Chia-Datalayer-S3-Sync).
* Use [S3](https://aws.amazon.com/s3/) or other object store. Datalayer .dat files can be synced to any cloud file storage solution that can serve them publicly over HTTP. One recommended solution using S3 is to [use this script and follow the installation and usage instructions in the README](https://github.com/TheLastCicada/Chia-Datalayer-S3-Sync).



### Run CADT on a Testnet
Expand Down

0 comments on commit 042a356

Please sign in to comment.