ipvm-wg / homestar

Homestar is the individual node that makes up the Everywhere Computer network (similar to how IPFS Kubo, Iroh, Nabu, or other implementation nodes make up the IPFS network). It's written in Rust and is designed for performance and composability.
https://docs.everywhere.computer/homestar/what-is-homestar/
Apache License 2.0
212 stars 23 forks source link

Add `init` command to generate keypairs and settings file #422

Closed bgins closed 7 months ago

bgins commented 11 months ago

Summary

Problem

Homestar requires users to generate a keypair or use a randomly generated one. Also, settings are set by default computationally. We should give people the ability to initialize a configuration (with defaults) and an existing keypair (with the option of which key type).

Impact

Manually generating a keypair is inconvenient. Randomly generated keypairs result in a new peer ID on each run, which makes it challenging to configure network discovery and connections.

Solution

We will use a default configuration and .pem in $HOME/.config for Linux and macOS, and $USERPROFILE for Windows. We should always check the configuration first at the default location. If no configuration is available at the default location, and no configuration is provided, just start with automatic defaults.

zeeshanlakhani commented 7 months ago

Closed with https://github.com/ipvm-wg/homestar/pull/582.