{"id":28464028,"url":"https://github.com/koompi/ipfs","last_synced_at":"2026-01-30T01:42:00.348Z","repository":{"id":53909066,"uuid":"329574792","full_name":"koompi/ipfs","owner":"koompi","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-12T03:23:32.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-07T05:08:44.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koompi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-14T10:01:10.000Z","updated_at":"2021-03-12T03:23:34.000Z","dependencies_parsed_at":"2022-08-13T04:01:00.999Z","dependency_job_id":null,"html_url":"https://github.com/koompi/ipfs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/koompi/ipfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koompi%2Fipfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koompi%2Fipfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koompi%2Fipfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koompi%2Fipfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koompi","download_url":"https://codeload.github.com/koompi/ipfs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koompi%2Fipfs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262819188,"owners_count":23369430,"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-07T05:08:37.612Z","updated_at":"2026-01-30T01:41:55.276Z","avatar_url":"https://github.com/koompi.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipfs\n#Description\n\nTh InterPlanetary File System is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. IPFS uses content-addressing to uniquely identify each file in a global namespace connecting all computing devices. [Wikipedia](https://en.wikipedia.org/wiki/InterPlanetary_File_System)\n\n* Install IPFS on CLI linux\n\n* Download file from [dist.ipfs.io](https://dist.ipfs.io/) for Raspberry Pi\n\n\t`$wget https://dist.ipfs.io/go-ipfs/v0.7.0/go-ipfs_v0.7.0_linux-arm64.tar.gz`\n* Attach file for tar.gz\n\t```\n\t$tar -xvzf go-ipfs_v0.7.0_linux-arm64.tar.gz\n\t$cd go-ipfs/\n\t$sudo ./install\n\t```\n* result: Moved ipfs to /usr/local/bin\n- Initialize ipfs:\n\t`$ipfs init`\n- Start ipfs service\n\t`$ipfs daemong`\n## Adding the Service\n\n**systemd**  is a software suite that comes with most newer Linux distributions, that allows the user to create and manage background services. These services are started automatically when the server boots, restarted if they fail, and have their output logs persisted to disk. Now that IPFS is installed, we want to create a service for it so that we get all these benefits.\n\nTo do this, we create a  _unit file_  at  `/etc/systemd/system/ipfs.service`  with the contents:\n\n```\n[Unit]\nDescription=IPFS Daemon\n\n[Service]\nExecStart=/usr/local/bin/ipfs daemon \nUser=root\nRestart=always\nLimitNOFILE=10240\n[Install]\nWantedBy=multi-user.target\n```\n\nChange the line \"User=root\" if you're not running the daemon as root, and then tell systemd about the new service:\n\t```\n\t$sudo systemctl daemon-reload\n\t$sudo systemctl enable ipfs\n\t$sudo systemctl start ipfs\n\t```\nNotes on systemd\n\n-   See high-level information on how the IPFS daemon is doing:  \n    `$systemctl status ipfs`\n-   Stop the daemon:  \n    `$systemctl stop ipfs`\n-   Start the daemon:  \n    `$systemctl start ipfs`\n-   See all logs from the daemon:  \n    `$journalctl -u ipfs`\n-   See only most recent logs, and show new logs as they're written:  \n    `$journalctl -f -u ipfs`\n* Add file to IPFS serve \n    `$ipfs add \"directory of file`\n* Add folder to IPFS\n    `$ipfs add -r \"directory of folder\"`\n* Print out the content from IPFS\n\t`$ipfs cat \u003cCID\u003e`\n## DNSlink IPFS\nYou need to assign static IP address with netplan\n\t`$sudo nano /etc/netplan/50-cloud-init.yaml`\n\t```\n\tnetwork:\n\tethernets:\n\t\twls2:\n\t\t\tdhcp4: true\n\t\teno1:\n\t\t\tdhcp4: no\n\t\t\taddresses: [192.168.10.1/24]\n\t\t\tnameservers:\n\t\t\taddresses: [192.168.10.1, 8.8.8.8]\n\t\tversion: 2\n\t```\n* Apply  netplan\n\t`$sudo netplan apply`\n* You need to assign static IP address **networking.service**\n\t`$sudo nano /etc/network/interfaces`\n\t```\n\tauto lo\n\tiface lo inet loopback\n\n\tauto wls2\n\tiface wls2 inet dhcp\n\n\tauto eno1\n\tiface eno1 inet static\n\taddress 192.168.10.1\n\tnetmask 255.255.255.0\n\tdns-nameservers 192.168.10.1 8.8.8.8\n\t```\n * Restart ```service networing```\n`\n$sudo systemctl restart networking.service\n`\n* You will need DHCP server ```isc-dhcp-server```\n`\n$sudo apt update\n$sudo apt install isc-dhcp-server\n`\n* You will probably need to change the default configuration by editing `/etc/dhcp/dhcpd.conf` to suit your needs and particular configuration.\n\n\t```\n\tdefault-lease-time 600;\n\tmax-lease-time 7200;\n\t \n\tsubnet 192.168.10.0 netmask 255.255.255.0 {\n\trange 192.168.10.150 192.168.10.200;\n\toption routers 192.168.10.1;\n\toption domain-name-servers 192.168.10.1, 8.8.8.8;\n\toption domain-name \"ipfs.kmp\";\n\t}\n\t```\n\t```\n\t$sudo apt update\n\t$sudo apt install bind9\n\t```\nGo to edit file `/etc/bind/named.conf.options`\n\t```\n\t\tforwarders {\n\t\t192.168.10.1;\n\t\t8.8.8.8;\n\t};\n\t```\n`$sudo systemctl restart bind9.service`\nAdd configure on file `named.conf.local` to link.\n   `sudo nano /etc/bind/named.conf.local:`\n\t```\n\tzone \"ipfs.kmp\" {\n\t\ttype master;\n\t\tfile \"/etc/bind/db.ipfs.kmp\";\n\t};\n\tzone \"1.168.192.in-addr.arpa\" {\n\t\ttype master;\n\t\tfile \"/etc/bind/db.192\";\n\t};\n\t```\n\n\t`$sudo cp /etc/bind/db.local /etc/bind/db.ipfs.kmp`\n\n```\n;\n; BIND data file for ipfs.kmp\n;\n$TTL 604800\n@ IN SOA ipfs.kmp. root.ipfs.kmp. (\n\t\t\t2 ; Serial\n\t\t\t\t\t604800 ; Refresh\n\t\t\t\t\t86400 ; Retry\n\t\t\t\t\t2419200 ; Expire\n\t\t\t\t\t604800 ) ; Negative Cache TTL\n\t@ \tIN \tNS \t\tns.ipfs.kmp.\n\t@ \tIN \tA \t\t192.168.10.1\n\t@ \tIN \tAAAA \t::1\n\tns \tIN\tA\t \t192.168.10.1\n```\n`$sudo cp /etc/bind/db.127 /etc/bind/db.192`\n```\n\t;\n\t; BIND reverse data file for local 192.168.10.XXX net\n\t;\n\t$TTL 604800\n\t@ IN SOA ns.ipfs.kmp. root.ipfs.kmp. (\n\t\t\t\t2 ; Serial\n\t\t\t\t\t\t604800 ; Refresh\n\t\t\t\t\t\t86400 ; Retry\n\t\t\t\t\t\t2419200 ; Expire\n\t\t\t\t\t\t604800 ) ; Negative Cache TTL\n\t;\n\t\t@ \tIN\t NS\t\tns.\n\t\t1 \tIN\t PTR\tns.ipfs.kmp.\n```\n`$sudo systemctl restart bind9.service`\n- Add content to IPFS\n`$ipfs add -r scr/`\n\tresult: \n\t```\n\tadded QmSUWgkEeXTm5R4mSUbnA7xGJaWZWfzcUint9ZWwBGD223 scr/index.html\n\tadded QmV4AtWqk3JakPR6578g9mXJxp6c5tMRAcdvvv8N6AQNJQ scr\n\t129 B / 129 B [================================================] 100.00%\n\t```\n- Pin ipfs content to local storage\n\t`$ipfs pin add -r /ipfs/QmV4AtWqk3JakPR6578g9mXJxp6c5tMRAcdvvv8N6AQNJQ`\n- Add IPFS content with DNSlink\n\t`$sudo nano /etc/bind/db.ipfs.kmp`\n\t```\n\t;\n\t; BIND data file for local loopback interface\n\t;\n\t$TTL    86400\n\t@       IN      SOA     ipfs.kmp. root.ipfs.kmp. (\n\t                              2         ; Serial\n\t                         604800         ; Refresh\n\t                          86400         ; Retry\n\t                        2419200         ; Expire\n\t                         604800 )       ; Negative Cache TTL\n\t;\n\t@       IN      NS      ipfs.kmp.\n\t@       IN      A       192.168.10.1\n\tipfs.kmp.       IN      A       192.168.10.1\n\tipfs.kmp.       IN      TXT     \"dnslink=/ipfs/QmV4AtWqk3JakPR6578g9mXJxp6c5tMRAcdvvv8N6AQNJQ\n\t@       IN      AAAA    ::1\n\tns      IN      A       192.168.10.1\n\twww     IN      CNAME   ipfs.kmp.\n\t```\n\t```\n\t$sudo systemctl restart bind9.service\n\t$sudo systemctl status bind9.service\n\t```\n- Check results DNSlink on client node.\n`$dig +noall +answer TXT ipfs.kmp`\n**Troubleshooting**\n\t```\n\t$dig -x 192.168.10.1\n\t$dig ipfs.kmp\n\t$sudo rm -rf /etc/resolv.conf\n\t$ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf\n\t```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoompi%2Fipfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoompi%2Fipfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoompi%2Fipfs/lists"}