rehoster
v1.1.0
Published
Service to keep hypercores available
Downloads
196
Maintainers
Readme
Rehoster
Keep Hypercores available.
For a hypercore containing a hyperdrive, both underlying cores will be served.
If you rehost another rehoster, you will rehost all its cores as well (recursively).
Run
The keys to rehost are read from a .yml configuration file (rehoster-keys.yml by default), with structure:
<public-key>:
description: 'Optional description'
CLI
npm i -g rehoster pino-pretty
Then run
rehoster | pino-pretty
Docker
docker run --rm --network=host --mount type=bind,source=/path/to/config/dir,target=/etc/rehoster/ --mount type=volume,source=rehoster-corestore-volume,target=/home/rehoster/corestore hdegroote/rehoster
The source directory for the bind mount should contain a rehoster-keys.yml
file containing the desired configuration.
Configuration
Configuration parameters are passed in as environment variables. They include:
REHOSTER_CORESTORE_LOC
: the corestore location (defaultrehoster-corestore
)REHOSTER_KEYS_LOC
(defaultrehoster-keys.yml
)REHOSTER_LOG_LEVEL
(defaultinfo
)
The rehoster can connect to a DHT-prometheus instance with the following configuration:
REHOSTER_PROMETHEUS_ALIAS
: the alias to useREHOSTER_PROMETHEUS_SECRET
: the scraper's secretREHOSTER_PROMETHEUS_SCRAPER_PUBLIC_KEY
: the scraper's public key