How to host wisp.place

My project only really works as 'decentralized' if other people actually host the same implementation or similar ones. In short

# clone the repo
git clone https://tangled.org/nekomimi.pet/wisp.place-monorepo

# setup env
cd wisp.place-monorepo
vim .env

NODE_ENV=production
DATABASE_URL=postgres://postgres:ASecurePasword@localhost:5432/wisp
DOMAIN=https://wisp.place
CLIENT_NAME=wisp.place

Run the main-app. The postgres DB will have its table auto populate on startup

bun install
bun run start
# serves on localhost:8000

then for the service that actually hosts

cd hosting-service
vim .env

NODE_ENV=production
BASE_HOST="wisp.place"
DATABASE_URL=postgres://postgres:ASecurePasword@baal:5432/wisp

running it

tsx --env-file=.env src/index.ts
# serves on localhost:3001

I don't have a way to completely backfill from the network itself on its own yet, but if you sign in, it will backfill from your PDS if you have sites, and if someone requests a site like sites.yourdomain.com/did:plc:123abc/miku , it will check your cache, see its not in there, then request a copy from the PDS, downloads it, then serves it.

If you need a caddy config:

{
on_demand_tls {
ask http://localhost:8000/api/domain/registered
}
}

# Wisp subdomains and DNS hash routing
*.dns.wisp.place *.wisp.place {
reverse_proxy localhost:3001
}

# Main web interface and API
wisp.place {
reverse_proxy localhost:8000
}

# Custom domains (on-demand TLS)
https:// {
tls {
on_demand
}
reverse_proxy localhost:3001
}

BTW: wisp-cli can deploy to your PDS and serve from your PDS directly (or serve anyone's site for that matter)

https://docs.wisp.place/cli/

# Download and make executable
curl https://sites.wisp.place/nekomimi.pet/wisp-cli-binaries/wisp-cli-x86_64-linux -o wisp-cli
chmod +x wisp-cli

# Deploy your site
./wisp-cli deploy your-handle.bsky.social \
--path ./dist \
--site my-site

# Serve your site - watches firehose for updates
# can put on different machine
./wisp-cli serve your-handle.bsky.social \
--output ./on-disk-cache \
--site my-site

# Serve someone else's site as a mirror
./wisp-cli serve nekomimi.pet \
--output ./on-disk-cache \
--site AtReact

In a way, this should show that AT Protocol can be decentralized but we have to actually make the effort to make it so. I don't want to harp on this because I've become extremely jaded about this the past month, but between mega-pdses and issues I've had working around extremely weird design limitations on what should be our own PDSes to put our data on, I'm wondering if the shitty ways IPFS does things is actually better, or if bittorrent is perfectly capable for these things as it always was.