Easy personal IPFS pinning service with Textile

A quick lesson in spinning up your own personal IPFS pinning service in no time with Textile Cafes

Carson Farmer
Jan 4 · 9 min read
Photo by Capturing the human heart on Unsplash

Textile Cafes

Setup

The ‘manual’ (but still pretty easy) way

textile config Cafe.Host.Open true
textile config Cafe.Host.PublicIP \"$IP\"
textile config Addresses.CafeAPI \"0.0.0.0:40601\"
textile config Addresses.Gateway \"0.0.0.0:5050\"
textile config IsServer true
textile config Cafe.Host.HttpURL \"https://mycafe.io\"
textile init -s $(textile wallet init | tail -n1) \
  --server --cafe-open --swarm-ports=4001 \
  --cafe-http-url="$URL" \
  --cafe-public-ip="$IP" \
  --cafe-bind-addr=0.0.0.0:40601 \
  --gateway-bind-addr=0.0.0.0:5050

The ‘automatic’ (and definitely easy) way

./init.sh -k key.pem -r 1.0.0.0 -p xx.xxx.x.xxx -u http://xx.xxx.x.xxx:40601

Quick Test

curl "http://xx.xxx.xx.xxx:40601/health"

Registering

textile init -s $(textile wallet init | tail -n1) --api-bind-addr=http://127.0.0.1:41600 --swarm-ports=4101 --repo-dir=/full/path/to/repo
textile cafes add <cafe-peer-id>
textile cafes ls | jq '.[].access'

Adding & Pinning

textile threads add photo-thread --media
textile add photos/ --caption="moar pics" --thread=<id> --group
fswatch --event Created --event MovedTo path/to/folder | xargs -I{} textile add {} -t <id>

Summary

That’s it!

Textile

Building new digital experiences by focusing on user privacy, openness, and decentralization. Makers of https://www.textile.photos/

154

154 claps
Carson Farmer

Written by

Works at Textile.io. Former prof, turned dweb professional. Writes about ipfs, textile, dweb, decentralization, etc.

Textile

Textile

Building new digital experiences by focusing on user privacy, openness, and decentralization. Makers of https://www.textile.photos/