diff --git a/README.md b/README.md index aefd418..62d07de 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ docker run --rm -d \ -e STORJ_BUCKET= \ -e STORJ_ACCESS= \ -e IPFS_IDENTITY_PEER_ID= \ - -e IPFS_IDENTITY_PRIVATE_KEY= \ + -e IPFS_IDENTITY_PRIVATE_KEY= \ -e IPFS_GATEWAY_NO_FETCH=true \ -e IPFS_GATEWAY_DOMAIN= \ -e IPFS_GATEWAY_USE_SUBDOMAINS=false \ @@ -166,7 +166,7 @@ Docker images are published to https://hub.docker.com/r/storjlabs/ipfs-go-ds-sto `IPFS_IDENTITY_PEER_ID` can be set optionally to preserve the node identity between runs. The current peer ID can be found under `Identity.PeerID` in the config file. -`IPFS_IDENTITY_PRIVATE_KEY` must be set if `IPFS_IDENTITY_PEER_ID` is set, and the provided private key must match the peer ID. The current private key can be found under `Identity.PrivKey` in the config file. The provided private key must be properly escaped for the `sed` tool, i.e. it must be wrapped with quotation marks and slashes must be escaped with backslashes. +`IPFS_IDENTITY_PRIVATE_KEY` must be set if `IPFS_IDENTITY_PEER_ID` is set, and the provided private key must match the peer ID. The current private key can be found under `Identity.PrivKey` in the config file. `IPFS_GATEWAY_NO_FETCH` determines if the IPFS gateway is open (if set to false) or restricted (if set to true). Restricted gateways serve files only from the local IPFS node. Open gateways search the IPFS network if the file is not present on the local IPFS node. diff --git a/docker/container_daemon b/docker/container_daemon index 6dc5739..adcfde8 100644 --- a/docker/container_daemon +++ b/docker/container_daemon @@ -31,7 +31,7 @@ else # Set the private key that matches the peer ID, if provided above if [ ! -z $IPFS_IDENTITY_PRIVATE_KEY ]; then # We use sed here because `ipfs config` does not allow changing the PrivKey. - sed -i "s/\(\"PrivKey\": \).*/\1\"$IPFS_IDENTITY_PRIVATE_KEY\"/" $repo/config + sed -i "s~\(\"PrivKey\": \).*~\1\"$IPFS_IDENTITY_PRIVATE_KEY\"~" $repo/config fi # HTTP API port config