Skip to Content
Lightning Terminal (LiTD)Developer Environment

Developer Environment

This guide is for contributors or anyone who wants a local regtest network with litd and ThunderHub for development and testing.

This builds ThunderHub from source. Clone the ThunderHub repository  first. For normal usage, use the Connect to Existing litd or litd with Existing LND guides instead.

Services

ServicePort(s)Description
bitcoind18443Bitcoin Core in regtest mode
litd-alice8443, 10009, 9735Alice’s litd node (public universe)
litd-bob8444, 10010, 9736Bob’s litd node
thunderhub-alice3000ThunderHub for Alice
thunderhub-bob3001ThunderHub for Bob

Alice is configured with --taproot-assets.universe.public-access=rw for asset universe syncing.

Clone and Start

git clone https://github.com/apotdevin/thunderhub.git cd thunderhub/docker/litd docker compose up --build

Wait for both litd nodes to finish initializing (1-2 minutes on first run).

Access the Interfaces

InterfaceURLPassword
ThunderHub Alicehttp://localhost:3000 thunderhub
ThunderHub Bobhttp://localhost:3001 thunderhub
litd Alicehttps://localhost:8443 testpassword123!
litd Bobhttps://localhost:8444 testpassword123!

The litd UI uses a self-signed certificate. Your browser will show a security warning — proceed past it for local development.

Fund Wallets

# Fund Alice docker compose exec bitcoind bitcoin-cli \ -regtest -rpcuser=rpcuser -rpcpassword=rpcpassword \ generatetoaddress 6 \ $(docker compose exec litd-alice lncli --network=regtest newaddress p2wkh | jq -r '.address') # Fund Bob docker compose exec bitcoind bitcoin-cli \ -regtest -rpcuser=rpcuser -rpcpassword=rpcpassword \ generatetoaddress 6 \ $(docker compose exec litd-bob lncli --network=regtest newaddress p2wkh | jq -r '.address')

Connect Peers and Open a Channel

# Get Bob's public key BOB_PUBKEY=$(docker compose exec litd-bob lncli --network=regtest getinfo | jq -r '.identity_pubkey') # Connect Alice to Bob docker compose exec litd-alice lncli --network=regtest connect ${BOB_PUBKEY}@litd-bob:9735 # Open a 1M sat channel docker compose exec litd-alice lncli --network=regtest openchannel \ --node_key=${BOB_PUBKEY} \ --local_amt=1000000 # Confirm the channel docker compose exec bitcoind bitcoin-cli \ -regtest -rpcuser=rpcuser -rpcpassword=rpcpassword \ generatetoaddress 6 \ $(docker compose exec litd-alice lncli --network=regtest newaddress p2wkh | jq -r '.address')

Cleanup

# Stop containers (data preserved) docker compose down # Stop containers and delete all data docker compose down rm -rf data/

Troubleshooting

litd nodes are slow to start

  • litd runs multiple sub-daemons. First startup can take 2-3 minutes while wallets are created.
  • Monitor progress with docker compose logs -f litd-alice.

Browser certificate warning on litd UI

  • litd uses a self-signed TLS certificate. Click through the browser warning for local development.
  • In production, place litd behind a reverse proxy with a valid certificate.
Last updated on