Giter Club home page Giter Club logo

ipfs-rpi's Introduction

IPFS RPi (ABANDONED -- DON'T USE)

IMPORTANT: IPFS has its own SystemD files now. Use them instead. https://github.com/ipfs/kubo/tree/master/misc/systemd

A bare bones IPFS installer for the Raspberry Pi and other ARM-based devices.

Installation

Log into your system with an administrator account, like the default OS user. For example, on the Raspberry Pi, most operating systems will default to the pi user, whereas on the Orange Pi that's going to be orangepi.

From any local directory, clone or download this repo, cd into it and run the installer:

./install

Notes

  • Do not execute the installation script with sudo
  • You'll need root privileges to run the installer. The default OS user (pi, orangepi etc.) does so by default
  • The IPFS user directory will be created at ~/.ipfs (eg.: /home/pi/.ipfs, /home/orangepi/.ipfs etc.)

Installation options

You can specify a version for IPFS (eg.: v0.4.11):

./install v0.4.11

IPFS usage

You can find a lot of information on how to use IPFS on the official website. If you just want to test whether the installation was successful or not, you can list your node's peers:

ipfs swarm peers

IPFS daemon

The IPFS daemon needs to be running in order for your IPFS node to appear online. The installer already takes care of running the daemon on system startup by default, but if you want to control that process manually, you can use the operating system's init system directly.

For systemd (Raspbian Stretch, Ubuntu 15.04 and newer, CentOS 7 and newer), you can use:

sudo systemctl {start|status|stop} ipfs-daemon.service

For upstart (Ubuntu 9.10 to Ubuntu 14.10, Centos 6), you can use:

sudo service ipfs-daemon {start|status|stop}

Uninstallation

In order to uninstall IPFS, just execute the uninstaller and follow the uninstallation steps:

./uninstall

Upgrade

If you want to upgrade to a newer version, run the installer again.

Support matrix

SBC/ARM device Raspbian Stretch Ubuntu 14.04
Raspberry Pi 0 Not tested Not tested
Raspberry Pi 1 Yes Not tested
Raspberry Pi 2 Yes Not tested
Raspberry Pi 3 Yes Not tested
Orange Pi Not tested Yes

How to contribute

  • for bug reports, open a new issue
  • for code patches, open a pull request against the development branch
  • for bugs specific to IPFS, please refer to the official channel

ipfs-rpi's People

Contributors

claudiobizzotto avatar nudin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipfs-rpi's Issues

IPFS daemon starts multiple times

Hi,

First of all: thanks for creating this installer.

I have one isue with it:

After installing IPFS on my Raspberry Pi, the IPFS daemon seams to start multiple times. If I look at htop, it shows 10 or 20 IPFS daemons. It gets more after some time too. Any idea why this is? I can see it eats all the memory.

Start with pre-fedault folders

Hi @claudiobizzotto ,

I am wondering If it is possible to automate a script that as soon as the IPFS is running on the pi it adds a folder (obtained through a sudo git clone or locally) to be deployed in the IPFS network.

In case of this being possible, could you please give me some indications to do it in this repo?

CPU usage constantly high

My IPFS node is using ~50%+ CPU power of my Raspberry Pi 3B+ which makes the CPU temperature hot (70+ degrees Celsius). I checked with a local install on my Laptop and there my IPFS node is using ~2-3% of CPU. Both nodes are pinning the same file and have roughly the same amount of files pinned/cached.

Update GO_VERSION

Hi, thanks for your script. :]

>>> GOPATH created at /home/pi/go
>>> Installing IPFS
bin/check_go_version 1.8
fatal: go version '1.6.3' should be at least '1.8'
=> Please take a look at https://golang.org/doc/install to install or upgrade go.
mk/golang.mk:52: recipe for target 'check_go_version' failed
make: *** [check_go_version] Error 1

So I changed:

GO_VERSION=1.9

Notes on testing on a Pi Zero W with Raspian Stretch Lite

Trying to run from the command line on a Pi Zero W using the ipfs daemon command (after disabling the auto-launched daemon) I get as far as seeing peers appear and then:

