Skip to content

fix: kubo config defaults suited to desktop - #3194

Merged
lidel merged 2 commits into
mainfrom
chore/kubo-config-defaults
Aug 3, 2026
Merged

fix: kubo config defaults suited to desktop#3194
lidel merged 2 commits into
mainfrom
chore/kubo-config-defaults

Conversation

@lidel

@lidel lidel commented Aug 3, 2026

Copy link
Copy Markdown
Member

Problem

Two kubo defaults are sized for servers and land badly on a laptop.

Provide.Strategy defaults to all, so the node announces every block in its datastore. That includes anything pulled in just by browsing, so users tell the network they host content they never chose to keep, and pay the reprovide cost for it on every cycle.

Internal.ShutdownTimeout defaults to 12 hours. ipfsd-ctl SIGKILLs the daemon 60 seconds after stop(), so a stuck subsystem meant quitting the app always waited the full minute and then died without leaving a clue why.

Fix

  • Announce only what the user asked for: content they explicitly pinned, plus what they imported into MFS through the Files screen (pinned+mfs+unique). See Provide.Strategy.
  • Cap graceful shutdown at 50s, comfortably under ipfsd-ctl's 60s kill, so kubo can log which subsystem is stuck and exit on its own terms.

Both are starting values, not locks. New repos get them from applyDefaults, existing ones from migrateConfig revision 7, and in both cases a value the user already set is left alone. A repo old enough to still carry the removed Reprovider.Strategy is skipped entirely, so kubo's own repo migration can move that preference across untouched.

lidel added 2 commits August 3, 2026 17:54
Kubo defaults to a 12h graceful shutdown cap, sized for servers.
ipfsd-ctl SIGKILLs the daemon 60s after stop(), so a hung subsystem
meant quitting the app always waited the full minute and then died
without a diagnostic. Capping below that deadline lets kubo log which
subsystem is stuck and exit on its own terms.

Applied to new repos in applyDefaults and to existing ones via
migrateConfig revision 7, in both cases only when the user has not set
their own value.
Kubo defaults Provide.Strategy to "all", so the node announces every
block in its datastore, including anything pulled in while browsing.
Desktop users end up telling the network they host content they never
chose to keep, and pay the reprovide cost for it.

Announce only what they asked for: content they explicitly pinned, plus
what they imported into MFS through the Files screen. The "+unique"
modifier skips re-walking CIDs shared between pins on every cycle.

https://github.com/ipfs/kubo/blob/master/docs/config.md#providestrategy

New repos only. Applying this to existing users would quietly shrink
what they already announce to the network.
@lidel
lidel requested a review from a team as a code owner August 3, 2026 15:58
@lidel
lidel merged commit 57e2c7d into main Aug 3, 2026
13 of 14 checks passed
@lidel
lidel deleted the chore/kubo-config-defaults branch August 3, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant