Created
October 19, 2018 12:49
-
-
Save joeltg/e38d7a8d539b215d10681b25fb54d2e1 to your computer and use it in GitHub Desktop.
Setup for IPFS Cluster Node (Linode w/ Debian 9)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt update | |
| apt upgrade -y | |
| apt install -y make git jq | |
| wget https://dl.google.com/go/go1.11.1.linux-amd64.tar.gz | |
| tar -C /usr/local -xzf go1.11.1.linux-amd64.tar.gz | |
| rm go1.11.1.linux-amd64.tar.gz | |
| echo "export PATH=\$PATH:/usr/local/go/bin:/root/go/bin" >> /etc/profile | |
| source /etc/profile | |
| go get -u github.com/ipfs/ipfs-update | |
| ipfs-update install latest | |
| ipfs init --empty-repo --profile server | |
| ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/80 | |
| mkdir -p ~/.config/systemd/user | |
| cat > ~/.config/systemd/user/ipfs.service <<EOF | |
| [Unit] | |
| Description=IPFS daemon | |
| After=network.target | |
| [Service] | |
| ExecStart=/usr/local/bin/ipfs daemon --offline --enable-gc | |
| Restart=on-failure | |
| [Install] | |
| WantedBy=default.target | |
| EOF | |
| systemctl --user enable --now ipfs | |
| loginctl enable-linger root | |
| git clone https://github.com/ipfs/ipfs-cluster.git ~/go/src/github.com/ipfs/ipfs-cluster | |
| cd ~/go/src/github.com/ipfs/ipfs-cluster | |
| make install | |
| cd ~/ | |
| ipfs-cluster-service init | |
| cat > ~/.config/systemd/user/cluster.service <<EOF | |
| [Unit] | |
| Description=IPFS Cluster Service daemon | |
| Requires=ipfs.service | |
| After=network.target ipfs.service | |
| [Service] | |
| ExecStart=/root/go/bin/ipfs-cluster-service daemon | |
| Restart=on-failure | |
| [Install] | |
| WantedBy=default.target | |
| EOF | |
| systemctl --user enable --now cluster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment