Skip to content

Instantly share code, notes, and snippets.

@wschwab
Last active October 31, 2023 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wschwab/cdb94ae114a59bad7166947699e3a1dd to your computer and use it in GitHub Desktop.
Save wschwab/cdb94ae114a59bad7166947699e3a1dd to your computer and use it in GitHub Desktop.
Fresh IPFS install
# 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