ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

Cannot set gateway address

Open pc0124 opened this issue 2 months ago • 3 comments

Checklist

Installation method

docker image

Version

Kubo version: 0.38.2-9fd105a
Repo version: 18
System version: amd64/linux
Golang version: go1.25.3

Config

{
	"API": {
		"HTTPHeaders": {
			"Access-Control-Allow-Headers": [
				"Authorization",
				"Content-Type"
			],
			"Access-Control-Allow-Methods": [
				"PUT",
				"GET",
				"POST",
				"OPTIONS"
			],
			"Access-Control-Allow-Origin": [
				"http://192.168.1.123:9235",
				"http://0.0.0.0:9235"
			],
			"Access-Control-Expose-Headers": [
				"Location"
			]
		}
	},
	"Addresses": {
		"API": "/ip4/0.0.0.0/tcp/9235",
		"Announce": [],
		"AppendAnnounce": [],
		"Gateway": "/ip4/0.0.0.0/tcp/5680",
		"NoAnnounce": [],
		"Swarm": [
			"/ip4/0.0.0.0/tcp/4001",
			"/ip6/::/tcp/4001",
			"/ip4/0.0.0.0/udp/4001/webrtc-direct",
			"/ip4/0.0.0.0/udp/4001/quic-v1",
			"/ip4/0.0.0.0/udp/4001/quic-v1/webtransport",
			"/ip6/::/udp/4001/webrtc-direct",
			"/ip6/::/udp/4001/quic-v1",
			"/ip6/::/udp/4001/quic-v1/webtransport"
		]
	},
	"AutoConf": {},
	"AutoNAT": {},
	"AutoTLS": {},
	"Bitswap": {},
	"Bootstrap": [
		"auto"
	],
	"DNS": {
		"Resolvers": {
			".": "auto"
		}
	},
	"Datastore": {
		"BlockKeyCacheSize": null,
		"BloomFilterSize": 0,
		"GCPeriod": "1h",
		"HashOnRead": false,
		"Spec": {
			"mounts": [
				{
					"mountpoint": "/blocks",
					"path": "blocks",
					"prefix": "flatfs.datastore",
					"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
					"sync": false,
					"type": "flatfs"
				},
				{
					"compression": "none",
					"mountpoint": "/",
					"path": "datastore",
					"prefix": "leveldb.datastore",
					"type": "levelds"
				}
			],
			"type": "mount"
		},
		"StorageGCWatermark": 90,
		"StorageMax": "10GB"
	},
	"Discovery": {
		"MDNS": {
			"Enabled": true
		}
	},
	"Experimental": {
		"FilestoreEnabled": false,
		"Libp2pStreamMounting": false,
		"OptimisticProvide": false,
		"OptimisticProvideJobsPoolSize": 0,
		"P2pHttpProxy": false,
		"UrlstoreEnabled": false
	},
	"Gateway": {
		"DeserializedResponses": null,
		"DisableHTMLErrors": null,
		"ExposeRoutingAPI": null,
		"HTTPHeaders": {
			"Access-Control-Allow-Origin": [
				"http://192.168.1.123:5680",
				"http://192.168.1.123:9235"
			]
		},
		"NoDNSLink": false,
		"NoFetch": false,
		"PublicGateways": {
			"192.168.1.123:5680": {
				"DeserializedResponses": null,
				"InlineDNSLink": null,
				"NoDNSLink": false,
				"Paths": [
					"/ipfs",
					"/ipns"
				],
				"UseSubdomains": false
			}
		},
		"RootRedirect": "http://192.168.1.123:9235/webui/"
	},
	"HTTPRetrieval": {},
	"Identity": {
		"PeerID": "12D3KooWL5VzcfaV9UD9Hp9MYZoiPpFLLbfBQYat3U91RZQzxLaW"
	},
	"Import": {
		"BatchMaxNodes": null,
		"BatchMaxSize": null,
		"CidVersion": null,
		"HashFunction": null,
		"UnixFSChunker": null,
		"UnixFSDirectoryMaxLinks": null,
		"UnixFSFileMaxLinks": null,
		"UnixFSHAMTDirectoryMaxFanout": null,
		"UnixFSHAMTDirectorySizeThreshold": null,
		"UnixFSRawLeaves": null
	},
	"Internal": {},
	"Ipns": {
		"DelegatedPublishers": [
			"auto"
		],
		"RecordLifetime": "",
		"RepublishPeriod": "",
		"ResolveCacheSize": 128
	},
	"Migration": {},
	"Mounts": {
		"FuseAllowOther": false,
		"IPFS": "/ipfs",
		"IPNS": "/ipns",
		"MFS": "/mfs"
	},
	"Peering": {
		"Peers": null
	},
	"Pinning": {
		"RemoteServices": {}
	},
	"Plugins": {
		"Plugins": null
	},
	"Provide": {
		"DHT": {}
	},
	"Provider": {},
	"Pubsub": {
		"DisableSigning": false,
		"Router": ""
	},
	"Reprovider": {},
	"Routing": {
		"DelegatedRouters": [
			"auto"
		]
	},
	"Swarm": {
		"AddrFilters": null,
		"ConnMgr": {},
		"DisableBandwidthMetrics": true,
		"DisableNatPortMap": false,
		"RelayClient": {},
		"RelayService": {},
		"ResourceMgr": {},
		"Transports": {
			"Multiplexers": {},
			"Network": {},
			"Security": {}
		}
	},
	"Version": {}
}

Description

I use an nginx container to forward the host ip and other relevant ip address.

Even when setting the ip address here, it still hardcodes links in the kubo web ui as http://127.0.0.1:/ipfs/

"PublicGateways": { "192.168.1.123:5680": { "DeserializedResponses": null, "InlineDNSLink": null, "NoDNSLink": false, "Paths": [ "/ipfs", "/ipns" ], "UseSubdomains": false } },

pc0124 avatar Nov 06 '25 13:11 pc0124

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.tech if you just need general support.

welcome[bot] avatar Nov 07 '25 16:11 welcome[bot]

@pc0124 thank you for reporting, are you able to screenshot what exactly does not work in ipfs-webui? (which screen, which link)

lidel avatar Nov 07 '25 16:11 lidel

when viewing files in chrome, the 127.0.0.1 gateway does not resolve so it remains a broken img. in firefox, it uses the global ipfs.io gateway as backup. that's nice and all, but when viewing it in my local network, it would be nice to preview it without the gateways first. locally pinned or not pinned images do not work.

Image

pc0124 avatar Nov 07 '25 18:11 pc0124