A complete Docker-based development environment for Bitcoin and Lightning Network development, featuring a LNURL server for Lightning payments.
- Bitcoin Core (regtest): Bitcoin node for development
- LND: Lightning Network Daemon for Lightning payments
- Electrum Server: For Bitcoin blockchain queries
- LNURL Server: Lightning payment server with LNURL support
- LDK Backup Server: Lightning Development Kit backup service
-
Clone and start the services:
git clone <repository-url> cd bitkit-docker docker-compose up -d
-
Wait for services to initialize (about 30-60 seconds)
-
Check health:
curl http://localhost:3000/health
- Port: 43782 (RPC), 39388 (P2P)
- Network: Regtest
- Wallet: Auto-created
- Authentication:
polaruser/polarpass
- REST API:
http://localhost:8080 - P2P:
localhost:9735 - RPC:
localhost:10009 - Network: Regtest
- Features: Zero-conf, SCID alias, AMP support
- Port: 3000
- Features:
- LNURL-withdraw
- LNURL-pay
- LNURL-channel
- LNURL-auth
- Lightning Address support
- QR code generation
- Endpoints:
/health- Service health check/generate/withdraw- Generate LNURL-withdraw/generate/pay- Generate LNURL-pay/generate/channel- Generate LNURL-channel/auth- LNURL-auth challenge and verification/.well-known/lnurlp/:username- Lightning Address
- Port: 60001
- Network: Regtest
- Features: Full blockchain indexing
curl http://localhost:3000/generate/withdrawcurl http://localhost:3000/generate/paycurl http://localhost:3000/generate/channel# Generate auth challenge (returns encoded LNURL)
curl http://localhost:3000/auth?action=login
# Generate auth challenge with QR code (returns encoded LNURL + QR)
curl http://localhost:3000/auth/qr?action=login
# Verify signature (wallet does this automatically)
curl "http://localhost:3000/auth?k1=<challenge>&sig=<signature>&key=<public_key>"
# Check auth sessions
curl http://localhost:3000/auth/sessionscurl http://localhost:3000/health | jqcurl http://localhost:3000/.well-known/lnurlp/alice./bitcoin-cli mine 1docker-compose exec lnd lncli --network=regtest getinfo# All services
docker-compose logs -f
# Specific service
docker-compose logs -f lnurl-server
docker-compose logs -f lnd
docker-compose logs -f bitcoindKey environment variables in docker-compose.yml:
BITCOIN_RPC_HOST: Bitcoin RPC host (default:bitcoind)BITCOIN_RPC_PORT: Bitcoin RPC port (default:43782)LND_REST_HOST: LND REST API host (default:lnd)LND_REST_PORT: LND REST API port (default:8080)
./lnd:/lnd-certs:ro- LND certificates and macaroons./lnurl-server/data:/data- LNURL server databasebitcoin_home- Bitcoin blockchain data
- Check if ports are available
- Ensure Docker has enough resources
- Check logs:
docker-compose logs
- Wait for LND to fully sync
- Check macaroon files exist
- Verify network connectivity between containers
- Ensure Bitcoin Core is fully synced
- Check RPC authentication credentials
- Verify port mappings
- Run
docker compose down --volumes - Delete databases:
rm -rf ./lnd ./lnurl-server/data
- This setup uses regtest network for development
- Self-signed certificates are used for LND REST API
- Default credentials are used
- All services are exposed on localhost only
Do not use for production. LNURL server is vibe-coded and not fully spec compliant.