_I'm reposting this from my [blog](https://sevdev.hu/ipns/sevdev.hu), originally published at [June 26, 2016](https://sevdev.hu/ipns/sevdev.hu/posts/2016-06-26-publishing-to-ipfs.html)._ If you visited this site more than once in the past year, you might notice that it started redirecting to a weird path, like this: `/ipns/sevdev.hu`. The reason being that the site is now hosted on [IPFS], and the path you are seeing is the IPFS path of the site, served by the HTTP gateway of [go-ipfs]. So, what is this, and why it is a big deal? <!-- TEASER --> # The Interplanetary Filesystem IPFS is a distributed, peer-to-peer, content-addressed filesystem. It's like the lovechild of BitTorrent and Git. It makes it possible to make a file or directory available on the network, where other nodes can access it knowing only the hash of the content, but unaware of the location of the host. This allows a transparent, infrastructure-agnostic and inherently redundant data storage. The network is trustless, as it's impossible to change their content without changing their address. In this setup, the VPS behind sevdev.hu is just an IPFS node, with a HTTP gateway to serve traditional web browsers. If the page is accessed natively through an IPFS client, it could just be served by any other IPFS node which holds a copy. # Publishing files To get started, just install [go-ipfs] and initialise your node with `ipfs init`. This will generate a private key, and a corresponding peer ID, which will identify your node over the peer-to-peer network. After that, the daemon can be started by `ipfs daemon`. Making a file available on IPFS is the easiest part. After installing [go-ipfs] , just use `ipfs add <path>`. That doesn't transmit anything to the network - it just calculates and stores the hash of the given file. If any node looks for this specific hash in the future, your node will serve it. It's also possible to store trees, just like in Git. A tree's hash is composed of the hash and path of the leaves, which allows us to publish a whole directory recursively, with `ipfs add -r <path>`. # Addressing The `ipfs add` command outputs a friendly looking, base-58 hash, starting with `Qm` for some reason. This file can be referenced by any node on the network, using the path `/ipfs/<hash>`. As long as your node is up and has a healthy connection, any node can access your content using this path. There is a public gateway at the IPFS home page to try: `http://ipfs.io/ipfs/<hash>`. Since paths are immutable, it's impossible to deliver updates to users. That's why IPFS has a separate namespace at `/ipns/`, where mutable names can be resolved. The concept is similar to Git branches -- they are mutable pointers, as oppesed to commits, which are content-addressable, immutable objects. This namespace can use a number of name services to resolve IPFS resources. # IPFS names IPFS provides a built-in method to publish names on the peer-to-peer network. Using your private key, you can publish a name, which points to an IPFS content address. These names are stored in a DHT, and has to be republished regularly (~12h) to stay alive. IPFS names can be published by the `ipfs name publish <hash>` command, which will publish the given hash under the node's peer ID. The content can be referenced later with the path `/ipns/<peer id>`. There is also a commandline tool, [ipns-pub] to conveniently publish to multiple names, without changing the node configuration. This is a self-contained, decentralised way of publishing content, but practically it needs an always-on server with the private key on file, to be able to keep the name alive. According to folks on [#ipfs], this will change in the future. # DNS Alternatively, the good ol' DNS can be used to resolve IPFS names. The `dnslink=` TXT record should point to the IPFS path. For example, here's the TXT record of the [IPFS website][IPFS]: ``` ipfs.io. 11 IN TXT "dnslink=/ipfs/QmTzQ1JRkWErjk39mryYw2WVaphAZNAREyMchXzYQ7c15n" ``` Because of that TXT record, the website can be accessed by the `/ipns/ipfs.io` path, instead of an unfriendly peer ID. # Using IPFS on today's web Obviously, there is no native support for the IPFS protocol in web browsers. This site, as well as the IPFS webite provides a HTTP gateway, that conveniently maps IPFS paths to the document root, so they can be loaded in a HTTP client without any modification. This practice makes it possible to redirect every HTTP gateway to the local node's gateway pretty easily, for example using the [IPFS station] extension. That provides a seamless way to use IPFS how it's meant to be used: using the peer-to-peer network, without any knowledge of the original host. [IPFS]: https://ipfs.io [go-ipfs]: https://github.com/ipfs/go-ipfs [ipns-pub]: https://github.com/whyrusleeping/ipns-pub [#ipfs]: irc://chat.freenode.net/ipfs [IPFS Station]: https://chrome.google.com/webstore/detail/ipfs-station/kckhgoigikkadogfdiojcblegfhdnjei
author | sevcsik |
---|---|
permlink | publishing-to-ipfs |
category | development |
json_metadata | {"tags":["development","ipfs","p2p","decentralization","bittorrent","git"],"links":["http://ipfs.io/ipfs/","https://ipfs.io"]} |
created | 2016-07-11 13:44:57 |
last_update | 2016-07-11 13:44:57 |
depth | 0 |
children | 9 |
last_payout | 2016-08-24 00:30:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.029 HBD |
curator_payout_value | 0.009 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 4,991 |
author_reputation | 70,278,902,050 |
root_title | "Publishing to IPFS" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 78,685 |
net_rshares | 512,813,711,847 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
eeks | 0 | 511,179,031,926 | 100% | ||
hipster | 0 | 0 | 100% | ||
sevcsik | 0 | 8,286,400 | 100% | ||
amihay | 0 | 13,339,958 | 100% | ||
skriptroid | 0 | 1,186,245,582 | 100% | ||
ffane | 0 | 247,746,585 | 100% | ||
ardina | 0 | 115,175,378 | 100% | ||
letc | 0 | 63,886,018 | 100% | ||
teseo | 0 | 0 | 100% | ||
alvinauxiliary | 0 | 0 | 100% | ||
gr1b17cy | 0 | 0 | 100% | ||
m-rio | 0 | 0 | 100% | ||
wiering | 0 | 0 | 100% |
author | amihay |
---|---|
permlink | re-publishing-to-ipfs |
category | development |
json_metadata | {} |
created | 2016-08-08 01:09:27 |
last_update | 2016-08-08 01:09:27 |
depth | 1 |
children | 0 |
last_payout | 2016-08-24 00:30:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 11 |
author_reputation | 1,271,791,839,323 |
root_title | "Publishing to IPFS" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 673,937 |
net_rshares | -398,930,597 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
cheetah41 | 0 | -90,256,863 | -100% | ||
cheetah42 | 0 | -90,249,303 | -100% | ||
cheetah43 | 0 | -90,235,081 | -100% | ||
cheetah44 | 0 | -127,803,056 | -100% | ||
clamps | 0 | -386,294 | -100% |
Nice to have you around! Here are some tips if you're not aware of them already: Secure your account: https://steemit.com/steemit-guides/@pfunk/your-steem-account-is-worth-money-how-to-secure-it-with-a-new-owner-key-to-keep-it-yours-forever Verify your account and build your reputation: https://steemit.com/steem/@tuck-fheman/verified-accounts--reputation-system Contribute with your own contents: https://steemit.com/steem/@grittenald/copy-paste-steal-cite-your-sources, and https://steemit.com/steemit/@pfunk/lets-discuss-verification-of-user-accounts-posting-previous-work-to-prevent-impersonation Properly tagging your posts, especially when your content is #NSFW or for #test only Know how Steemit works: https://steemit.com/steemit/@donkeypong/still-confused-by-steem-steem-dollars-and-steem-power-the-power-plant-analogy
author | hotwings |
---|---|
permlink | re-sevcsik-publishing-to-ipfs-20160711t134528100z |
category | development |
json_metadata | {"tags":["NSFW","test","development"],"links":["https://steemit.com/steemit-guides/@pfunk/your-steem-account-is-worth-money-how-to-secure-it-with-a-new-owner-key-to-keep-it-yours-forever"]} |
created | 2016-07-11 13:45:27 |
last_update | 2016-07-11 13:45:27 |
depth | 1 |
children | 0 |
last_payout | 2016-08-24 00:30:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 848 |
author_reputation | -468,374,953,755 |
root_title | "Publishing to IPFS" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 78,688 |
net_rshares | 0 |
How you can serve as a ipfs service provider, means how can i earn money from ipfs hosting for others ?
author | iamsubbu |
---|---|
permlink | re-sevcsik-publishing-to-ipfs-20170901t100009957z |
category | development |
json_metadata | {"tags":["development"],"app":"steemit/0.1"} |
created | 2017-09-01 10:00:15 |
last_update | 2017-09-01 10:00:15 |
depth | 1 |
children | 1 |
last_payout | 2017-09-08 10:00:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 103 |
author_reputation | 8,740,731,126 |
root_title | "Publishing to IPFS" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,536,222 |
net_rshares | 0 |
At the moment you can't, but Filecoin will provide this functionality when launched.
author | sevcsik |
---|---|
permlink | re-iamsubbu-re-sevcsik-publishing-to-ipfs-20171218t144311512z |
category | development |
json_metadata | {"tags":["development"],"app":"steemit/0.1"} |
created | 2017-12-18 14:43:12 |
last_update | 2017-12-18 14:43:12 |
depth | 2 |
children | 0 |
last_payout | 2017-12-25 14:43:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 84 |
author_reputation | 70,278,902,050 |
root_title | "Publishing to IPFS" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 24,033,382 |
net_rshares | 0 |
What am I doing wrong ? ``` $ ipfs daemon $ ipfs add -r /Users/m/Desktop/img_test added QmcDQDePjtXyS28aRFHuSXBiGifcL8jdihhDvvt3nteYww img_test/IMG_8831.jpg added QmeT1dXQsGVGDgt5A2vQLDbMS4sPr1KsZG3vBKGnANRvtM img_test/IMG_8834.jpg added QmbAqf4gCDqJAaWN5ZfaMz4yoBEkL2Z9ivcusHy8wpXTbA img_test $ ipfs name publish QmbAqf4gCDqJAaWN5ZfaMz4yoBEkL2Z9ivcusHy8wpXTbA img_test Error: Unknown Command "QmbAqf4gCDqJAaWN5ZfaMz4yoBEkL2Z9ivcusHy8wpXTbA" ```
author | moderators |
---|---|
permlink | re-sevcsik-publishing-to-ipfs-20180207t182953230z |
category | development |
json_metadata | {"tags":["development"],"app":"steemit/0.1"} |
created | 2018-02-07 18:29:54 |
last_update | 2018-02-07 18:30:27 |
depth | 1 |
children | 3 |
last_payout | 2018-02-14 18:29:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 449 |
author_reputation | 251,411,212,123 |
root_title | "Publishing to IPFS" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 35,721,982 |
net_rshares | 0 |
you don't need to specify a path: `ipfs name publish QmbAqf4gCDqJAaWN5ZfaMz4yoBEkL2Z9ivcusHy8wpXTbA`
author | coriander |
---|---|
permlink | re-moderators-re-sevcsik-publishing-to-ipfs-20180207t204430166z |
category | development |
json_metadata | {"tags":["development"],"app":"steemit/0.1"} |
created | 2018-02-07 20:44:30 |
last_update | 2018-02-07 20:44:30 |
depth | 2 |
children | 2 |
last_payout | 2018-02-14 20:44:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 100 |
author_reputation | 127,229,595 |
root_title | "Publishing to IPFS" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 35,746,263 |
net_rshares | 0 |
just $ ipfs name publish img_test ? ps: can i create directory ?
author | moderators |
---|---|
permlink | re-coriander-re-moderators-re-sevcsik-publishing-to-ipfs-20180207t222122033z |
category | development |
json_metadata | {"tags":["development"],"app":"steemit/0.1"} |
created | 2018-02-07 22:21:21 |
last_update | 2018-02-07 22:21:21 |
depth | 3 |
children | 1 |
last_payout | 2018-02-14 22:21:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 67 |
author_reputation | 251,411,212,123 |
root_title | "Publishing to IPFS" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 35,762,853 |
net_rshares | 0 |
HI, I am having trouble using IPFS and Dsound.. do you know how to install and use IPFS? "settings" in Dsound do not do anything and there are no instructions
author | thunderbirdman |
---|---|
permlink | re-sevcsik-publishing-to-ipfs-20170921t184529274z |
category | development |
json_metadata | {"tags":["development"],"app":"steemit/0.1"} |
created | 2017-09-21 18:45:27 |
last_update | 2017-09-21 18:45:27 |
depth | 1 |
children | 0 |
last_payout | 2017-09-28 18:45:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 159 |
author_reputation | 11,208,941,844 |
root_title | "Publishing to IPFS" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,548,876 |
net_rshares | 0 |