Paygress
Pay-per-use compute with Lightning + Nostr. No accounts, no signups.
https://github.com/user-attachments/assets/627d2bb1-1a9b-4e66-bc42-7c91a1804fe1
Paygress is a marketplace where anyone can buy or sell compute resources using Cashu ecash tokens. Providers advertise on Nostr, consumers discover and pay - all anonymous, all instant.
What you can do
In plain English, what Paygress lets a user do today:
- Rent a Linux container by the second. Hand it a prepaid voucher, get a container running on someone else's machine. No signup, no credit card, no email. The container shuts down when the voucher runs out; extend the lease anytime by handing over another voucher.
- Pick from five ready-made boxes. Generic Python + Node sandbox (with a built-in HTTP exec endpoint — run code without SSH); AI inference endpoint (Ollama, OpenAI-compatible API); Nostr relay; disposable headless Chrome; Bitcoin node.
- Run code inside the sandbox without SSH. The agent-sandbox template ships with a bundled HTTP exec server. POST a command, get back stdout/stderr/exit code. Same credentials as SSH, no extra setup.
- Run many containers in parallel. One command spawns N containers, splits a single voucher N ways automatically, hands you a JSON manifest with each one's address. Built for batch jobs (render farms, ML batch inference), CI matrices (one runner per OS/version), and map-reduce workloads.
- Long-running services with automatic failover. Pay 3 hosts at once (one primary, two standbys). The primary runs the actual container and pings the network every minute. If it stops pinging — machine crashed, network died — the first standby takes over within ~30 seconds, becomes the new primary. (V1 caveat: best-effort single-writer for ~30s during failover; ideal for relays / stateless services, see PR #43 for the full story.)
- Let AI assistants do all this for you. A built-in MCP server plugs into Claude Desktop, Cursor, Cline, Claude Code with one config block. The assistant gets six tools: discover providers, spawn a sandbox, fan out N spawns, monitor a lease, extend a lease, and run code inside the sandbox. So Claude can say "let me run that for you" and within seconds has actually executed your code in a sandbox it paid for itself.
- Become a host yourself. Run the provider command on a Linux box you own and start renting compute to anyone with vouchers. Heartbeats publish your availability; consumers find you through discovery. You earn vouchers per second of compute served.
Prerequisites
Install Rust via rustup:
|
Install required system libraries (Ubuntu/Debian):
&&
Install
For Consumers
1. Find a provider
# Browse all providers on Nostr
# Filter and sort
# Get details on a specific provider
2. Spawn a workload
Get a Cashu token from a wallet like Nutstash or Minibits, then:
SSH credentials are auto-generated and displayed after provisioning. You can also set them explicitly with --ssh-user and --ssh-pass.
The CLI auto-generates a Nostr identity at ~/.paygress/identity on first use.
3. Connect
4. Check status
HTTP Mode
For centralized deployments (Kubernetes + Nginx L402 paywall), pass --server instead of --provider:
For Providers
Quick Start: One-Click Bootstrap
Set up any Linux VPS as a provider with a single command:
# With SSH password (requires sshpass: apt install sshpass / brew install hudochenkov/sshpass/sshpass)
# With SSH key (no extra dependencies)
This will SSH into your server, install LXD (on Ubuntu) or Proxmox (on Debian), compile Paygress, configure a systemd service, and start broadcasting offers to Nostr.
Requirements: Linux with systemd, root/sudo access. Public IP recommended (or use WireGuard tunnel below).
Manual Setup
# 1. Setup (generates config at provider-config.json)
# 2. Start
# 3. Check status
Provider Management
# Stop the service
# View live logs
# Reset (remove all Paygress data from a server)
Running Behind NAT (No Public IP)
If your machine doesn't have a public IP (e.g., home server behind a router), use a WireGuard VPN tunnel to get one:
# Install WireGuard (Ubuntu/Debian)
# Pay for a VPN tunnel with a Cashu token
This installs WireGuard (if needed), downloads a VPN config, starts the tunnel, and updates your provider config with the public IP and port range. Restart the provider service after:
Your provider is now reachable through the VPN tunnel. Consumers SSH to the tunnel's public IP.
Supported Backends
| Backend | Best For | Status |
|---|---|---|
| LXD | Ubuntu VPS, bare metal | Verified |
| Proxmox | Home labs, Debian servers | Verified |
| Kubernetes | Scalable cloud (HTTP/L402 mode) | Beta |
Architecture
Decentralized (Nostr + LXD/Proxmox): Provider publishes offers (Kind 38383) and heartbeats (Kind 38384) to Nostr relays. Consumer sends encrypted spawn request with Cashu token. Provider verifies payment, creates container, returns SSH credentials - all via encrypted Nostr DMs.
Centralized (Kubernetes):
Nginx with ngx_l402 validates Cashu tokens. Paygress provisions K8s pods with SSH access. Clients interact via HTTP API.