ipfs / ipfs/kubo

add --swarm-key and --swarm-key-file cli options to ipfs init

Open
#8,063 1 comment 0 reactions 0 assignees View on GitHub
kind/feature need/triage
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.