OK thanks. I restarted with this guide: Initialize a Kubo node and interact with the IPFS Network | IPFS Docs (on linux)
But I’m struggling with a few things. It says “By default, your gateway is not exposed to the world. It only works locally.” It is running on a VPS. I have a firewall blocking access to everything except 4001. How do I get back to where I was so that I can see the webui on 4101 remotely (the firewall limits access to 4101 to my own remote IP only).
What else do I need to do?
Whatever files I add are still not available on other gateways as is.
Is my config correct?
“Addresses”: {
“Swarm”: [
“/ip4/[public ip]/tcp/4001”,
“/ip6/::/tcp/4001”,
“/ip4/[public ip]/udp/4001/quic-v1”,
“/ip4/[public ip]/udp/4001/quic-v1/webtransport”,
“/ip6/::/udp/4001/quic-v1”,
“/ip6/::/udp/4001/quic-v1/webtransport”
],
“Announce”: ,
“AppendAnnounce”: ,
“NoAnnounce”: ,
“API”: “/ip4/127.0.0.1/tcp/4101”,
“Gateway”: “/ip4/127.0.0.1/tcp/8080”
},
“Mounts”: {
“IPFS”: “/ipfs”,
“IPNS”: “/ipns”,
“FuseAllowOther”: false
},
“Discovery”: {
“MDNS”: {
“Enabled”: true
I don’t see the section below in the new version config file at all
“Access-Control-Allow-Origin”: [
“http://[public ip]:4101”,
“http://localhost:3000”,
“http://127.0.0.1:4101”,
“https://webui.ipfs.io”
]
Also, how do I make sure that ipfs daemon starts every time the server restarts?
I tried using this file: https://github.com/ipfs/kubo/blob/master/misc/systemd/ipfs.service
But it fails to run
Job for ipfs.service failed because the control process exited with error code.
See “systemctl status ipfs.service” and “journalctl -xe” for details.
ipfs.service - InterPlanetary File System (IPFS) daemon
Loaded: loaded (/etc/systemd/system/ipfs.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-10-26 15:35:14 UTC; 1min 34s ago
Docs: https://docs.ipfs.tech/
Process: 95293 ExecStart=/usr/local/bin/ipfs daemon --init --migrate (code=exited, status=1/FAILURE)
Main PID: 95293 (code=exited, status=1/FAILURE)
CPU: 42ms
journalctl -xe has no entries
Running simply ‘ipfs daemon’ works but this is attached to a terminal. I want this to startup automatically and run unattached to any terminal.
Thanks.
Edit: I resolved the inability to access the web ui by running
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://[public ip]:4101", "http://localhost:3000", "http://127.0.0.1:4101", "https://webui.ipfs.io"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
I still can’t get it running as a system service or find any of the files I add on other gateways.
Also, getting some errors in the terminal
|2023-10-26T15:55:56.274Z|ERROR|bitswap|providerquerymanager/providerquerymanager.go:344|Received provider (QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic) for cid (bafyreicecv6qfui4lzoudvkfblkq7aogmtlmhabqwjvhwhn3ijkannysxq) not requested|
|---|---|---|---|---|
|2023-10-26T15:59:39.038Z|ERROR|bitswap|providerquerymanager/providerquerymanager.go:344|Received provider (12D3KooWGd58eC3Rmc4GYRaUbZU36urEeSi4JYjDhF7fzNQfNWL8) for cid (bafyreia3hkiqlpvlcoxskmlpqvfa5rjnq4lffs2qp4tp53jroga6ln47oa) not requested|
|2023-10-26T16:00:26.417Z|ERROR|bitswap|providerquerymanager/providerquerymanager.go:344|Received provider (12D3KooWBwjwkfmg1xw3TadPTWLwm56RNdymqVzaajHox8ymqTuE) for cid (bafyreih5cqtpvr77vuawdchtxwkz2nmzr4aww4rz4mt4gdgxvs6jmnbsoq) not requested|
|2023-10-26T16:00:26.745Z|ERROR|bitswap|providerquerymanager/providerquerymanager.go:344|Received provider (12D3KooWJLKZgB9aXcb91TaW54rKY5VtnNx1om5VQLSbNTySgeKQ) for cid (bafyreih5cqtpvr77vuawdchtxwkz2nmzr4aww4rz4mt4gdgxvs6jmnbsoq) not requested|