3.5 KiB
3.5 KiB
SkateSpots Relay Configuration Guide
Your Relay URL
Once you have your relay running, update this file with your actual relay URL.
Current relay URL: TO_BE_CONFIGURED
Options:
- Tailscale (private):
ws://skatespots-relay:3334 - Cloudflare (public):
wss://your-tunnel-url.trycloudflare.com - Tor (private):
ws://your-onion-address.onion:3334 - Custom domain:
wss://relay.skatespots.com
Updating the App
Once you have your relay URL, update src/App.tsx:
const defaultConfig: AppConfig = {
relayMetadata: {
relays: [
{ url: 'YOUR-RELAY-URL-HERE', read: true, write: true },
{ url: 'wss://relay.damus.io', read: true, write: true },
{ url: 'wss://nos.lol', read: true, write: true },
],
},
};
Event Kind Policies
Your relay should enforce these policies:
Zero Friction:
- Spots (Kind 30818): Anyone can publish immediately
Light Friction:
- Events (Kind 31923): Require 1+ follower
- Comments (Kind 1): Require 1+ follower
- Reactions (Kind 7): Require 1+ follower
Verification Required:
- Coaches (Kind 35001): Require NIP-05 OR 3+ followers
- Shops (Kind 30017): Require NIP-05
Testing
Before going live, test that spots can be published:
- Update relay URL in
src/App.tsx - Clear browser cache
- Try adding a spot
- Check relay logs:
docker-compose logs -f - Should see:
Event accepted: kind=30818
Sharing Access
For Tailscale Network:
- Go to: https://login.tailscale.com/admin/settings/sharing
- Create shareable invite link
- Share with your skate crew
- They install Tailscale, accept invite, done!
For Public Relay:
Just share the app URL - relay works automatically: https://skate-spots.shakespeare.wtf
Monitoring
Check relay health:
# View logs
docker-compose logs -f
# Check database size
du -sh db/
# Count events
sqlite3 db/relay.db "SELECT COUNT(*) FROM events;"
# Count WoT members
sqlite3 db/relay.db "SELECT COUNT(*) FROM wot;"
Relay info page: Open browser to: http://YOUR-RELAY-URL (shows stats)
Backup
Automatic backup script (run weekly):
#!/bin/bash
# backup-relay.sh
DATE=$(date +%Y%m%d)
BACKUP_DIR="$HOME/skatespots-relay-backups"
mkdir -p $BACKUP_DIR
cd $HOME/skatespots-relay
# Stop relay
docker-compose down
# Backup database
tar -czf $BACKUP_DIR/skatespots-relay-$DATE.tar.gz db/
# Start relay
docker-compose up -d
# Keep only last 30 days
find $BACKUP_DIR -name "*.tar.gz" -mtime +30 -delete
echo "Backup complete: skatespots-relay-$DATE.tar.gz"
Run weekly via cron:
crontab -e
# Add: 0 3 * * 0 /home/umbrel/backup-relay.sh
Troubleshooting
Spots not publishing?
- Check relay is running:
docker ps | grep skatespots-relay - Check relay logs:
docker-compose logs | tail -50 - Test connection:
wscat -c YOUR-RELAY-URL - Verify app is using correct URL (check Settings > Nostr Relays)
Relay using too much resources?
# Check resource usage
docker stats skatespots-relay
# Adjust limits in docker-compose.yml:
services:
skatespots-relay:
deploy:
resources:
limits:
memory: 1G
cpus: '0.5'
Spam appearing?
# Tighten WoT settings:
# Edit .env:
MINIMUM_FOLLOWERS=3 # Increase from 1 to 3
# Restart relay:
docker-compose restart
Next Steps
- ✅ Deploy relay on Umbrel
- ✅ Choose access method (Tailscale/Cloudflare/Tor)
- ✅ Update app configuration with relay URL
- ✅ Test spot creation
- ✅ Invite your skate crew
- ✅ Monitor and adjust as needed