LND Error updating from 0.4.0 beta 9 to 0.4.0 stable

I was running perfectly my Start9 machine in 0.4.0 beta 9. Everything was working perfectly.

I decided upgrade to stable version via OTA and when I was updating the packages to the newest version I got this error in LND package:

2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.074 [WRN] LTND: Config ‘bitcoin.active’ is deprecated, please remove it
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.074 [INF] LTND: Version Info rev=2b8788 version=0.21.1-beta commit=v0.21.1-beta debuglevel=production logging=info
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.074 [INF] LTND: Network Info rev=2b8788 active_chain=Bitcoin network=mainnet
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.075 [INF] RPCS: RPC server listening on 0.0.0.0:10009
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.080 [INF] RPCS: gRPC proxy started at 0.0.0.0:8080
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.080 [INF] LTND: Opening the main database, this might take a few minutes…
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.080 [INF] LTND: Opening bbolt database, sync_freelist=true, auto_compact=true
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.080 [INF] CHDB: Not compacting database file at /root/.lnd/data/graph/mainnet/channel.db, it was last compacted at 2026-07-22 15:11:28.354185845 +0000 UTC (103h32m7s ago), min age is set to 168h0m0s
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.081 [INF] CHDB: Not compacting database file at /root/.lnd/data/chain/bitcoin/mainnet/macaroons.db, it was last compacted at 2026-07-21 22:40:36.810376337 +0000 UTC (120h2m59s ago), min age is set to 168h0m0s
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.081 [INF] CHDB: Not compacting database file at /root/.lnd/data/graph/mainnet/sphinxreplay.db, it was last compacted at 2026-07-22 15:11:28.416027512 +0000 UTC (103h32m7s ago), min age is set to 168h0m0s
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.082 [INF] CHDB: Not compacting database file at /root/.lnd/data/graph/mainnet/wtclient.db, it was last compacted at 2026-07-22 15:11:28.418739102 +0000 UTC (103h32m7s ago), min age is set to 168h0m0s
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.082 [INF] CHDB: Not compacting database file at /root/.lnd/data/watchtower/bitcoin/mainnet/watchtower.db, it was last compacted at 2026-07-21 22:40:36.814267503 +0000 UTC (120h2m59s ago), min age is set to 168h0m0s
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.082 [INF] LTND: Creating local graph and channel state DB instances
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.084 [INF] CHDB: Checking for schema update: latest_version=35, db_version=35
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.084 [INF] CHDB: Applying 2 optional migrations
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.084 [INF] CHDB: Checking for optional update: name=prune_revocation_log
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.084 [INF] CHDB: Checking for optional update: name=gc_decayed_log
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.098 [INF] LTND: Database(s) now open (time_to_open=18.116648ms)!
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.176 [ERR] LTND: unable to initialize neutrino backend: unable to create neutrino light client: truncate /root/.lnd/data/chain/bitcoin/mainnet/block_headers.bin: invalid argument
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.176 [ERR] LTND: Shutting down due to error in main method rev=2b8788 err=“unable to initialize neutrino backend: unable to create neutrino light client: truncate /root/.lnd/data/chain/bitcoin/mainnet/block_headers.bin: invalid argument”
2026-07-27T00:43:36+02:00 error creating wallet config: unable to initialize neutrino backend: unable to create neutrino light client: truncate /root/.lnd/data/chain/bitcoin/mainnet/block_headers.bin: invalid argument
2026-07-27T00:43:36+02:00 2026-07-26 22:43:36.177 [INF] LTND: Shutdown complete
2026-07-27T00:43:36+02:00 Error: lnd exited with code 1
2026-07-27T00:43:36+02:00 at ChildProcess. (/usr/lib/startos/package/index.js:4521:39)
2026-07-27T00:43:36+02:00 at ChildProcess.emit (node:events:524:28)
2026-07-27T00:43:36+02:00 at ChildProcess._handle.onexit (node:internal/child_process:293:12)
2026-07-27T00:43:36+02:00 daemon finalize-schema waiting on lnd-schema
2026-07-27T00:43:36+02:00 daemon __RUN_UNTIL_SUCCESS waiting on lnd-schema,finalize-schema
2026-07-27T00:43:36+02:00 daemon finalize-schema waiting on lnd-schema
2026-07-27T00:43:36+02:00 daemon __RUN_UNTIL_SUCCESS waiting on lnd-schema,finalize-schema

And this error is appearing in an infinite loop that prevents LND to be updated.

I’ve tried rebuilding the LND service, and also recreated macaroons but I’m still getting the same error. Any ideas?

Regards,

Faren.

After some investigation, it seems that the issue was caused by corruption/error in Neutrino index files (block_headers.bin and reg_filter_headers.bin) preventing LND from starting correctly after the upgrade.

The way forward was to clear (rename in case I need to come back to them) the specific Neutrino cache directory so that LND can cleanly recreate its light client files on the new version.

Solution

  1. Access the LND container:
sudo lxc-attach -n <LND_CONTAINER_ID>
  1. Navigate to the Neutrino data directory:
cd /media/startos/volumes/main/data/chain/bitcoin/mainnet
  1. Rename the Neutrino header files so LND can rebuild them:
mv block_headers.bin block_headers.bin.bak
mv reg_filter_headers.bin reg_filter_headers.bin.bak
  1. Exit the container and start the LND update again from the StartOS interface.

After restarting, LND successfully completed the update and regenerated the required Neutrino files.

At this moment LND is syncing to graph and chain. I hope this solves the issue (without data loss), if it does not I’ll come back to this post.

EDIT: Confirmed solution. LND synced and correctly working. No data loss. In case any of the developers wants more data to prevent this happening to other people, feel free to ask.

2 Likes

Thank you. This worked for me. :+1: