{"record":{"id":"25aa0f293c6d0e15","repo":"ipfs/kubo","slug":"webtransport-transport-does-not-support-private-ne","errorCode":null,"errorMessage":"WebTransport transport does not support private networks, please disable Swarm.Transports.Network.WebTransport","messagePattern":"WebTransport transport does not support private networks, please disable Swarm\\.Transports\\.Network\\.WebTransport","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/libp2p/transport.go","lineNumber":63,"sourceCode":"\t\t\tif privateNetworkEnabled {\n\t\t\t\tlog.Error(\"libp2p.ShareTCPListener() is not supported in private networks, please disable Swarm.Transports.Network.Websocket or run with LIBP2P_TCP_MUX=false to make this message go away\")\n\t\t\t} else {\n\t\t\t\topts.Opts = append(opts.Opts, libp2p.ShareTCPListener())\n\t\t\t}\n\t\t}\n\n\t\tif tptConfig.Network.QUIC.WithDefault(!privateNetworkEnabled) {\n\t\t\tif privateNetworkEnabled {\n\t\t\t\treturn opts, fmt.Errorf(\n\t\t\t\t\t\"QUIC transport does not support private networks, please disable Swarm.Transports.Network.QUIC\",\n\t\t\t\t)\n\t\t\t}\n\t\t\topts.Opts = append(opts.Opts, libp2p.Transport(quic.NewTransport))\n\t\t}\n\n\t\tif tptConfig.Network.WebTransport.WithDefault(!privateNetworkEnabled) {\n\t\t\tif privateNetworkEnabled {\n\t\t\t\treturn opts, fmt.Errorf(\n\t\t\t\t\t\"WebTransport transport does not support private networks, please disable Swarm.Transports.Network.WebTransport\",\n\t\t\t\t)\n\t\t\t}\n\t\t\topts.Opts = append(opts.Opts, libp2p.Transport(webtransport.New))\n\t\t}\n\n\t\tif tptConfig.Network.WebRTCDirect.WithDefault(!privateNetworkEnabled) {\n\t\t\tif privateNetworkEnabled {\n\t\t\t\treturn opts, fmt.Errorf(\n\t\t\t\t\t\"WebRTC Direct transport does not support private networks, please disable Swarm.Transports.Network.WebRTCDirect\",\n\t\t\t\t)\n\t\t\t}\n\t\t\topts.Opts = append(opts.Opts, libp2p.Transport(webrtc.New))\n\t\t}\n\n\t\treturn opts, nil\n\t}\n}","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/libp2p/transport.go#L45-L81","documentation":"WebTransport is built on QUIC, so it inherits QUIC's incompatibility with libp2p private networks (pnet). Kubo's transport setup detects a private network with WebTransport enabled and refuses to start rather than listening on a transport that cannot work.","triggerScenarios":"Daemon startup when Swarm.Transports.Network.WebTransport is explicitly true while a private network (swarm key) is active; the WithDefault(!privateNetworkEnabled) default would turn it off, so an explicit enable is required to hit this.","commonSituations":"Operators running private/protected swarms who copied public-node configs enabling WebTransport, or who set all transports to true wholesale while using a swarm key.","solutions":["Disable it: `ipfs config --json Swarm.Transports.Network.WebTransport false`","Also disable QUIC and WebRTCDirect (errors 592/594) since all three fail with pnet","Ensure Swarm.Transports.Network.TCP is enabled so the node still listens","Restart the daemon"],"exampleFix":"// before\nipfs config --json Swarm.Transports.Network.WebTransport true\n\n// after (private network)\nipfs config --json Swarm.Transports.Network.WebTransport false","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := node.Start(ctx); err != nil {\n    if strings.Contains(err.Error(), \"WebTransport transport does not support private networks\") {\n        return fmt.Errorf(\"private network active: set Swarm.Transports.Network.WebTransport=false: %w\", err)\n    }\n    return err\n}","preventionTips":[],"tags":["libp2p","webtransport","private-network","transport"],"backgroundTag":"transport-incompatible-with-private-network","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}