Skip to content

BTCPay Server Implementation

Technical implementation details for the BTCPay Server infrastructure and integrations.

🖥️ Infrastructure Setup

Server Specifications

  • CPU: 2 cores
  • RAM: 4GB
  • Storage: 64GB SSD + 5TB HDD
  • Bandwidth: Unlimited
  • OS: Linux (Ubuntu/Debian)
  • Docker: Containerized deployment

Network Configuration

  • Domain: btcpay.satoshihost.com
  • SSL: Let's Encrypt automatic renewal
  • Ports: 443 (HTTPS), 80 (HTTP redirect)
  • Firewall: Restrictive - only necessary ports open

🔧 BTCPay Server Configuration

Installation Method

  • Deployment: Docker Compose
  • Version: Latest stable release
  • Database: PostgreSQL
  • Reverse Proxy: nginx

Cryptocurrency Support

  • Bitcoin: Full node with electrum server
  • Lightning Network: LND implementation
  • Altcoins: Configurable (currently disabled)

Security Features

  • 2FA: Mandatory for admin accounts
  • API Keys: Rate-limited with scope restrictions
  • Wallet: Hardware wallet integration support
  • Backup: Automated seed phrase backup

🔗 Network Integrations

API Endpoints

https://btcpay.satoshihost.com/api/v1/

Project Integration Status

Project Integration Type Status API Usage
ClickForCharity Donation processing ✅ Active Webhook + API
DirectSponsor Sponsorship payments 🔄 Planned API integration
ROFLFaucet Prize payouts 🔄 Planned Bulk payments API
SatoshiHost Service billing ✅ Active Invoice API

Webhook Configuration

  • Endpoint: Project-specific webhook URLs
  • Events: Payment confirmed, payment expired
  • Security: HMAC signature verification
  • Retry: Automatic retry with exponential backoff

📋 Payment Workflow

Standard Payment Process

  1. Invoice Creation: Project creates invoice via API
  2. Payment Display: User sees Bitcoin address/Lightning invoice
  3. Payment Detection: BTCPay monitors blockchain
  4. Confirmation: Webhook notification to project
  5. Fulfillment: Project processes successful payment

Lightning Network Payments

  • Channel Management: Automated liquidity management
  • Routing: Connected to major Lightning nodes
  • Backup: Channel backup to prevent fund loss
  • Monitoring: Channel health monitoring

📋 Backup & Recovery

Automated Backups

  • Database: Daily PostgreSQL dumps
  • Wallet Seeds: Encrypted backup to secure location
  • Configuration: Docker compose and environment files
  • Frequency: Daily incremental, weekly full

Recovery Procedures

  • Server Rebuild: Complete infrastructure as code
  • Wallet Recovery: Hardware wallet + seed phrase
  • Data Restoration: Database restore from backup
  • Channel Recovery: Lightning channel backup restore

📊 Monitoring & Maintenance

Health Monitoring

  • Uptime: Included in network monitoring system
  • Performance: Response time and throughput tracking
  • Blockchain Sync: Bitcoin node synchronization status
  • Lightning: Channel balance and connectivity

Maintenance Schedule

  • Updates: Monthly security updates
  • Backups: Verified weekly
  • Logs: Rotated and archived monthly
  • Monitoring: 24/7 automated alerts

🔐 Security Considerations

Access Control

  • Admin Access: Multi-factor authentication required
  • API Access: Scoped keys with IP restrictions
  • Server Access: SSH key authentication only
  • Network: VPN required for administrative tasks

Operational Security

  • Hot Wallet: Minimal balance for operational needs
  • Cold Storage: Majority of funds in hardware wallets
  • Audit Trail: All transactions logged and monitored
  • Incident Response: Defined procedures for security events

Next: Goals & Objectives | Back: Project Overview