Downloading from IPFS without running daemon

If I make a desktop application, is there any way to download a file from IPFS without asking users to install and run the IPFS daemon? I’d like to take advantage of IPFS without asking users to get through the hassle of running the daemon, so I was wondering if there is any library that could replace the daemon to download a file.

Your application can come bundled with an IPFS daemon, and start it when your application is started. That is how Orbit works when launched as a standalone electron app.

Your application can come bundled with an IPFS daemon

does this only work for Go and Javascript applications, or can I bundle the daemon in any language?

You can use a bundled IPFS with any language, using the HTTP api that IPFS provides. There exist libraries for interfacing with the IPFS HTTP API comfortably in many languages: https://github.com/ipfs/ipfs#api-client-libraries

I’m not sure on how js-ipfs works, but it might have its own API available to other Javascript on a webpage.

1 Like

As said above, you need your own node bundled with your software; that’s what ipget is doing, for example.

And of course, you can always download from an exit node, e.g. curl -o /path/to/downloadedFile https://ipfs.io/ipfs/ipfsHash, but that’s probably not what you’re looking for. :slight_smile:

A temporary work-around for something that only has access to HTTP and unable to run a js/go-ipfs daemon as well is to use the public gateways that are available via ipfs.io. So if you have the hash QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T and want to get the file readme from there, you can do curl https://ipfs.io/ipfs/QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T/readme