{"id":29126261,"url":"https://github.com/ipfs-examples/helia-remote-pinning","last_synced_at":"2025-10-29T20:10:14.951Z","repository":{"id":290904368,"uuid":"870619216","full_name":"ipfs-examples/helia-remote-pinning","owner":"ipfs-examples","description":"How to pin content to a remote IPFS pinning service using Helia","archived":false,"fork":false,"pushed_at":"2025-05-01T07:36:36.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-01T08:30:29.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipfs-examples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-10T11:19:32.000Z","updated_at":"2025-05-01T07:36:38.000Z","dependencies_parsed_at":"2025-05-01T08:30:43.282Z","dependency_job_id":"7fd80f04-fb88-444d-8bf3-da4324a7aff1","html_url":"https://github.com/ipfs-examples/helia-remote-pinning","commit_stats":null,"previous_names":["ipfs-examples/helia-remote-pinning"],"tags_count":0,"template":false,"template_full_name":"ipfs-examples/example-fork-go-template","purl":"pkg:github/ipfs-examples/helia-remote-pinning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-remote-pinning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-remote-pinning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-remote-pinning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-remote-pinning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipfs-examples","download_url":"https://codeload.github.com/ipfs-examples/helia-remote-pinning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-remote-pinning/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262680554,"owners_count":23347597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-29T23:03:55.515Z","updated_at":"2025-10-29T20:10:09.919Z","avatar_url":"https://github.com/ipfs-examples.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ipfs/helia\" title=\"Helia\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/ipfs/helia/main/assets/helia.png\" alt=\"Helia logo\" width=\"300\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\u003cb\u003eHow to pin content to a remote IPFS pinning service using Helia\u003c/b\u003e\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/jlord/forkngo/gh-pages/badges/cobalt.png\" width=\"200\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://ipfs.github.io/helia/modules/helia.html\"\u003eExplore the docs\u003c/a\u003e\n  ·\n  \u003ca href=\"https://codesandbox.io/p/sandbox/infallible-haibt-e3lcd4\"\u003eView Demo\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/ipfs-examples/helia-examples/issues\"\u003eReport Bug\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/ipfs-examples/helia-examples/issues\"\u003eRequest Feature/Example\u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\nWhen we add content to an IPFS node, it needs to remain online in order for\nothers to retrieve that content.\n\nSome environments such as web browsers are fundamentally short lived - the user\nmay navigate away from the page, close their browser or laptop lid, for example.\n\nWhere users are creating content in these environments, we should use a remote\npinning service to ensure the content is resolvable long after the original\ncreator has gone offline.\n\nA remote pinning service is a third party node that stores content on behalf of\nother nodes. It may be a commercial service or one you have set up yourself.\n\n## Network\n\nWe are going to start four nodes.\n\n1. Publisher\n\nThis is a browser node which we will use to create some content.\n\n1. Pinning service\n\nThis will run under Node.js and it will be used to make the content available\nafter the publisher has gone offline.\n\n3. Resolver\n\nAnother browser node that wishes to fetch the content created by the publisher.\n\n4. Bootstrapper\n\nA Node.js node we will use to allow these peers to discover each other.\n\n## Start the servers\n\nFirst start the bootstrapper:\n\n```console\n$ npm run bootstrapper\nbootstrapper listening on\n/ip4/127.0.0.1/tcp/64484/p2p/12D3KooWNkqtx14iU9sJV76PgksX3nYW7CPdKZAQPG6ueqzAMgxD\n... more addresses here\n```\n\nNext start the pinning service:\n\n```console\n$ npm run pinning-service.js\npinning service listening on\nhttp://127.0.0.1:64486\n```\n\nNow start the publisher:\n\n```console\n$ npm run publisher\n```\n\nA web browser will open.\n\nWait for the status to become \"Ready\". When this has happened, the libp2p node\nrunning on the page has acquired a relay address from the bootstrap node and\ncan accept incoming WebRTC connections from the pinning service node. This is\nnecessary for the pinning service to request pinned blocks from the publisher.\n\nEnter some text into the input box and click the \"Publish\" button.\n\nCopy the CID that is shown on the screen.\n\nYou may now close the publisher window if you wish.\n\nFinally start the resolver:\n\n```console\n$ npm run resolver\n```\n\nWhen the web browser opens, take the CID you copied previous and enter it into\nthe input box.\n\nClick \"Resolve\", after a short delay you should see the content you entered into\nthe input on the publisher page.\n\nYou have just published content using a remote pinning service, then resolved\nthat content using a different node.\n\n## About The Project\n\n- Read the [docs](https://ipfs.github.io/helia/modules/helia.html)\n- Look into other [examples](https://github.com/ipfs-examples/helia-examples) to learn how to spawn a Helia node in Node.js and in the Browser\n- Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n- Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n- Check out https://docs.ipfs.io for tips, how-tos and more\n- See https://blog.ipfs.io for news and more\n- Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n_For more examples, please refer to the [Documentation](#documentation)_\n\n## Documentation\n\n- [IPFS Primer](https://dweb-primer.ipfs.io/)\n- [IPFS Docs](https://docs.ipfs.io/)\n- [Tutorials](https://proto.school)\n- [More examples](https://github.com/ipfs-examples/helia-examples)\n- [API - Helia](https://ipfs.github.io/helia/modules/helia.html)\n- [API - @helia/unixfs](https://ipfs.github.io/helia-unixfs/modules/helia.html)\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the IPFS Project\n2. Create your Feature Branch (`git checkout -b feature/amazing-feature`)\n3. Commit your Changes (`git commit -a -m 'feat: add some amazing feature'`)\n4. Push to the Branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Want to hack on IPFS?\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)\n\nThe IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out:\n\nRead the [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md) and [JavaScript Contributing Guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md).\n\n- **Check out existing issues** The [issue list](https://github.com/ipfs/helia/issues) has many that are marked as ['help wanted'](https://github.com/ipfs/helia/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22) or ['difficulty:easy'](https://github.com/ipfs/helia/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Adifficulty%3Aeasy) which make great starting points for development, many of which can be tackled with no prior IPFS knowledge\n- **Look at the [Helia Roadmap](https://github.com/ipfs/helia/blob/main/ROADMAP.md)** This are the high priority items being worked on right now\n- **Perform code reviews** More eyes will help\n  a. speed the project along\n  b. ensure quality, and\n  c. reduce possible future bugs\n- **Add tests**. There can never be enough tests\n\n[cid]: https://docs.ipfs.tech/concepts/content-addressing  \"Content Identifier\"\n[Uint8Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n[libp2p]: https://libp2p.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs-examples%2Fhelia-remote-pinning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipfs-examples%2Fhelia-remote-pinning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs-examples%2Fhelia-remote-pinning/lists"}