-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
kind/featureA new featureA new featureneed/triageNeeds initial labeling and prioritizationNeeds initial labeling and prioritizationtopic/configTopic configTopic config
Milestone
Description
Requirements
Native support in Brave (brave/brave-browser#10220) requires a way of starting daemon without worrying about user having the default ports taken.
Specific needs are:
$IPFS_PATH/configshould be the source of truth about Swarm, API and Gateway ports- Conflict avoidance should be future-proof, meaning if current port gets taken by something else in the future, daemon will automatically pick next one and update source of truth
Note that setting ports to 0 is not feasible:
- it is meant to be used in tests, reading config tells us nothing about
Gatewayport, produces different port every time, and it is hard to read randomly-picked ports without capturing stout ofipfs daemon - we don't want gateway URLs to change all the time, as that would mean Origins are different every time daemon restarts, which breaks web storage on websites. it should change only if there is a conflict.
Proposed implementation
Add a parameter ipfs daemon --update-ports-if-taken
(or --find-free-ports ? suggestions? 🚲 🏚️ )
This new parameter should enable additional checks before ipfs daemon starts:
- check if ports defined in
$IPFS_PATH/configare free before starting (Swarm,API,Gateway)- if not
- increase them
+1and retry until all are free - save new values to
$IPFS_PATH/config - start regular
ipfs daemon
- increase them
- if not
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/featureA new featureA new featureneed/triageNeeds initial labeling and prioritizationNeeds initial labeling and prioritizationtopic/configTopic configTopic config