Last active
May 13, 2020 06:33
-
-
Save i5heu/6fe7793f19681a9d5be97c21bd23772f to your computer and use it in GitHub Desktop.
ipfs-node.sh
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
[Unit] | |
Description=IPFS main cluster | |
After=network.target | |
[Service] | |
User=ipfs | |
Group=ipfs | |
ExecStart=/home/ipfs/ipfs-cluster-follow/ipfs-cluster-follow main-cluster run | |
Restart=on-failure | |
[Install] | |
WantedBy=multi-user.target |
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
[Unit] | |
Description=IPFS daemon | |
After=network.target | |
[Service] | |
User=ipfs | |
Group=ipfs | |
ExecStart=/usr/local/bin/ipfs daemon | |
Restart=on-failure | |
[Install] | |
WantedBy=multi-user.target |
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
echo "start init script" | |
sudo apt -y update && sudo apt -y full-upgrade && sudo snap refresh kakoune | |
wget https://github.com/ipfs/go-ipfs/releases/download/v0.5.0/go-ipfs_v0.5.0_linux-amd64.tar.gz | |
tar -xvzf go-ipfs_v0.5.0_linux-amd64.tar.gz | |
bash go-ipfs/install.sh | |
useradd -m ipfs | |
su ipfs -c "ipfs init --profile server" | |
cat /root/ipfs-demon-service >> /etc/systemd/system/ipfs.service | |
cat /root/ipfs-cluster-service >> /etc/systemd/system/ipfscluster.service | |
cat /root/limits >> /etc/security/limits.conf | |
systemctl enable ipfs.service | |
systemctl enable ipfscluster.service | |
su ipfs -c "ipfs config Swarm.ConnMgr.LowWater 6000 --json" | |
su ipfs -c "ipfs config Swarm.ConnMgr.HighWater 6500 --json" | |
su ipfs -c "ipfs config Datastore.StorageMax '15GB'" | |
service ipfs start | |
su ipfs -c "wget https://dist.ipfs.io/ipfs-cluster-follow/v0.12.1/ipfs-cluster-follow_v0.12.1_linux-amd64.tar.gz -O ~/ipfs-cluster-follow.tar.gz" | |
su ipfs -c "mkdir ~/ipfs-cluster-follow" | |
su ipfs -c "tar -xvzf ~/ipfs-cluster-follow.tar.gz -C ~/" | |
su ipfs -c "~/ipfs-cluster-follow/ipfs-cluster-follow main-cluster init http://127.0.0.1:8080/ipfs/QmZ4UEmW49rtvtsCgnRD8dDwy7mcQBBvqHMiof8apgcLzq" | |
service ipfscluster start | |
su ipfs -c "ipfs swarm peers | wc -l" | |
reboot |
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
* soft nproc 65535 | |
* hard nproc 65535 | |
* soft nofile 65535 | |
* hard nofile 65535 | |
root soft nproc 65535 | |
root hard nproc 65535 | |
root soft nofile 65535 | |
root hard nofile 65535 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wget https://gist.github.com/i5heu/6fe7793f19681a9d5be97c21bd23772f/raw/46c2c8b016b5c5128e0f9156a73726e2116e60b1/ipfs-cluster-service https://gist.github.com/i5heu/6fe7793f19681a9d5be97c21bd23772f/raw/46c2c8b016b5c5128e0f9156a73726e2116e60b1/ipfs-demon-service https://gist.github.com/i5heu/6fe7793f19681a9d5be97c21bd23772f/raw/46c2c8b016b5c5128e0f9156a73726e2116e60b1/ipfs-node.sh https://gist.github.com/i5heu/6fe7793f19681a9d5be97c21bd23772f/raw/46c2c8b016b5c5128e0f9156a73726e2116e60b1/limits