How do i see my ipfs gatewaty

i have attached some files to ipfs network from my locally running ipfs node from here http://139.162.63.180/ and those files are available on public ipfs gateway like this https://ipfs.io/ipfs/QmYJPSBedM3f5XqResYRgeHnapdJCLUHTZG9tq7FxFTdVq and this https://ipfs.io/ipfs/QmfESaSZxcGyM2Tm2eWCTgeMVw396J3ghux6MRtnbajhxg but i cant see that in my local ipfs node this is not working what can do? http://139.162.63.180/ipfs/QmfESaSZxcGyM2Tm2eWCTgeMVw396J3ghux6MRtnbajhxg in order to make this url working?

Hello, if you want to access it directly from your local machine you can use http://localhost:8080/ipfs/QmfESaSZxcGyM2Tm2eWCTgeMVw396J3ghux6MRtnbajhxg

If you want to change it so it’s accessible from that IP address, in your IPFS config file which can be accessed through the settings section of the web UI you can change the section that says Gateway to look like this:

“Gateway”: “/ip4/139.162.63.180/tcp/8080”,

Then restart the IPFS daemon and you should be able to access your files from
http://139.162.63.180:8080/ipfs/QmfESaSZxcGyM2Tm2eWCTgeMVw396J3ghux6MRtnbajhxg

Hopefully this helps, let me know if it works.

Your IP address seems to be located within a Linode block. The headers from your web server indicates that you are running Apache… and your web server has the package maintainer’s default page from the Ubuntu repo.

At the very least, you may want to stop serving the default web page and turn off the server version identification:

ServerTokens Prod

https://httpd.apache.org/docs/2.4/mod/core.html#servertokens

IPFS serves its content via its own web server which sits at port 8080 in the default configuration. So, you don’t actually need to run Apache if you are not serving any other content on the server. Apache is useful to act as a proxy front for IPFS so that you can provide access to your gateway via TLS.

You may want to provide gateway access via IPv6 as well as IPv4… To do that, check your IPv6 address and add it under Addresses.Gateway in your IPFS node configuration.

ipfs config --json Addresses.Gateway '["/ip6/....../tcp/8080","/ip4/139.162.63.180/tcp/8080"]'

https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addressesgateway

i am running in linode server so i dont have access to webui

You should be able to find a config file in you’re IPFS directory, most of the time it’s in ~/.ipfs it should have the Gateway setting in it.

it is not there is there a way to find where is my ipfs conf? Also how do i restart ipfs daemon

This answer also seems not working :frowning:

When logged in to your linode IaaS…

Start your IPFS node, and check if port 8080 is open…

ipfs daemon &
sudo netstat -lnt


ipfs config show

By default, the ipfs directory is at: ~/.ipfs

If you are setting up an Internet facing IPFS node that you want to start automatically and you’re running Ubuntu… you can create a systemd service file to automatically start IPFS. Otherwise, you’ll need to manually check the PID and kill the process… and then restart with ipfs daemon

To kill IPFS nicely:

pkill ipfs

to kill IPFS immediately:

kill -9 PID


Lastly, it’s probably not a good idea to run IPFS as root… so if you are running the daemon as root… it’s probably a better idea to create an IPFS user and log in as that user with ssh public key enabled… And probably not put the IPFS user in the sudo group.

On Linode:

sudo adduser ipfs

On Local machine:

ssh-copy-id ipfs@linode.ip

Probably a good idea to disable ssh password logins after that.

This is what i am getting. what is wrong over here?
root@localhost:~/op# sudo netstat -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:4001 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5001 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::4000 :::* LISTEN
tcp6 0 0 :::4001 :::* LISTEN
root@localhost:~/op# ipfs config show

