Built and self-hosting a paid Nostr relay and a NIP-90 Data Vending Machine on a small VPS.
Relay: wss://5.78.129.127.nip.io/relay
- 1,000 sats (Lightning) for lifetime write access, free reads
- Custom Node.js + SQLite (WAL mode) implementation
- NIP-42 AUTH + automated Lightning invoicing via Coinos
- ~27MB RAM usage
- NIPs: 01, 02, 04, 09, 11, 12, 16, 20, 33, 42
DVM (Data Vending Machine):
- NIP-90 content extraction service
- 100 sats per URL extraction request
- Auto-generates Lightning invoices, delivers results as kind 6300 events
- ~38MB RAM
Both run as systemd services with auto-restart. Total infrastructure cost: one small VPS. Payment flow is fully automated — no manual intervention.
The paid relay model works well for spam prevention while generating passive income. Happy to share technical details if anyone is interested in running something similar.
Stack: Node.js, ws, better-sqlite3, nostr-tools, nginx reverse proxy, Let’s Encrypt SSL
You must log in or # to comment.