API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready

Received interrupt signal, shutting down...
(Hit ctrl-c again to force-shutdown the daemon.)

I don't know if the Pi Zero W is just underpowered. I'll try with a regular Pi, but I think if I don't hear of any other successes, I'm tempted to update README.md with the note it doesn't work on a Pi Zero.

I'll set up a regular Pi 3 tomorrow to confirm it's not something I'm doing incorrectly.

Troubles when reverting to older version of IPFS

So your script automatically installed v0.4.13, and I was having some trouble with that version locking up my system (presumably out of memory from every indication I had that the memory usage was steadily climbing, and the fact that others seem to have this issue with v0.4.13), so I thought to revert to a lower version (v0.4.9, which supposedly doesn't have that issue) and managed to get IPFS uninstalled and reinstalled at that version with the script. I noticed, however, that in this process the script will not work if IPFS is not running and and return >>> Failed to stop IPFS, and so I had to start IPFS to get it to work; no big deal but a bit quirky.

However, I had further trouble in attempting a reverse migration (which is the recommendation in the output when the daemon attempts to start with repos of a higher version in ~/.ipfs), and so I decided to try the more current IPFS version (v0.4.17) but soon discovered that the script would not work with this low of an IPFS version and fails to stop IPFS, presumably because ipfs-daemon is an unknown instance at this low of a version (the service seems to be called ipfs daemon instead, but even ipfs\ daemon shows up as an unrecognized service when I attempt to stop it).

Obviously I was able to simply run sudo rm -rf /usr/local/bin/ipfs to basically start from scratch and was able to install 0.4.17 afterward, but I figured you might like to know about this little snag. Incidentally, for some reason I was also unable to restore my pins with the subsequent migration, but that's all on me and IPFS's own repo-migration script. Now I just have to wait and see if this newer version runs out of memory.

Install fails (make: *** [cmd/ipfs-install] Error 2)

This is on BCM2835 with Raspbian 9.1:

LWXJSgo install -ldflags="-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=6beab668"  ./cmd/ipfs
# gx/ipfs/QmTBxwy8cerzXbZQFUwTBCSxx55jUgVzudFcpmnAHUGuPy/badger
../../../gx/ipfs/QmTBxwy8cerzXbZQFUwTBCSxx55jUgVzudFcpmnAHUGuPy/badger/kv.go:86:6: constant 1099511627776 overflows int
cmd/ipfs/Rules.mk:26: recipe for target 'cmd/ipfs-install' failed
make: *** [cmd/ipfs-install] Error 2

Fatal error when running daemon

pi@raspberrypi:~/ipfs-rpi $ ipfs swarm peers
Error: this action must be run in online mode, try running 'ipfs daemon' first

pi@raspberrypi:~/ipfs-rpi $ ipfs daemon
Initializing daemon...
go-ipfs version: 0.13.0-rc1
Repo version: 12
System version: arm/linux
Golang version: go1.18.1
2022-05-31T17:31:50.160+1000    ERROR   p2pnode libp2p/rcmgr_defaults.go:107    ===> OOF! go-libp2p changed DefaultServiceLimits
=> changes ('test' represents the old value):
  {"op":"test","path":"/SystemLimits/Memory","value":1073741824}
  {"op":"replace","path":"/SystemLimits/Memory","value":134217728}
=> go-libp2p SetDefaultServiceLimits update needs a review:
Please inspect if changes impact go-ipfs users, and update expectedDefaultServiceLimits in rcmgr_defaults.go to remove this message
2022-05-31T17:31:50.161+1000    FATAL   p2pnode libp2p/rcmgr_defaults.go:115    daemon will refuse to run with the resource manager until this is resolved

Change the default IPFS data path

What exactly do I need to change on the Raspberry Pi to have a different IPFS path?
I would like to use an external drive as my IPFS block storage.

v0.1.0 doesn't work with upstart

Installer doesn't fully work on systems relying on upstart. IPFS does get installed, but all the pieces that make the daemon run as a service are breaking.

Tested on
Hardware: Orange Pi Zero
OS: Ubuntu Trusty (14.04)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.