A BTCPay Server backup and restore is two separate jobs: the data backup (database plus the BTCPay config directory) that holds your store settings, users, and wallet derivation schemes, and the seed phrase or xprv for your on-chain wallet. Most failed restores come from treating them as one file. If you have the database, the config files, and the wallet seed, you can rebuild a store on new hardware in about 15 minutes and nothing on the checkout side changes.
TL;DR:
- Two backups, not one: the database and config directory hold store settings, the seed phrase holds the money. You need both.
- BTCPay's built-in backup produces a single encrypted .tar.gz of the database and data directory. If you have that file and the password, you can restore.
- The seed phrase alone does not restore store settings. The database alone does not let you spend. Neither one is a backup on its own.
- Backups are only worth having if you have restored one. Do a restore test on a spare server before you need it.
- Derivation schemes, API keys, Lightning node credentials, and webhook configs do not come back from a partial restore. Check each one after you rebuild.
Table of Contents
- What a BTCPay Server Backup Actually Contains, and What It Doesn't
- The Two Artifacts You Must Have, and Why Neither Is Optional
- How To Run the Built-In Backup, Step by Step
- How To Restore a BTCPay Server Without Losing Store Settings
- What Actually Breaks in a Restore, and How To Catch It Early
- Backing Up the Wallet, Store by Store
- Is BTCPay Secure, and What Backup Adds to That
- When a Managed BTCPay Server Is the Better Call
- Frequently Asked Questions
- Sources
What a BTCPay Server Backup Actually Contains, and What It Doesn't
A BTCPay Server backup that lets you restore store settings has to include the PostgreSQL database and the BTCPay data directory (the folder that holds your config, plugins, and generated files). Everything else is optional. The wallet seed phrase is stored elsewhere and is not part of that archive.
The BTCPay Server documentation describes the built-in backup as a database dump plus the data directory, compressed into one .tar.gz and encrypted with the password you set at creation; that is the file to keep. If you are still deciding whether to self-host, read the main guide on how to find, run, and keep your BTCPay Server safe first; this article assumes you already have one running.
What the archive restores:
- Store name, default currency, and payment settings
- Point-of-sale apps, crowdfund apps, and payment button definitions
- User accounts and their roles
- On-chain wallet derivation schemes and gap limits
- API keys for your e-commerce integration
- Plugin configuration, including Lightning node credentials
What it does not restore:
- Your wallet seed phrase or xprv (you need that separately)
- The BTCPay Docker images and the underlying server OS
- Reverse proxy config and your TLS certificate (usually handled by Let's Encrypt, but the domain has to be live again)
- Anything that lives outside the BTCPay container mount volumes
The Two Artifacts You Must Have, and Why Neither Is Optional
Treat the backup as two artifacts kept in two places. The archive lives on encrypted storage. The seed lives on paper or steel in a physical location that has nothing to do with your server. If both sit on the same VPS, a single failed provider wipes both.
The archive is encrypted with the password you set when you create it. BTCPay does not store that password. Lose it and the backup is a very large random number.
The database and data directory carry your store. Without them, you rebuild every setting by hand: every product, every store, every API key, every webhook URL. For a single store that is an afternoon. For a multi-tenant instance it is a week.
The seed phrase carries your funds. For a hot wallet (the default xpub setup with keys stored on the server), losing the seed means losing the ability to recover funds from an address you control. For a hardware wallet or xpub-only setup, the server never had your keys, and the standard wallet recovery applies. If you run a hot wallet, read BTCPay Server's guidance on hot wallet thefts in versions 2.4.1 and earlier: the team disclosed that the pre-2.4.1 code stored the hot wallet seed in a way that an attacker with server access could extract. Backup is not the same as wallet security.
The Lightning node credentials live in the data directory, but the funding is separate. If your node is LND, the lnd seed and the channel backup file (channel.backup) are what let you recover funds. If it is Core Lightning, the hsm_secret plus the channel.backup file do the job. Those sit in the Lightning volume, not always inside the standard BTCPay backup. Check that the backup script or Docker Compose file you are using includes them.
How To Run the Built-In Backup, Step by Step
The intended path is through the BTCPay Server UI: Server Settings > Maintenance > Backup. It prompts for a password, generates the archive, and offers it as a download. On a Docker deployment the archive lands in the container's btcpay volume.
1. Create the backup from the UI. Open Server Settings as a server admin (not just a store owner). Navigate to Maintenance, then Backup. Set a password you will remember. Download the archive to a machine that is not the VPS.
2. Verify the archive size is sane. A single-store instance with a few months of orders will be tens to low hundreds of megabytes. A single-digit-kilobyte archive is a failed dump. Check the logs.
3. Store two copies, in two places. One on encrypted cloud storage off the same provider as your VPS, one local. Rotate weekly if your store volume is high.
4. Repeat for the wallet seed, once. Write the 12- or 24-word seed by hand on paper. Do not photograph it, save it to a clipboard manager, or email it to yourself.
5. Log the password to the backup separately. A password manager entry, the managed service record, or a physical note in a safe. Not in the archive filename.
Pro Tip: Run the backup twice and compare file sizes. If the second run is dramatically smaller than the first, the database dump probably failed silently on the PostgreSQL connection, and BTCPay shipped an archive with only the data directory inside. Restoring that gets you an empty store with no order history.
How To Restore a BTCPay Server Without Losing Store Settings
Restore is the reverse: new server, matching BTCPay version, import the archive, redeploy the wallet. Do not try to restore onto a different major version than you backed up from, especially across the 2.x line where database migrations have changed. Check the BTCPay Server releases page for the exact version tag your backup came from.
Step by step:
- Provision a fresh server. Same or larger disk than the original, as chain size grows. If you run BTCPay in Docker, the standard install brings up the containers without a store.
- Stop the BTCPay container. Do not restore into a running instance.
- Upload the archive to the new server and uncompress it into a scratch directory.
- Drop and recreate the
btcpayserverdatabase. Then load the SQL dump. The archive contains the dump and the data directory side by side. - Copy the data directory over the fresh container's mount point. Preserve file ownership so the
btcpayuser can read it. - Start the container and open Server Settings > Maintenance > Restore. Upload the archive and enter the backup password. BTCPay runs the restore script and restarts the app.
- Log in as a server admin. Use the account from before the restore. Verify the store list, the wallet derivation scheme on every store, and the API keys on each integration.
- Recover the Lightning node. Drop the
channel.backupfile into the new node's directory before it starts syncing channels, or run the SCB restore command. Without it, channels close on-chain and you wait out the timelock. - Reconnect the wallet seed. On a hot wallet, paste the seed or xprv into the store's wallet settings. On a watch-only store, paste the xpub. Confirm the derivation scheme matches the one recorded in the backup or you will see a different set of addresses and zero balance.
- Test a small invoice. One satoshi or the minimum your currency supports. Confirm the payment detection works before you send traffic.

What Actually Breaks in a Restore, and How To Catch It Early
Most restore failures fall into a small set of patterns. Knowing them turns a two-hour outage into a fifteen-minute one.
Derivation scheme mismatch. The store shows a balance of zero after restore. That usually means the xpub you entered is from a different account index (BIP44/49/84 account 0 vs account 1), or the backup restored a store that expected a different address format. Compare the store's receive addresses in the backup with the ones the new instance shows. If the first receive address differs, stop and fix the xpub before you accept any payments.
API key invalidated. Webhooks fail silently. Confirm each integration on the API Keys page still resolves, then send a test event from the store's notification settings.
Lightning channels force-closed. The channel backup was not restored in time, or it was restored to a node with a different nodeid. The on-chain force-close is safe but slow, and you pay the on-chain fee. LND's channel backup documentation explains the timelock. Keep the channel.backup file in a place that updates automatically, not a folder you only sync monthly.
Reverse proxy breaks. The domain resolves but the app redirects in a loop. Check the BTCPAY_ROOTPATH and BTCPAY_EXTERNALURL environment variables against what you set on the old server, then restart NGINX and the app.
Database user password no longer matches. The dump restores, the app starts, and login fails. The database role in the dump has a different password than the environment variable in your new docker-compose.yml. Update the compose file or ALTER ROLE to match.
Test a restore on a spare €5 VPS once a quarter. If you have never restored, you do not have a backup.
Backing Up the Wallet, Store by Store
Every store on a BTCPay instance has its own wallet. Back them up individually even though the database archive captures the derivation scheme, because the derivation scheme is not the private key.
| Store type | What to keep | Where | Frequency |
|---|---|---|---|
| Hot wallet (xprv on server) | Seed phrase (12/24 words) | Paper or steel in a safe | Once, at creation |
| Watch-only (xpub) | xpub + derivation scheme | Password manager | Once, plus after any change |
| Hardware wallet | Device seed + xpub | Device maker's method | Once, at setup |
| Lightning (LND) | channel.backup |
Auto-synced off-server | Continuous |
| Lightning (Core Lightning) | hsm_secret + channel.backup |
Offline encrypted | After each channel open |
The store wallet settings page shows the derivation scheme. Screenshot it and put it in the same folder as your backup archive. It is the single setting that, if you get it wrong on restore, makes the store look empty and drives people to panic.
If you accept several coins, note that chain and wallet support is set per store. BTCPay's default install enables Bitcoin first; other coins are added through the "Modify" button on the store. Back those wallets up the same way and check the supported coins list is current before adding a new one, since support changes between versions.
Is BTCPay Secure, and What Backup Adds to That
BTCPay itself is open source and non-custodial, which means the security bar is set by how you run it. The server holds your node, the store database, and, in the default hot wallet setup, your private keys. A backup protects against server loss. It does not protect against a compromised server.
Run a watch-only or hardware wallet store for anything above a few hundred dollars in monthly volume. The BTCPay wallet setup guide covers both. A hot wallet convenience cost is real, and you should price it in.
Patch on the same cadence as your backup schedule. The 2.4.1 disclosure is the case study: a server running the pre-2.4.1 image had a hot wallet seed stored in a way an attacker could extract. Backups of a compromised instance preserve the compromise. Fix the version first, then back up.
Isolate the backup password from the backup file. Two-factor authentication on your storage provider, a password manager, and a printed copy of the password in a physical location is the pattern that survives the "my laptop was stolen" day.
Treat the server as production. If your store turns over real money, treat the uptime of that server with the attention you would give a checkout page. For a merchant, that is the point of self-hosting BTCPay. You own the risk and the recovery. For a broader comparison of what you save versus a custodial processor, how to navigate and eliminate third party fees lays out the arithmetic.
When a Managed BTCPay Server Is the Better Call
Hosting does not remove your responsibility for the wallet seed. If you lose that seed and the store is a hot wallet, no backup recovers the funds. The host can restore the store, but the seed is yours to keep. If you have not written it down, do that before you sign up. The
Frequently Asked Questions
Does the BTCPay Server built-in backup include my wallet seed?
No. The archive holds the database and data directory, which include the wallet derivation scheme but not the private key. Keep the seed phrase or xprv separately, in a physical location off the server. On a hot wallet, losing the seed means losing the ability to recover funds.
Can I restore a BTCPay Server onto a different version?
Not safely across major version jumps. Restore onto the same or a closely matching BTCPay version, especially within the 2.x line where database migrations have changed. Check the releases page for the exact version your backup came from before you start.
What happens to my Lightning channels if I restore without a channel backup?
They force-close on-chain. The funds are recoverable after the timelock expires, but you pay the on-chain fee and wait. Keep the LND or Core Lightning channel backup file synced off-server, not on the same disk as the node.
How often should I run a BTCPay backup?
Weekly for most single-store merchants, daily for high-volume or multi-store instances. Run a test restore once a quarter on a spare server. A backup you have never restored does not tell you whether it works.
Is BTCPay Server secure enough for a real store?
It is as secure as the way you run it. A hot wallet on a pre-2.4.1 version had a known seed exposure; the team patched it. Run the current release, use a watch-only or hardware wallet for meaningful volume, and treat the server as production infrastructure.
Do I need to back up Docker or the server OS?
No. Relying on a snapshot of the whole VPS is worse than the built-in backup: snapshots are slow to restore and may be tied to the provider. Rebuild the server from the standard Docker install, then restore the archive into it.
Sources
- BTCPay Server Docker deployment | BTCPay Server Docs
- BTCPay Server wallet setup | BTCPay Server Docs
- LND channel backup | Lightning Engineering
- BTCPay Server releases | GitHub