stablerails
Self-hosted, non-custodial stablecoin payments. Software you run. Rails you own.
$ npx stablerails init
[1/6] Checking database connectivity... OK[2/6] Operator account... created[4/6] Payment event... created[6/6] Magic login link... minted (single-use, 15 min){"data":{"id":"inv_9f2c41d0","status":"pending","amountUsdt":"27.310000","payAddress":"TWd4…n5pQ"}} [watcher] solid block 83 412 907 · two RPCs agree status: payment_detected receipt confirmed by BOTH providers → status: paid [webhook] 200 · X-Stablerails-Signature: sha256=9f2c… $ sweep requires your passphrase, at your terminal. that part stays human.
Hand it to your agent: /agents → · or pay in the live demo →
No signup, nothing to cancel. You only pay network gas. Not for you? Delete the directory.
How it works
Run the watch-only server
Runs 24/7 on your own VPS (a $5 box is enough): hosted checkout, API, dashboard, chain watcher. No keys on it: the worst misconfiguration is a stalled invoice, never lost funds.
Every invoice gets its own deposit address
A fresh HD address per invoice. Confirmed at a solid block (~1 min on Tron), then your webhook fires. Never 0-conf.
Funds sweep to your wallet, signed locally
Signed on your machine, behind a passphrase you type at your own terminal. The server only sees the finished transaction.
init → first invoice: ~5 min · payment → confirmed: ~1 min · sweep: whenever you decide
Keys never leave your machine.
Security model
Your server cannot steal your funds. Neither can your AI agent.
- Watch-only server
- Zero keys on the server. Full compromise, worst case: the attacker reads invoice metadata. Funds untouchable.
- Signing is local, human, deliberate
- Sweeps are signed only via the local CLI, behind a human passphrase, with optional Touch ID. No passphrase, no movement.
- Destination pinned locally
- The sweep destination is pinned on your machine. A fully compromised server cannot redirect a sweep to an attacker.
- Two RPCs must agree
- Two providers must read the same on-chain receipt at a solid block. Disagree: nothing credits, retry next tick. Never a false 'paid'.
- AI agents get readonly keys
- Agents can run your store: create invoices, read events, watch sweeps. They physically cannot move your money.
- 100% open source
- Every line is public, signer included. 1,000+ offline tests: clone, run, audit.
- Survives the project
- AGPL-3.0 is irrevocable. Repo gone tomorrow? Your instance keeps running, anyone can fork. You depend on the code on your disk, not on us.
- Zero exit cost
- Funds already in your wallet, data in your Postgres. Stop the containers, walk away. No account to close.
Built for the agentic web
MCP server out of the box. Machine-readable /llms.txt. JSON output everywhere. An AI agent can install, configure and operate the whole stack, except the one thing it must never do: touch your passphrase.
Path A · you type
$ npx stablerails init
Path B · your agent reads
/agents.md →Everything an agent needs to install, configure and run an instance, plus a hard boundary: it never asks for your passphrase. On a readonly key, even a misled agent can't move funds.
What's in the box
HMAC-signed webhooks
Signed delivery with retries. Verify the signature, trust the event.
X-Stablerails-Signature: sha256=9f2c41d0…
Per-invoice HD addresses
A fresh deposit address for every invoice, derived from your xpub. No address reuse.
Hosted checkout + payment links
A ready checkout page with QR, countdown and live status. Share a link, get paid.
Multi-merchant tenancy
One instance, many stores. Scoped API keys per merchant.
Operator dashboard
Invoices, payments, sweeps and CSV export behind an operator login.
Kill-switch
Pause invoicing, watching or webhooks at runtime. Per area, no restart.
Prometheus metrics
First-class /metrics endpoint for your own monitoring. Your data stays yours.
Docker deploy
Server, worker and Postgres in one compose file. Up in minutes on a $5 box.
$ docker compose up -d
Just software
- account with us
- none, the only login is on your own server
- legal entity
- not required to run software
- bank account
- not needed
- approval
- no one to ask
- our fee
- $0, there is no fee code path
Run your own rails
$ npx stablerails init
Hand it to your agent: /agents → · or pay in the live demo →