Deploying BTCPay Server
You're losing up to 3% of turnover to Stripe fees and risking account freezes for crypto payments? A self-hosted BTCPay Server solves both: you control the keys and pay no middlemen. But deploying this stack isn't docker compose up. Bitcoin Core (600+ GB disk), NBXplorer, PostgreSQL, LND, and nginx with Let's Encrypt—each part needs tuning for your VPS.
We help customers deploy BTCPay Server in 2–4 hours for a basic install. With Lightning, it takes up to three days including mainnet sync. Below are the technical details and our approach, which saves up to 30% on fees and eliminates dependence on payment gateways. For example, at $50,000 monthly turnover, Stripe fees would be $1,500, while accepting via BTCPay incurs only network fees (~$10)—a monthly saving of $1,490.
Problems We Solve
Bitcoin Core sync stalls launch for 48 hours. Without optimized pruned mode or snapshots, you wait for the full blockchain download via p2p. We use pre-synced nodes and parallel downloads to cut time to 6–12 hours.
Lightning Network requires inbound liquidity. To accept payments through channels, you need inbound capacity. We set up peer connections with ACINQ, WalletOfSatoshi, and services like Lightning Pool—you get a working node without extra cost.
Without backup automation, you can lose channels. Static Channel Backup (SCB) must be copied every hour. We set up cron scripts that upload channel.backup to S3—automatically with versioning. Data from official LND documentation.
How We Deploy the Stack
Basic installation via the official script—one command block:
# Install dependencies and fetch installer apt-get update && apt-get install -y curl git curl -sSL https://btcpayserver.org/install.sh | sudo bash -s -- -c mainnet -l lnd -r nginx But better to do it manually—full control over versions and parameters:
git clone https://github.com/btcpayserver/btcpayserver-docker cd btcpayserver-docker export BTCPAY_HOST="pay.yourdomain.com" export NBITCOIN_NETWORK="mainnet" export BTCPAYGEN_CRYPTO1="btc" export BTCPAYGEN_LIGHTNING="lnd" export BTCPAYGEN_REVERSEPROXY="nginx" . ./btcpay-setup.sh -i We add the opt-save-storage snippet for pruned mode if a full node isn't needed.
DNS and HTTPS Configuration
Before deployment, ensure a DNS A record for pay.yourdomain.com points to your VPS. Verify: dig +short pay.yourdomain.com. Let's Encrypt will obtain a certificate automatically—the nginx reverse proxy in the config is already set up.
How to Speed Up Bitcoin Core Sync?
The main time sink is downloading the blockchain. Regular p2p sync takes 48 hours at 100 Mbps. Use pruned mode (256 MB instead of 650 GB) or download a snapshot from a trusted source to cut to 6 hours. In practice, we use pre-synced VPS images with Bitcoin Core ready.
| Option | Sync Time | Disk Space | Recommendation |
|---|---|---|---|
| Full node | 48 hours | 650+ GB | Only if you need old transactions |
| Pruned mode (256 MB) | 48 hours, no rescans | 256 MB | Saves space, but cannot rescan |
| Snapshot | 6–12 hours | 650 GB (or pruned) | Best for fast start |
Why Self-Hosted BTCPay?
You fully control private keys and customer data. No monthly payment gateway fees—only VPS cost and Bitcoin network fees (Lightning Network allows instant micro-payments with fees under 1 satoshi). Plus, BTCPay integrates with Lightning Network, a second-layer protocol for instant transactions.
Lightning Implementation Choice: LND vs CLN
| Parameter | LND | CLN |
|---|---|---|
| Language | Go | C |
| API | REST + gRPC | JSON-RPC, plugins |
| BTCPay support | full | full |
| Binary size | ~20 MB | ~5 MB |
| Third-party integrations | wide (OpenNode, Strike) | limited |
For most projects, we choose LND: more ready libraries and full BTCPay support. CLN for custom scenarios.
Simplified Installation Process
- Prepare VPS: Ubuntu 22.04, sudo user, firewall (ports 80, 443, 9735).
- Deploy BTCPay: run the commands above, wait for
btcpay-setup.shto finish. - Initialize Lightning: create a wallet, get an address and fund it.
- Open channels: connect to hubs, direct liquidity.
- Set up monitoring: health check (
curl https://pay.yourdomain.com/health) and uptime alerts.
Detailed command to open channels
docker exec -it $(docker ps -q -f name=lnd) lncli --network=mainnet openchannel --node_key=03... --local_amt=1000000 Ensure lnd is synced (lncli getinfo).
Checklist of Common Mistakes
- DNS not updated: BTCPay won't generate a certificate; Lightning won't start (requires WSS).
- Too small disk: pruned mode can only be enabled before first sync—changing later is tricky.
- No inbound channels: Lightning cannot accept payments. Open channels with nodes that have inbound capacity.
What's Included
We deliver:
- A ready BTCPay Server with Bitcoin Core and Lightning (LND).
- Automatic SCB backups every 4 hours.
- Monitoring: health endpoint and uptime alerts.
- Documentation describing architecture and access.
- 7 days technical support after deployment (including channel assistance).
- Admin training: wallet management, channel opening, software updates.
Our team has over 5 years of blockchain development experience and has deployed 20+ nodes for stores and DeFi projects. All projects come with a 99.9% uptime guarantee.
Contact us for a consultation—we'll help choose a VPS and prepare the infrastructure turnkey. Get BTCPay Server deployment and start accepting crypto payments without intermediaries.
Estimated Timelines
- Basic setup (no Lightning): 2 to 4 hours.
- Full stack with Lightning: 1 to 3 days (including sync).
- Integration with existing infrastructure: discussed individually.
Cost is calculated per your scenario: transaction volume, Lightning need, additional coins. Reach out and we'll send a commercial proposal.







