1.1.0 • Published 7 months ago

rehoster v1.1.0

Weekly downloads
-
License
Apache-2.0
Repository
gitlab
Last release
7 months ago

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 (default rehoster-corestore)
  • REHOSTER_KEYS_LOC (default rehoster-keys.yml)
  • REHOSTER_LOG_LEVEL (default info)

The rehoster can connect to a DHT-prometheus instance with the following configuration:

  • REHOSTER_PROMETHEUS_ALIAS: the alias to use
  • REHOSTER_PROMETHEUS_SECRET: the scraper's secret
  • REHOSTER_PROMETHEUS_SCRAPER_PUBLIC_KEY: the scraper's public key