Skip to content
Snippets Groups Projects
Select Git revision
  • 4d706fcd344b866cc4559dd1eb8e3911a56843f3
  • main default protected
2 results

configure.sh

Blame
  • Hugo Trentesaux's avatar
    Hugo Trentesaux authored
    and volume for easier config
    4d706fcd
    History
    configure.sh 1.13 KiB
    #!/bin/sh
    set -ex
    
    # --- bootstrap ---
    # remove default bootstrap nodes
    ipfs bootstrap rm all
    # add custom bootstrap
    ipfs config Bootstrap --json '["/dns/datapod.coinduf.eu/tcp/4001/p2p/12D3KooWFp4JsoDo5FX8CFLtyJjaWWRZ8q3gr8uT2s9To2GYzRNA"]'
    
    # --- rpc ---
    # allow easy access through ssh tunnel on port 5002
    # ipfs --api=/ip4/127.0.0.1/tcp/5002
    ipfs config API.HTTPHeaders.Access-Control-Allow-Origin --json '["http://127.0.0.1:5002"]'
    ipfs config API.HTTPHeaders.Access-Control-Allow-Methods --json '["PUT", "POST"]'
    
    # --- gateway ---
    # prevent gateway from fetching foreign data
    # ipfs config Gateway.NoFetch --json true
    # ipfs config Gateway.NoFetch --json false
    # public gateway without subdomain (no wildcard)
    # enables /ipfs and /routing (delegated routing)
    # public gateway with subdomain (needs wildcard)
    ipfs config Gateway.PublicGateways --json "{\"$KUBO_GATEWAY_DOMAIN\":{\"UseSubdomains\":false,\"Paths\":[\"/ipfs\",\"/routing\"]},\"$KUBO_GATEWAY_SUBDOMAIN\":{\"UseSubdomains\":true,\"Paths\":[\"/ipfs\",\"/routing\"]}}"
    
    # only reprovide pinned data
    # ipfs config Reprovider.Strategy "pinned"
    # ipfs config Reprovider.Strategy --json null