Phoenixd: Running a Headless Lightning Node for Automated Payments
- 1. What Is phoenixd and Why Use It?
- 2. Installation & Basic Setup
- 3. Automated Liquidity Management
- 4. Using the HTTP API for Payments
- 5. Adding a User Interface (Optional)
- 6. phoenixd vs. Phoenix Wallet: Which Should You Use?
- 7. Advanced Tips & Tricks
- 8. Real-World Use Cases
- 9. Troubleshooting Common Issues
- 10. Future of phoenixd & Lightning
- Final Thoughts: Is phoenixd Right for You?
While the Phoenix Wallet mobile app provides a user-friendly interface, its server-side counterpart, phoenixd, offers a headless, API-driven Lightning node designed for automation, 24/7 uptime, and programmatic control.
Unlike the mobile app, phoenixd is optimized for servers, automated payments, and liquidity management, making it ideal for:
✅ E-commerce businesses accepting Lightning payments
✅ Developers building Lightning-powered applications
✅ Self-hosters running personal Lightning nodes
✅ Content creators monetizing via Value4Value (V4V) streams
In this guide, we’ll cover:
- What
phoenixdis and why you’d use it - Step-by-step installation & setup
- Automated liquidity management
- Using the HTTP API for payments
- Adding a UI (LNbits, Zeus, StartOS)
- Comparison:
phoenixdvs. Phoenix Wallet
1. What Is phoenixd and Why Use It?
phoenixd is a headless Lightning Network node developed by ACINQ, the team behind the Phoenix Wallet. While the mobile app is designed for casual users, phoenixd is built for:
- 24/7 uptime (critical for receiving payments)
- Automated liquidity management (no manual channel rebalancing)
- Programmatic control via HTTP API (ideal for developers)
- Server deployment (Linux, Docker, or bare metal)
Key Features
| Feature | Description |
|---|---|
| Automated Liquidity | Opens/resizes channels on-demand when receiving payments |
| HTTP API | Full control over payments, invoices, and channel management |
| Bolt12 & LNURL Support | Modern Lightning standards for recurring payments |
| Non-Custodial | You control your funds (no third-party risk) |
| Low Fees | Competitive routing fees + automated channel management |
Use Cases
🔹 E-commerce stores (accept Lightning payments without custodial risk) 🔹 Self-hosted Lightning nodes (for sovereignty and privacy) 🔹 Automated micropayments (e.g., API-based tipping, paywalls) 🔹 Value4Value (V4V) streaming (Podcasting 2.0, content monetization) 🔹 Lightning Network development (testing, building apps)
2. Installation & Basic Setup
Step 1: Download & Run phoenixd
phoenixd is available for Linux, macOS, and Windows (though Linux is recommended for servers).
Linux/macOS (Terminal)
- Download the latest release from GitHub Releases.
- Extract the archive:
tar -xzf phoenixd-<version>.tar.gz cd phoenixd-<version> - Run the daemon:
(First run generates a 12-word seed—BACK THIS UP!)./phoenixd
Windows
- Download the
.zipfile from GitHub. - Extract and run
phoenixd.exein Command Prompt. - Backup the seed (located in
%APPDATA%\Phoenix\seed.dat).
Docker (Recommended for Servers)
docker run -d --name phoenixd -v phoenix_data:/root/.phoenix -p 9740:9740 acinq/phoenixd
Step 2: Secure Your Seed & API Password
-
Seed Backup:
- Located at
~/.phoenix/seed.dat(Linux/macOS) or%APPDATA%\Phoenix\seed.dat(Windows). - Write it down offline—this is your only recovery method.
- Located at
-
API Password:
- Found in
~/.phoenix/phoenix.conf(auto-generated on first run). - Required for all HTTP API requests.
- Found in
Step 3: Configure for Mainnet or Testnet
By default, phoenixd runs on Mainnet. To switch to Testnet (for testing):
./phoenixd --testnet
(Useful for developers experimenting without real funds.)
3. Automated Liquidity Management
One of phoenixd’s killer features is automated liquidity management, which eliminates the need for manual channel rebalancing.
How It Works
- When you receive a payment that exceeds your inbound capacity,
phoenixdautomatically opens or resizes a channel to accommodate it. - Uses “splicing” (a Lightning feature that adjusts channel sizes without closing them).
- Fees apply (~1% + mining fees), but this is cheaper than manual management.
Checking Fees
Use the /getfees API endpoint (or check the official docs) for current rates.
Manual Channel Management (Optional)
If you prefer manual control, you can:
- Open channels via
/openchannel - Close channels via
/closechannel - Check balance with
/getbalance
(Most users let phoenixd handle liquidity automatically.)
4. Using the HTTP API for Payments
phoenixd does not have a GUI—instead, you interact with it via HTTP API (default port: 9740).
Authentication
All requests require:
- API Password (from
phoenix.conf) - Basic Auth in headers:
curl -u "api-password:" http://localhost:9740/getinfo
Key API Endpoints
| Endpoint | Description | Example Use Case |
|---|---|---|
/getinfo |
Node status, balance, channels | Check node health |
/createinvoice |
Generate a Bolt11 invoice | E-commerce checkout |
/payinvoice |
Pay a Bolt11 invoice | Automated payments |
/getfees |
Current liquidity fees | Cost estimation |
/openchannel |
Manually open a channel | Custom liquidity |
/closechannel |
Close a channel | Rebalancing funds |
/lnurlpay |
Pay via LNURL | Donations, subscriptions |
/bolt12offer |
Create a Bolt12 offer | Recurring payments |
Example: Receiving a Payment
-
Generate an invoice (Bolt11):
curl -u "api-password:" -X POST http://localhost:9740/createinvoice \ -H "Content-Type: application/json" \ -d '{"amountMsat": 1000000, "description": "My Store - Order #123"}'(Returns a
bolt11invoice string.) -
Customer pays via any Lightning wallet (e.g., Phoenix, Muun, Wallet of Satoshi).
-
Check payment status:
curl -u "api-password:" http://localhost:9740/listinvoices
Example: Sending a Payment
curl -u "api-password:" -X POST http://localhost:9740/payinvoice \
-H "Content-Type: application/json" \
-d '{"invoice": "lnbc100n1...", "maxFeeMsat": 5000}'
Modern Standards: Bolt12 & LNURL
- Bolt12: Enables recurring payments (e.g., subscriptions).
- LNURL: Simplifies payments with static QR codes (e.g., donations, PoS systems).
(See Phoenix API Docs for full details.)
5. Adding a User Interface (Optional)
While phoenixd is headless, you can add a UI layer for easier management:
| Tool | Description | Setup Guide |
|---|---|---|
| LNbits | Multi-user Lightning wallet with extensions (PoS, tips, etc.) | LNbits + Phoenixd Guide |
| Zeus Wallet | Mobile Lightning wallet that connects to your node | Zeus Setup |
| StartOS (Start9) | Self-hosted server OS with Phoenixd UI package | StartOS Phoenixd |
| Ride The Lightning (RTL) | Web UI for Lightning node management | RTL GitHub |
Example: Connecting LNbits to phoenixd
- Install LNbits:
git clone https://github.com/lnbits/lnbits.git cd lnbits docker-compose up -d - Configure LNbits to use
phoenixdas a funding source. - Now you have a web dashboard for invoices, users, and extensions!
6. phoenixd vs. Phoenix Wallet: Which Should You Use?
| Feature | phoenixd (Server) |
Phoenix Wallet (Mobile) |
|---|---|---|
| Uptime | 24/7 (ideal for receiving) | Only when app is open |
| Control | API / Command Line | GUI (Beginner-friendly) |
| Liquidity | Fully Automated | Fully Automated |
| Use Case | Businesses, developers, self-hosters | Casual users, mobile payments |
| Complexity | Medium (requires server knowledge) | Low (plug-and-play) |
| Cost | Free (self-hosted) | Free (but custodial liquidity) |
| Bolt12/LNURL | ✅ Full support | ✅ Full support |
| Hardware | Server/VPS/Raspberry Pi | iOS/Android |
When to Use phoenixd
✔ You need 24/7 uptime (e.g., accepting payments for a business). ✔ You want automated liquidity management without manual intervention. ✔ You’re a developer building Lightning apps. ✔ You prefer self-custody and programmatic control.
When to Use Phoenix Wallet
✔ You’re a casual user making occasional payments. ✔ You don’t want to manage a server. ✔ You prefer a simple, mobile-friendly UI.
7. Advanced Tips & Tricks
Optimizing for Low Fees
- Use
/getfeesto check current liquidity costs. - Set
maxFeeMsatin/payinvoiceto avoid overpaying. - Monitor routing fees via 1ML or Amboss.
Backup & Recovery
- Seed phrase (
seed.dat) is critical—store it offline. - Channel backups (
channel.backup) can restore funds if the node crashes. - Test recovery on Testnet before relying on Mainnet.
Security Best Practices
- Run
phoenixdbehind a firewall (only expose port9740to trusted IPs). - Use Tor for additional privacy:
./phoenixd --proxy=socks5://127.0.0.1:9050 - Regularly update to the latest version.
Monitoring & Alerts
- Use
/getinfoto check node status. - Set up cron jobs to log balance changes:
curl -u "api-password:" http://localhost:9740/getbalance >> /var/log/phoenixd_balance.log - Integrate with Telegram/Discord alerts using webhooks.
8. Real-World Use Cases
Case Study 1: E-Commerce Store
- Problem: High credit card fees (3%) and chargeback fraud.
- Solution:
- Deploy
phoenixdon a VPS. - Integrate BTCPay Server for Lightning payments.
- Use LNbits for a customer-facing checkout.
- Deploy
- Result: 1% fees, instant settlements, no chargebacks.
Case Study 2: Podcaster (Value4Value)
- Problem: Monetizing content without ads.
- Solution:
- Run
phoenixdon a Raspberry Pi. - Generate LNURL-pay links for listeners to stream sats.
- Use Alby Extension for browser-based tips.
- Run
- Result: Direct fan funding with no middlemen.
Case Study 3: Self-Hosted Lightning Node
- Problem: Want full control over Lightning funds.
- Solution:
- Install
phoenixdon StartOS. - Connect Zeus Wallet for mobile management.
- Use Ride The Lightning (RTL) for a web dashboard.
- Install
- Result: Sovereign Lightning node with automated liquidity.
9. Troubleshooting Common Issues
| Issue | Solution |
|---|---|
| “Insufficient inbound liquidity” | Let phoenixd auto-open a channel (or manually open one). |
| API connection refused | Check if phoenixd is running (`ps aux |
| High routing fees | Use /getfees to find cheaper routes or open direct channels. |
| Channel stuck closing | Use /closechannel with force=true (last resort). |
| Seed phrase lost | Funds are gone. Always back up seed.dat. |
For more help, check:
10. Future of phoenixd & Lightning
phoenixd is actively developed by ACINQ, with upcoming features like:
- Better Bolt12 support (recurring payments).
- Improved liquidity algorithms (lower fees).
- Pluggable backends (e.g., LDK integration).
- Enhanced privacy (e.g., trampoline payments).
How to Stay Updated
- Follow ACINQ on Twitter.
- Join the Lightning Dev Kit (LDK) community.
- Monitor Phoenix GitHub.
Final Thoughts: Is phoenixd Right for You?
phoenixd is a powerful tool for anyone who needs:
✅ 24/7 Lightning payments (businesses, content creators).
✅ Automated liquidity (no manual channel management).
✅ Programmatic control (API-driven payments).
✅ Self-custody & privacy (no third-party risk).
If you’re new to Lightning, start with the Phoenix Wallet mobile app. But if you’re ready to take control of your payments, phoenixd is the ultimate self-hosted solution.
Next Steps
- Install
phoenixdon a test machine (or Testnet). - Experiment with the API (
/createinvoice,/payinvoice). - Integrate with LNbits or BTCPay Server for a full payments stack.
- Join the Lightning community for support and ideas.
Further Reading & Resources
- Phoenixd Official Docs
- Lightning Network Explainer
- BTCPay Server + Phoenixd Guide
- LNbits Documentation
- StartOS Phoenixd Base Hub Cache
Start Building A Project With Whatever You Have
Now that you understand phoenixd, what will you build with it?
- A self-hosted Lightning PoS system?
- A Value4Value podcasting setup?
- An automated Bitcoin savings plan?
The possibilities are endless—happy stacking! 🚀