{
  "API": {
    "HTTPHeaders": {}
  },
  "Addresses": {
    "API": "/ip4/0.0.0.0/tcp/5001",
    "Announce": [],
    "Gateway": [
      "/ip6/139.162.63.180/tcp/8080",
      "/ip4/139.162.63.180/tcp/8080"
    ],
    "NoAnnounce": [
      "/ip4/10.0.0.0/ipcidr/8",
      "/ip4/100.64.0.0/ipcidr/10",
      "/ip4/169.254.0.0/ipcidr/16",
      "/ip4/172.16.0.0/ipcidr/12",
      "/ip4/192.0.0.0/ipcidr/24",
      "/ip4/192.0.0.0/ipcidr/29",
      "/ip4/192.0.0.8/ipcidr/32",
      "/ip4/192.0.0.170/ipcidr/32",
      "/ip4/192.0.0.171/ipcidr/32",
      "/ip4/192.0.2.0/ipcidr/24",
      "/ip4/192.168.0.0/ipcidr/16",
      "/ip4/198.18.0.0/ipcidr/15",
      "/ip4/198.51.100.0/ipcidr/24",
      "/ip4/203.0.113.0/ipcidr/24",
      "/ip4/240.0.0.0/ipcidr/4",
      "/ip6/100::/ipcidr/64",
      "/ip6/2001:2::/ipcidr/48",
      "/ip6/2001:db8::/ipcidr/32",
      "/ip6/fc00::/ipcidr/7",
      "/ip6/fe80::/ipcidr/10"
    ],
    "Swarm": [
      "/ip4/0.0.0.0/tcp/4001",
      "/ip6/::/tcp/4001",
      "/ip4/0.0.0.0/udp/4001/quic",
      "/ip6/::/udp/4001/quic"
    ]
  },
  "AutoNAT": {},
  "Bootstrap": [
    "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
    "/ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt"
  ],
  "Datastore": {
    "BloomFilterSize": 0,
    "GCPeriod": "1h",
    "HashOnRead": false,
    "Spec": {
      "mounts": [
        {
          "child": {
            "path": "blocks",
            "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
            "sync": true,
            "type": "flatfs"
          },
          "mountpoint": "/blocks",
          "prefix": "flatfs.datastore",
          "type": "measure"
        },
        {
          "child": {
            "compression": "none",
            "path": "datastore",
            "type": "levelds"
          },
          "mountpoint": "/",
          "prefix": "leveldb.datastore",
          "type": "measure"
        }
      ],
      "type": "mount"
    },
    "StorageGCWatermark": 90,
    "StorageMax": "10GB"
  },
  "Discovery": {
    "MDNS": {
      "Enabled": false,
      "Interval": 10
    }
  },
  "Experimental": {
    "FilestoreEnabled": false,
    "GraphsyncEnabled": false,
    "Libp2pStreamMounting": false,
    "P2pHttpProxy": false,
    "ShardingEnabled": false,
    "StrategicProviding": false,
    "UrlstoreEnabled": false
  },
  "Gateway": {
    "APICommands": [],
    "HTTPHeaders": {
      "Access-Control-Allow-Headers": [
        "X-Requested-With",
        "Range",
        "User-Agent"
      ],
      "Access-Control-Allow-Methods": [
        "GET"
      ],
      "Access-Control-Allow-Origin": [
        "*"
      ]
    },
    "NoDNSLink": false,
    "NoFetch": false,
    "PathPrefixes": [],
    "PublicGateways": null,
    "RootRedirect": "",
    "Writable": false
  },
  "Identity": {
    "PeerID": "12D3KooWHV3eZ18M5waVFzTJRrLdnSjKKKWTVcVKQeABxhvppwea"
  },
  "Ipns": {
    "RecordLifetime": "",
    "RepublishPeriod": "",
    "ResolveCacheSize": 128
  },
  "Mounts": {
    "FuseAllowOther": false,
    "IPFS": "/ipfs",
    "IPNS": "/ipns"
  },
  "Peering": {
    "Peers": null
  },
  "Plugins": {
    "Plugins": null
  },
  "Provider": {
    "Strategy": ""
  },
  "Pubsub": {
    "DisableSigning": false,
    "Router": ""
  },
  "Reprovider": {
    "Interval": "12h",
    "Strategy": "all"
  },
  "Routing": {
    "Type": "dht"
  },
  "Swarm": {
    "AddrFilters": [
      "/ip4/10.0.0.0/ipcidr/8",
      "/ip4/100.64.0.0/ipcidr/10",
      "/ip4/169.254.0.0/ipcidr/16",
      "/ip4/172.16.0.0/ipcidr/12",
      "/ip4/192.0.0.0/ipcidr/24",
      "/ip4/192.0.0.0/ipcidr/29",
      "/ip4/192.0.0.8/ipcidr/32",
      "/ip4/192.0.0.170/ipcidr/32",
      "/ip4/192.0.0.171/ipcidr/32",
      "/ip4/192.0.2.0/ipcidr/24",
      "/ip4/192.168.0.0/ipcidr/16",
      "/ip4/198.18.0.0/ipcidr/15",
      "/ip4/198.51.100.0/ipcidr/24",
      "/ip4/203.0.113.0/ipcidr/24",
      "/ip4/240.0.0.0/ipcidr/4",
      "/ip6/100::/ipcidr/64",
      "/ip6/2001:2::/ipcidr/48",
      "/ip6/2001:db8::/ipcidr/32",
      "/ip6/fc00::/ipcidr/7",
      "/ip6/fe80::/ipcidr/10"
    ],
    "ConnMgr": {
      "GracePeriod": "20s",
      "HighWater": 900,
      "LowWater": 600,
      "Type": "basic"
    },
    "DisableBandwidthMetrics": false,
    "DisableNatPortMap": true,
    "EnableAutoRelay": true,
    "EnableRelayHop": false,
    "Transports": {
      "Multiplexers": {},
      "Network": {},
      "Security": {}
    }
  }
}

Your API is open to the world… This is generally not a good thing in most setups.

You should definitely change that from 0.0.0.0 to 127.0.0.1 unless you’ve got iptables setup to route port 5001 to some secured program/proxy/something.

Your config has an IPv4 address in an ip6 field. You should be able to obtain your Linode’s ip6 address by looking at the output of:

ip a

while logged into your Linode.

Here’s Linode’s IPv6 FAQ if you’re not sure about their IPv6 support or would like to find your IPv6 address via their web interface.

According to your netstat output, port 8080 is only accessible from localhost. Perhaps you have another service running on port 8080 ?

What is the output of:

sudo lsof -ni4 |grep 8080

Nothing this command returns nothing.

root@localhost:~# sudo lsof -ni4 |grep 8080
root@localhost:~#

Also how to change port for ipfs