Configure local LND as Lightning node in BTCPay Server #275
| @ -18,6 +18,7 @@ bash 'build_btcpay' do | ||||
|   cwd node['btcpay']['source_dir'] | ||||
|   code './build.sh' | ||||
|   action :nothing | ||||
|   notifies :restart, "systemd_unit[btcpayserver.service]", :delayed | ||||
| end | ||||
| 
 | ||||
| directory "/home/#{node['bitcoin']['username']}/.btcpayserver" do | ||||
| @ -36,6 +37,8 @@ end | ||||
| 
 | ||||
| credentials = Chef::EncryptedDataBagItem.load('credentials', 'btcpay') | ||||
| 
 | ||||
| lnd_admin_macaroon_path = "#{node['lnd']['lnd_dir']}/data/chain/bitcoin/mainnet/admin.macaroon" rescue nil | ||||
| 
 | ||||
| template node['btcpay']['config_path'] do | ||||
|   source "btcpay-settings.config.erb" | ||||
|   owner node['bitcoin']['username'] | ||||
| @ -49,7 +52,9 @@ template node['btcpay']['config_path'] do | ||||
|             postgres_port: node['btcpay']['postgres']['port'], | ||||
|             postgres_database: node['btcpay']['postgres']['database'], | ||||
|             postgres_user: node['btcpay']['postgres']['user'], | ||||
|             postgres_password: credentials['postgres_password'] | ||||
|             postgres_password: credentials['postgres_password'], | ||||
|             lnd_admin_macaroon_path: lnd_admin_macaroon_path | ||||
|   notifies :restart, "systemd_unit[btcpayserver.service]", :delayed | ||||
| end | ||||
| 
 | ||||
| directory '/run/btcpayserver' do | ||||
|  | ||||
| @ -2,7 +2,9 @@ network=<%= @bitcoin_network %> | ||||
| port=<%= @btcpay_port %> | ||||
| bind=127.0.0.1 | ||||
| chains=btc | ||||
| BTC.explorer.url=<%= @nbxplorer_url %> | ||||
| postgres=User ID=<%= @postgres_user %>;Password=<%= @postgres_password %>;Host=<%= @postgres_host %>;Port=<%= @postgres_port %>;Database=<%= @postgres_database %>; | ||||
| debuglog=<%= @btcpay_log_path %> | ||||
| <%# TODO BTC.lightning=type=clightning;server=/mnt/data/lightningd/lightning-rpc %> | ||||
| BTC.explorer.url=<%= @nbxplorer_url %> | ||||
| <% if @lnd_admin_macaroon_path %> | ||||
| BTC.lightning=type=lnd-rest;server=https://127.0.0.1:8080/;macaroonfilepath=<%= @lnd_admin_macaroon_path %>;allowinsecure=true | ||||
| <% end %> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user