⚡ How to Install BTCPay Server on Ubuntu 24.04 (Updated 2025 Guide)
If you want to fully control your cryptocurrency payments through your own server, BTCPay Server is an open-source, secure, and free solution. In this guide, we'll show you how to install BTCPay Server on Ubuntu 24.04 LTS step-by-step.✅ Minimum Requirements:
- 2 vCPU
- 2 GB RAM
- 60 GB SSD (more recommended)
- Ubuntu 24.04 LTS (64-bit)
🛠️ Step 1: Prepare the Server
Connect to your server via SSH. If you need an SSH client, you can use https://www.hatalar.com/resources/putty-indir.1/.
Run the following command to update the system:
Bash:
apt update -y && apt upgrade -y && apt autoremove -y && apt -y install wget nano curl
🌐 Step 1.1: Configure DNS Records
You need to create an A Record for your domain pointing to your server’s IP address.
For third-party DNS services like Cloudflare, manually add an A record as shown:
⚙️ Step 2: Run the BTCPay Server Installer
Create and navigate into the BTCPay folder:
Bash:
mkdir BTCPayServer
cd BTCPayServer
git clone https://github.com/btcpayserver/btcpayserver-docker
cd btcpayserver-docker
Start installation with this command (replace
btcpay.yourdomain.com with your own domain):
Bash:
export BTCPAY_HOST="btcpay.yourdomain.com"
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-s"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAYGEN_LIGHTNING="clightning"
export BTCPAY_ENABLE_SSH=true
. ./btcpay-setup.sh -i
Installation may take 20–30 minutes.
🔐 Step 3: Access Web Interface & Create Admin Account
Go to
https://btcpay.yourdomain.com in your browser. Create the first user (admin).⚙️ Step 4: General BTCPay Settings
Once logged in, configure your store:
- Login to your admin panel
- Go to "Store Settings" from the left menu
- Store Website: Add your website URL (e.g.,
https://www.example.com) - Branding: Upload your logo and customize the store appearance
- Payments > Additional Fee: Enable "
Add network fee to invoice" to pass transaction fees to customer
⚠️ If you are using BTCPay Server as a payment provider for XenForo, no extra customization is required here.
🧾 Checkout Experience Settings
Customize your checkout page:
- Custom HTML Title: e.g., "Hatalar.com Payment Page"
- Support URL: e.g., https://www.hatalar.com/misc/contact
- Only enable the payment method after user explicitly chooses it: Recommended
💸 Configure Network Fee Percentage
To add a % fee on top of payments:
- Go to Store Settings > Rates
- Set a value in "Add Exchange Rate Spread"
💰 Step 5: Configure Bitcoin Wallet
BTCPay supports two wallet options:
- I have a wallet: Use existing wallet
- Generate a new wallet: Advanced users only
This guide uses BlueWallet for XPUB integration.
- Install and open BlueWallet
- Create a new BTC wallet
- Export the XPUB key
⚠️ IMPORTANT: Save your 12-word recovery phrase securely.
Link BlueWallet to BTCPay Server
- Go to Wallets > Setup in BTCPay
- Choose “I have a wallet”
- Select “Enter extended public key”
- Paste your XPUB key and confirm
🔐 Security Tip: XPUB is safe to share for receiving payments only — no funds can be withdrawn with it.
⚡ Step 6: Lightning Network Integration
We will use Blink, a Turkish Lightning wallet that supports BTCPay integration.
- Download Blink from App Store or Play Store
- Register and verify your account
- Go to https://dashboard.blink.sv/api/auth/signin
- Create an API Key under API Keys
Connect Blink API to BTCPay Server
- Login to your BTCPay web panel
- Go to Manage Plugins
- Search for "Blink" and install it
- Restart BTCPay services
- Go to Lightning settings and add your Blink API key
✅ Blink will now receive Lightning payments made through your BTCPay Server.
✅ Final Step: Integrate with XenForo
To accept BTC payments for account upgrades in XenForo, install the following plugin and configure the API:
XenForo BTCPay Server Payment Provider
💰 XenForo BTCPay Server Payment Provider BTCPay Server is an open-source and secure payment infrastructure that lets you accept payments in Bitcoin and other cryptocurrencies. With the BTCPay payment provider add-on for XenForo, you can accept...
Once configured, test the integration:
Last edited: