Last active
October 31, 2023 20:44
-
-
Save wschwab/cdb94ae114a59bad7166947699e3a1dd to your computer and use it in GitHub Desktop.
Fresh IPFS install
This file contains 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
# work in progress/untested - use at your own risk | |
# ASSUMES ROOT | |
# installs | |
apt update && apt install wget ufw | |
# setup user | |
USERNAME=ipfs | |
adduser --system --group ${USERNAME} | |
# firewall | |
ufw allow ssh | |
ufw allow 4001 | |
ufw allow 5001 | |
# ufw allow 8080 # HTTP server | |
echo "y" | ufw enable | |
# installation | |
wget https://dist.ipfs.tech/kubo/v0.23.0/kubo_v0.23.0_freebsd-amd64.tar.gz | |
tar -xvzf kubo_v0.23.0_linux-amd64.tar.gz | |
cd kubo && bash install.sh | |
# create service | |
cat << EOF > /etc/systemd/system/ipfs.service | |
[Unit] | |
Description=ipfs | |
Before=trueblocks.service | |
[Service] | |
WorkingDirectory=/home/${USERNAME} | |
ExecStart=/usr/local/bin/ipfs daemon | |
User=${USERNAME} | |
Group=${USERNAME} | |
RestartKillSignal=SIGINT | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target | |
Alias=ipfs.service | |
EOF | |
systemctl enable ipfs.service | |
systemctl start ipfs.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment