~alexdavid/ipfs-gateway-website-host

A collection of scripts to help automate deploying a static website on top of an IPFS gateway
b4e1049d — Alex David 3 months ago
Initial commit

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~alexdavid/ipfs-gateway-website-host
read/write
git@git.sr.ht:~alexdavid/ipfs-gateway-website-host

You can also use your local clone with git send-email.

#IPFS Gateway Website Host

This project contains a set of scripts to easily create an IPFS public gateway that serves static content for a set of specified domain names.

  1. Install IPFS and nginx
  2. Add an A record for the domains you want to serve content at your host
  3. Add a TXT at the subdomain _dnslink.[domain] pointed at the IPFS/IPNS content you want to host
  4. Clone this project and run init [domain]
  • This will request a Let's Encrypt certificate for the domain. Ensure the DNS records have had a chance to propogate.
  • You can specify multiple domains at once with init example.com example.net
  • init is idempotent and is safe to be called multiple times with new domains as needed
  1. Set up a cron job to call cron every 10 minutes:
  • $ echo "*/10 * * * * root /path/to/repo/cron | sudo tee -a /etc/crontab > /dev/null
  1. Set up a cron job to call certbot renew on some interval:
  • $ echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew -q" | sudo tee -a /etc/crontab > /dev/null
  1. Restart nginx
  • (systemctl restart nginx if using systemd)