How to Set Up BTCPay Server on LunaNode (Step-by-Step)
Running your own BTCPay Server means you control the entire payment stack. No middlemen, no custodians, no one who can freeze your funds or shut you down. LunaNode is one of the best hosting providers for this job because they accept Bitcoin for payment, offer a dedicated one-click BTCPay launcher, and run solid hardware at fair prices.
This guide walks you through the full process: from creating a LunaNode account to having a working BTCPay Server with SSL, a synced Bitcoin node, and optional Lightning Network support. Be honest with yourself about the time commitment. Budget 2-4 hours minimum for the initial setup, and expect the Bitcoin blockchain to take several additional hours to fully sync in the background.
You should be comfortable with basic command-line operations, editing DNS records, and waiting for things to finish. If any of that sounds unfamiliar, read through the whole guide first before deciding.
Why LunaNode for BTCPay Server
There are plenty of VPS providers out there. LunaNode stands out for a few reasons specific to this use case:
- Bitcoin-friendly — they accept BTC as payment, which matters if you are trying to build Bitcoin-native infrastructure
- One-click BTCPay launcher — LunaNode maintains a dedicated deployment tool at
launchbtcpay.lunanode.comthat handles the Docker setup automatically - Good performance — their VMs run on fast SSD storage, which is critical for Bitcoin node sync times and database performance
- Reasonable pricing — a VM suitable for BTCPay Server costs roughly $10-20/month depending on your RAM and storage needs
- Canadian company — operates under Canadian privacy laws, which is a plus for those who care about jurisdictional risk
Other providers like Digital Ocean or Hetzner work fine too, but LunaNode's one-click launcher removes a significant chunk of the manual Docker configuration work.
Prerequisites
Before you start, make sure you have these ready:
- A domain name — you need a domain (or subdomain) to point at your BTCPay Server. Something like
btcpay.yourdomain.comworks well. You can buy one from Namecheap, Njalla, or any registrar. - DNS access — you need to be able to create A records for your domain. If you are using Cloudflare, make sure to set the record to "DNS only" (no proxy), otherwise SSL will break.
- A Bitcoin wallet — you will need your wallet's extended public key (xpub, ypub, or zpub) to connect to BTCPay. Hardware wallets like Trezor, Ledger, or ColdCard are recommended.
- An SSH client — Terminal on macOS/Linux, or PuTTY on Windows. You will need this for troubleshooting, though the launcher handles most of the heavy lifting.
- Patience — the Bitcoin blockchain is large. Initial sync takes several hours even on good hardware.
Step 1: Create a LunaNode Account
Go to lunanode.com and create an account. You will need to verify your email and add a payment method. They accept Bitcoin through their billing panel, which is the whole point.
Once your account is active, generate an API key. Go to your LunaNode dashboard, click on API in the left sidebar, and create a new key pair. Write down both the API ID and API Key — you will need them for the launcher. Keep these secret. Anyone with your API keys can create and destroy VMs on your account.
Step 2: Deploy with the BTCPay Launcher
Navigate to launchbtcpay.lunanode.com. This is the official one-click deployment tool maintained specifically for LunaNode.
Fill in the form:
- API ID and API Key — paste the credentials from Step 1
- Domain — enter the full domain you plan to use (e.g.,
btcpay.yourdomain.com) - VM plan — choose at least 2GB RAM for on-chain Bitcoin only. If you want Lightning Network support (and you probably do), go with 4GB RAM. The extra headroom matters when your node is syncing and processing Lightning payments simultaneously.
- Region — pick whatever is closest to you geographically
Click Launch. The tool will create a VM, install Docker, pull the BTCPay Server containers, and start everything. This takes about 5-10 minutes. When it finishes, you will see your VM's IP address. Write it down.
Step 3: Configure Your Domain DNS
Now go to your DNS provider and create an A record:
- Type: A
- Name:
btcpay(or whatever subdomain you chose) - Value: your VM's IP address from Step 2
- TTL: 300 (or Auto)
If you are using Cloudflare, set the proxy status to DNS only (grey cloud). BTCPay Server handles its own SSL via Let's Encrypt, and Cloudflare's proxy will interfere with that process.
DNS propagation can take anywhere from 2 minutes to 48 hours, though most records propagate within 15 minutes. You can check propagation status at dnschecker.org.
Step 4: Wait for Initial Sync
This is the part people underestimate. Your BTCPay Server is now running a full Bitcoin node, and it needs to download and verify the entire blockchain. On a 4GB LunaNode VM, expect this to take 6-12 hours.
You can check sync progress by SSHing into your VM:
ssh ubuntu@your-vm-ip-address
Then check the BTCPay logs:
sudo su -
cd /var/lib/waagent/custom-script/btcpay-setup
docker logs btcpayserver_bitcoind -f --tail 50
You will see log lines showing block height. Compare the current height to a block explorer like mempool.space to gauge progress. Do not try to create invoices or connect wallets until sync is complete — transactions will not be detected properly.
Step 5: Access BTCPay and Create Your Store
Once DNS has propagated, open your browser and go to https://btcpay.yourdomain.com. BTCPay Server's built-in Let's Encrypt integration should have already obtained an SSL certificate automatically. If you see a certificate warning, DNS may not have fully propagated yet. Give it more time.
On first visit, you will be prompted to create an admin account. This is the superuser account for your BTCPay instance. Use a strong password and save it in a password manager.
After logging in:
- Click Create Store and give it a name
- Go to Wallets > Bitcoin > Set up a wallet
- Choose Connect an existing wallet
- Enter your hardware wallet's xpub (or zpub for native SegWit). You can find this in your wallet software under "Account Public Key" or similar. Never enter your seed phrase or private key.
- BTCPay will derive addresses from your xpub and verify the derivation path. Confirm it matches your wallet.
Your store is now set up. When a customer pays an invoice, the Bitcoin goes directly to an address derived from your xpub. BTCPay never has your private keys.
Step 6: Set Up Lightning Network (Optional but Recommended)
Lightning gives your customers the option to pay instantly with very low fees. If you picked a 4GB VM, you have enough resources to run a Lightning node alongside the Bitcoin node.
In your BTCPay dashboard, go to Lightning > Settings. BTCPay supports multiple Lightning implementations. The default is LND, which works well for most setups.
After enabling Lightning, you need to manage channel liquidity. This is the trickiest part of running Lightning. You need inbound liquidity for customers to pay you. A few options:
- Open channels to well-connected nodes and hope for reciprocal connections
- Use a service like Lightning Terminal or Magma to purchase inbound liquidity
- Start with smaller channels and scale up as you learn the network
Lightning channel management is an ongoing task. Channels can close unexpectedly, routing fees need adjustment, and liquidity shifts over time. This is one of the more time-consuming aspects of self-hosting.
Post-Setup: SSL, Security, and Configuration
With the launcher deployment, several things are handled automatically:
- SSL certificates — Let's Encrypt certificates are obtained and renewed automatically via the
letsencrypt-nginx-proxy-companioncontainer - Docker networking — all services run in isolated containers with proper networking configured
- Firewall basics — only necessary ports are exposed (80, 443, 9735 for Lightning)
You should still take a few extra steps:
- Disable SSH password auth — edit
/etc/ssh/sshd_configand setPasswordAuthentication noafter adding your SSH public key - Enable automatic security updates — run
sudo dpkg-reconfigure -plow unattended-upgrades - Set up a firewall —
sudo ufw allow 22,80,443,9735/tcpthensudo ufw enable
Ongoing Maintenance
Self-hosting is not "set and forget." Here is what you need to stay on top of:
Updates
BTCPay Server releases updates regularly. To update, SSH into your server and run:
sudo su -
cd /var/lib/waagent/custom-script/btcpay-setup
./btcpay-update.sh
Check the BTCPay Server release notes before updating. Breaking changes do happen occasionally, especially with major version bumps.
Backups
Your BTCPay data lives in Docker volumes. The critical data includes your store configuration, invoice history, and Lightning channel state. BTCPay has a built-in backup feature accessible from Server Settings > Maintenance, but you should also set up automated off-server backups.
Lightning channel backups are especially important. If your server dies and you do not have a recent channel backup (SCB file), you can lose funds stuck in channels. LND stores the SCB at:
/var/lib/docker/volumes/generated_lnd_bitcoin_datadir/_data/data/chain/bitcoin/mainnet/channel.backup
Copy this file to a separate location regularly. Some operators use a cron job that backs it up to a remote server every hour.
Lightning Channel Management
Channels need active management. Monitor your channels for:
- Stuck or inactive channels — peers go offline, channels become unusable
- Liquidity imbalance — you need inbound capacity to receive payments
- Fee settings — routing fees affect whether your node gets traffic
- Force closures — these lock up funds for days, check the
pendingchannelsoutput
Tools like Balance of Satoshis and ThunderHub (which can run alongside BTCPay) make channel management much easier.
Monitoring Uptime
If your BTCPay Server goes down, you cannot receive payments. Set up a simple uptime monitor using a free service like UptimeRobot or Hetrix Tools. Point it at your BTCPay URL and configure email or Telegram alerts.
Cost Breakdown
Here is what you are looking at monthly:
- LunaNode VM (4GB RAM) — ~$16-20/month
- Domain name — ~$10-15/year ($1/month roughly)
- Your time — a few hours per month for updates, monitoring, and channel management
Total infrastructure cost: roughly $17-21/month. That does not account for the time you spend maintaining everything, learning how Lightning works, troubleshooting Docker issues at 2am when a container decides to crash, or recovering from a failed update.
Is Self-Hosting Right for You?
Self-hosting BTCPay on LunaNode is a great option if you enjoy running infrastructure, want to learn how Bitcoin works at the protocol level, and do not mind being your own sysadmin. It is genuinely rewarding to run your own Bitcoin and Lightning node.
But be realistic. If your primary goal is to accept Bitcoin payments on your WooCommerce store, the server infrastructure is a means to an end. Every hour spent on Docker troubleshooting, DNS debugging, and channel rebalancing is an hour not spent on your actual business.
If this sounds like too much work, Wootoshi handles all of this for you.
Our SME tier ($79/month) gives you a dedicated BTCPay Server on its own infrastructure. We handle the deployment, updates, backups, SSL, Lightning channel management, and WooCommerce integration. You get the same non-custodial, zero-fee Bitcoin payments without any of the DevOps work. Setup takes 48 hours.
Get Started with Wootoshi