The admin password is generated and logged on first start and the nsec is set from the admin UI; ADMIN_PASSWORD/NSEC in .env are only a legacy seed. Update the README, quickstart, configuration, and deployment docs to match, and drop the unused ADMIN_KEY environment variable.
3.5 KiB
Quick Start
Start earning Bitcoin by selling AI access in under 5 minutes.
What You'll Build
A Routstr Provider Node acts as a gateway that:
- Connects to upstream AI providers (OpenAI, Anthropic, OpenRouter, etc.)
- Accepts Bitcoin payments via Cashu eCash
- Serves AI requests to clients on the network
You bring the API keys, Routstr handles the billing, payments, and client management.
!!! tip "Future: Node-to-Node Routing" In future versions, you'll be able to run a node that connects to other Routstr nodes—eliminating the need to configure upstream providers yourself. For now, you'll need your own API credentials.
Prerequisites
- Docker installed
- API credentials from at least one AI provider (OpenAI, Anthropic, OpenRouter, etc.)
1. Prepare Configuration
Create a .env file in the root of the project to store your secrets:
# Encrypts node secrets at rest. Optional — if unset, the node generates a key on
# first start and prints it once (back it up).
ROUTSTR_SECRET_KEY=
# Node Identity
NAME="My AI Node"
DESCRIPTION="Fast access to models"
# Lightning Payouts
RECEIVE_LN_ADDRESS=yourname@wallet.com
The admin password is generated and logged once on first start (read it from the
logs to sign in), and your Nostr identity (nsec) is configured afterwards from
the admin UI — both are stored encrypted in the database, not in .env.
(ADMIN_PASSWORD / NSEC are still read once as a legacy seed for existing
deployments.)
2. Start the Node
The recommended way to run Routstr is using Docker Compose, which handles the node, the UI, and optional services like Tor.
docker compose up -d
Verify it's running:
curl http://localhost:8000/v1/info
Build from Source (Optional)
If you've cloned the repository and want to build the images yourself:
docker compose build
docker compose up -d
3. Configure via Dashboard
Open the Admin Dashboard at http://localhost:8000/admin/.
!!! note "Login" On first start the node generates an admin password and logs it once — read it from the container logs to sign in. You can change it afterwards from Settings → Security.
Connect Your AI Providers
- Navigate to Settings → Upstream
- Enter your upstream URL (e.g.,
https://api.openai.com/v1) - Enter your API key
- Save
Set Your Profit Margin
- Go to Settings → Pricing
- Configure your markup (default is 10%)
- Optionally set a fixed price per request instead
Secure the Dashboard
- Go to Settings → Admin
- Set a strong password
- Save and re-login
3. Start Earning
Once configured, your node is live. Clients pay you in Bitcoin (via Cashu tokens) for every AI request.
Monitor Your Earnings
The dashboard shows:
- Total Wallet: All Bitcoin held by your node
- User Balances: Funds belonging to active client sessions
- Your Balance: Your profit (
Total - User Balances)
Withdraw Profits
- Go to Withdraw in the dashboard
- Select amount and mint
- Generate a Cashu token
- Redeem to your Lightning wallet
Next Steps
- Deployment: Production setup with Docker Compose and Tor
- Dashboard Guide: Full reference for all dashboard features
- Pricing: Configure pricing strategies and per-model overrides
- Discovery: Announce your node on Nostr for clients to find you