Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
A safe Core Lightning upgrade starts with three separate backups: the node’s hsm_secret (or its mnemonic/legacy representation), the current emergency.recover file, and a consistent copy of the channel database. None of these replaces the others. The HSM secret can restore on-chain keys, while the database preserves the changing state needed to operate, update, and close channels. Static channel recovery from emergency.recover is a peer-assisted last resort, not a normal database restore.
Before changing the software, identify the exact Core Lightning version, network, LIGHTNINGDIR, and wallet backend; preserve the old installation; stop lightningd before copying SQLite; and verify that your recovery materials are readable and stored separately. Core Lightning warns that upgrades often migrate the database and that downgrades are generally not possible afterward.
What must be backed up
Core Lightning’s wallet state is split across files and secrets with different jobs. The official Backup your wallet documentation treats them as distinct recovery materials.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →| Material | What it restores | What it cannot restore | When to update the backup |
|---|---|---|---|
hsm_secret, or the matching mnemonic/legacy representation |
On-chain keys and the ability to derive on-chain addresses and sign on-chain transactions | Detailed channel state or a complete record of funds held in currently open channels | Whenever the secret or its passphrase handling changes; keep the original backup permanently |
emergency.recover |
Static channel recovery with cooperation from channel peers, as a last resort | Routine channel operation, current HTLC state, and an independent unilateral recovery method | After each channel opening, because the file is updated when a new channel is opened |
| Lightning database, normally SQLite for installations using that backend | Detailed channel state needed for ongoing updates, cooperative closes, and normal operation | The private key material held in hsm_secret |
For every planned upgrade; copy it only with a consistency-safe procedure |
The HSM secret alone is therefore not a complete Lightning backup. A node can recover its on-chain wallet and still lack the state required to manage open channels. Conversely, a database without the matching secret cannot sign for the node’s funds.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Identify the node before touching files
- Record the running Core Lightning version. Use the version output or the node’s normal information command and save it with the backup. Version 25.12 is a significant boundary for secret format: new nodes created on v25.12 and later use a BIP39 12-word mnemonic, while earlier nodes use legacy representations.
- Record the network. The default Bitcoin-network directory is
~/.lightning/${COIN}; for Bitcoin mainnet the example is~/.lightning/bitcoin. An installation can override this location, so do not copy the example path blindly. - Determine
LIGHTNINGDIR. Check the service definition, startup options, container configuration, or environment used by the running daemon. Every subsequent path must point to this directory, not to a guessed default. - Identify the wallet backend. The backup procedure and any replication option depend on the backend and the Core Lightning release. Write down whether the node uses SQLite and note any configured database or replication files.
- Save configuration and operational details. Keep a copy of the node’s configuration, network, plugins, and service installation information alongside—but separately from—the secrets. These details make a later rebuild deterministic, but they are not substitutes for the secret and database backups.
Back up the HSM secret correctly
Protect the HSM material as if it were a private key. Anyone who obtains the necessary secret, and any required passphrase, may be able to access funds. Store the backup offline or in another access-controlled location, and do not put the words or raw key in a public repository, ticket, chat, or unencrypted shared folder.
Nodes created on v25.12 and later
For a node using the newer format, the official HSM Secret documentation describes a 12-word BIP39 mnemonic for new nodes. With the node’s actual directory substituted, the readable secret can be obtained with:
lightning-hsmtool getsecret $LIGHTNINGDIR/hsm_secret
Write the resulting 12 words down in the original order and verify them before shutting down the node. The documentation recommends secure physical storage. An optional durable mnemonic medium, such as a metal seed-phrase plate, can protect against paper loss or fire; it is a storage choice, not a Core Lightning requirement or a tested product recommendation.
When an HSM passphrase is enabled
A passphrase changes the recovery requirement. Preserve the mnemonic and the exact HSM passphrase as two separately protected items; both are needed to recreate the protected secret. Do not assume that a mnemonic by itself is sufficient.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
The exposesecret route is not universal. It requires the separately configured passphrase and is not available for passphrase-protected HSM secrets. Use the method documented for the node’s format and configuration rather than trying to bypass that protection.
Nodes created before v25.12
Older nodes store hsm_secret as a 32-byte binary file. The backup guide describes making a hexadecimal backup and reconstructing the binary file when restoring. The HSM guide also documents codex32 as a legacy readable format. Confirm which representation your node uses before recording or restoring anything; do not feed a legacy file into a mnemonic procedure or convert bytes by hand without checking the official instructions.
Keep an untouched copy of the original file and, if you make a readable transcription, verify it character by character. A readable format is still secret key material and must receive the same confidentiality protections.
Preserve emergency.recover for open channels
Copy $LIGHTNINGDIR/emergency.recover whenever the node has channels. This file is updated when a new channel is opened, so replace an older copy after channel topology changes. Keep the latest file with the date and the node identity, and retain the previous copy until the new one has been checked.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Static channel recovery is peer-assisted. It is intended for coins that are otherwise stuck in a channel and requires cooperation from the relevant counterparties. It does not contain the complete, continuously changing channel state and cannot replace a consistent database backup. If the database is lost while channels remain open, do not describe mnemonic restoration as a complete channel recovery; follow the official recovery procedure and be prepared to contact counterparties.
Back up the channel database without corrupting it
Do not make a casual snapshot of a live database file. The Core Lightning documentation explicitly says, “Snapshot-style backups of the lightningd database is discouraged, as any loss of state may result in permanent loss of funds.” A file copied while SQLite is writing can be incomplete or internally inconsistent, and a stale copy can omit channel-state changes.
Safe offline SQLite copy
- Announce a maintenance window. Routing and payments stop while the daemon is down. Make sure no automation will restart it during the copy.
- Stop
lightningdusing the same service manager or command that normally starts it. Do not merely close a terminal or kill a client connection. - Wait for the process to exit completely. Confirm that
lightningdis no longer running before reading the database. This allows SQLite to finish its writes and close cleanly. - Copy the database from the confirmed
LIGHTNINGDIR. Preserve file ownership, permissions, timestamps, and enough surrounding directory information to identify the version and network. Use a destination with restricted access. - Preserve SQLite sidecar files when the selected procedure requires them. The advanced backup documentation discusses journal/WAL files; do not delete or ignore them while SQLite may still depend on them.
- Record what was copied. Save the shutdown time, Core Lightning version, network, database filename, destination, and a checksum generated by your normal integrity process. A checksum proves that a copy has not changed; it does not prove that a live, inconsistent copy was usable.
- Start the daemon and check normal operation. Confirm that it opens the expected directory, reports the expected node identity, and sees the expected channels before proceeding with the upgrade.
The short outage is the trade-off for a straightforward, backend-supported copy. Never shorten it by copying the file while the daemon is still committing channel state.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Replication and secondary databases
The Advanced DB Backup documentation describes configurations involving a secondary database file and real-time replication development. Replication can reduce backup lag, but it introduces implementation-specific timing and failure cases. A replica is not automatically proof that every latest channel-state commitment has reached the backup at the moment a failure occurs.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Review the limitations for the exact Core Lightning release and backend. If you cannot demonstrate how the replica is made consistent and how it is promoted, use a stopped-node backup as the authoritative pre-upgrade copy.
Prepare for the upgrade and possible rollback
Use the same installation method for the upgrade that was used for the original installation, as described in Core Lightning’s Upgrade documentation. Before replacing binaries or packages:
- Keep the old, known-working installation available so it can be selected again if the new process fails before migration.
- Store the verified HSM backup, current
emergency.recover, and consistent database copy in separate protected locations. - Read the release notes for the target version and check its database changes, backend requirements, and plugin compatibility.
- Plan for downtime and ensure you know which service definition starts the intended binary.
Core Lightning warns: “Upgrades to Core Lightning often change the database: once this is done, downgrades are not generally possible.” Treat the first start of the new version as a migration point. Do not assume that reinstalling the previous binary will reverse a completed migration. The daemon normally rejects non-release upgrades unless database upgrades are explicitly enabled; avoid enabling non-release database upgrades casually, and only do so when the release’s instructions require it and a recoverable backup exists.
Free tools Windows power users keep installed
One-click scans. No signup required.
Restore after a failed upgrade or a new installation
Restore into the correct network directory and use procedures matching the installed release and backend. First stop the daemon, verify the target LIGHTNINGDIR, and preserve an untouched copy of every recovery file before replacing anything.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Restore the HSM secret
- Install the intended Core Lightning release without starting a node against the wrong directory.
- For a v25.12-or-later mnemonic backup, use the release’s documented recovery procedure. The backup guide documents restoring from the mnemonic with the
recoverRPC or recreatinghsm_secretwithlightning-hsmtool generatehsm. Supply the same HSM passphrase if one protected the original. - For a legacy node, reconstruct the 32-byte binary secret or use the documented codex32 representation, following the HSM Secret instructions for that format.
- Check file ownership and permissions, then start only the intended node directory.
The configuration reference for lightningd-config states that recover fails when an hsm_secret file already exists and that the node starts offline for manual recovery. Do not improvise by overwriting a live secret. If a file already exists, stop and determine whether it is the correct restored file before invoking recovery.
Restore the database
- Stop
lightningdand make a separate copy of the destination directory. - Place the verified database backup in the exact path expected by the selected release and backend. Preserve permissions and any required journal/WAL sidecars together.
- Restore the matching HSM secret before starting, including its passphrase.
- Start the daemon with the intended version and monitor logs for database migration, corruption, or network-directory errors.
- Verify node identity, wallet balances, channel list, peer connections, and the ability to perform a harmless read-only query before sending funds.
The database and secret must correspond to the same node and recovery point. A newer database opened by an upgraded release should not be treated as a candidate for a downgrade merely because the older binary is still available.
When the database is missing or uncertain
If channels were open and the database cannot be trusted, stop payment and routing activity while you assess recovery. The mnemonic or legacy HSM secret can recover on-chain keys, but it does not recreate channel history. Preserve emergency.recover, identify the affected peers, and use the official static-recovery process as a last resort. Expect peer cooperation; do not promise that every channel balance can be recovered without it.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesCommon mistakes and how to avoid them
- Copying only
lightningd.sqlite3: this omits the HSM secret and may omit required sidecar files or recent state. Keep all three backup classes. - Copying SQLite while the daemon runs: the result can be stale, incomplete, or corrupt. Stop the daemon and wait for exit.
- Calling a mnemonic a complete channel backup: it restores on-chain key material, not the operational state of open channels.
- Keeping an old emergency file: the file changes when channels open. Refresh it after topology changes.
- Losing the HSM passphrase: a mnemonic protected by that passphrase is not enough by itself. Store both separately and securely.
- Assuming every node has a 12-word seed: nodes created before v25.12 may use a 32-byte binary secret or codex32. Confirm the generation and format first.
- Starting recovery with an existing secret file: the
recoverRPC fails whenhsm_secretalready exists. Preserve the existing file and resolve the directory or format issue before proceeding. - Planning a casual downgrade: database migration can make rollback impossible. Treat the pre-upgrade backup as the recovery boundary and consult the target release notes.
- Treating a replica as automatically current: replication has timing and implementation caveats. Verify consistency or use a stopped-node copy.
A practical pre-upgrade checklist
- Version, network,
LIGHTNINGDIR, backend, and service start command recorded. - HSM format identified: v25.12-plus mnemonic or legacy representation.
- Mnemonic or legacy secret transcribed and checked; HSM passphrase stored separately when applicable.
- Latest
emergency.recovercopied for every node with channels. lightningdstopped cleanly before the database copy.- Database and required SQLite sidecars copied with restricted permissions.
- Backup locations, timestamps, and integrity checks recorded.
- Old installation retained and target release notes reviewed.
- After restart, node identity and channel visibility checked before upgrade.
The Bottom Line
Back up the HSM secret, the current emergency.recover, and a consistent channel database before upgrading Core Lightning. Stop the daemon for SQLite copies, preserve any HSM passphrase, and assume a migrated database cannot be downgraded safely. A mnemonic restores on-chain keys; only a matching database preserves normal channel operation, while static recovery remains a peer-assisted last resort.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

