Skip to content

Instantly share code, notes, and snippets.

@nolim1t
Last active December 27, 2019 13:58
Show Gist options
  • Select an option

  • Save nolim1t/77375126fbd1ba36701edd7ddbcc9e23 to your computer and use it in GitHub Desktop.

Select an option

Save nolim1t/77375126fbd1ba36701edd7ddbcc9e23 to your computer and use it in GitHub Desktop.
Start c-lightning from docker container (this is build from c-lightning master). Defaults: .lightning and .home (copy config.template to .lightning)
network=bitcoin
alias=Example Clightning
rgb=14eb00
mainnet
# log level
log-level=debug:lightningd
bitcoin-rpcconnect=IPADDR
bitcoin-rpcport=8332
bitcoin-rpcuser=YOURUSERNAME
bitcoin-rpcpassword=YOURPASSWORD
bitcoin-cli=/usr/bin/bitcoin-cli
# Set to low value
bind-addr=0.0.0.0:9735
# Set to an address to anounce
#announce-addr=
# for connecting to TOR nodes
#proxy=127.0.0.1:9050
#always-use-proxy=true
# half a sat sat base
fee-base=500
# 0.1337% of the payment
fee-per-satoshi=1337
# Clean up 2 hours old invoices
autocleaninvoice-cycle=7200
autocleaninvoice-expired-by=7200
LIGHTNING_HOME=$HOME/.lightning
BITCOIN_NODE_PATH=$HOME/.bitcoin
IPADDR=`ifconfig -a | grep inet | grep -v 127 | grep -v inet6 | awk '{print $2}'`
# Re-write config
sed "s/IPADDR/${IPADDR}/g;" ${LIGHTNING_HOME}/config.template > ${LIGHTNING_HOME}/config
docker run -d --rm \
--name clightning \
-v $LIGHTNING_HOME:/root/.lightning \
-v $LIGHTNING_HOME:/data/lightningd \
-v $BITCOIN_NODE_PATH:/data/btc-fullnode \
nolim1t/clightning:master-051b5bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment