add --swarm-key and --swarm-key-file cli options to ipfs init
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
Hi 👋
## Problem Summary
go-ipfs searches for swarm.key file inside the `IPFS_PATH`, if it's found, a private swarm will be created.
In environments like Kubernetes, it's a bit tricky to mount volume for `IPFS_PATH` then inject `swarm.key` secret inside it.
## Feature (Solution)
add `--swarm-key` and `--swarm-key-file` options.
`--swarm-key` will create a swarm.key from the value of this option.
`--swarm-key-file` will copy the file contents into swarm.key file.
[container_daemon](https://github.com/ipfs/go-ipfs/blob/ef866a1400b3b2861e5e8b6cc9edc8633b890a0a/bin/container_daemon) used by go-ipfs docker already uses these concept, but using its own `IPFS_KEY` and `IPFS_KEY_FILE` environment variables.
Thank you ❤️
Contributor guide
Assessment
This issue has not been assessed yet.