config_remote_node.py (2141B)
1 # In this example config, we have two machines 2 # The first machine is our bitcoin node 3 # and the second remote machine hosts SatSale (perhaps same server you host your website on) 4 5 # Bitcoin Lightning Node 1.1.1.1 8332, 10009, 22 (bitcoind, lnd, SSH) 6 # SatSale 2.2.2.2 7 8 # In this config we will tell SatSale to connect to our node, 9 # tunneling the required ports over SSH. 10 # SatSale can then talk to our node via localhost on 127.0.0.1 11 host = "127.0.0.1" 12 rpcport = "8332" 13 # If connections get kicked back, you may also need to set `rpcallowip=YOUR_SERVER_IP` in your `~/.bitcoin/bitcoin.conf`. 14 15 # From ~/.bitcoin/bitcoin.conf 16 username = "bitcoinrpc" 17 password = "rpcpassword" 18 19 # Wallet (empty "" if your node has a single wallet, OR wallet name/path as shown in `biitcoin-cli listwallets`) 20 wallet = "" 21 22 # File in which API key will be stored 23 api_key_path = "SatSale_API_key" 24 25 26 #### Connect To Remote Node #### 27 # Can use SSH or TOR 28 # to tunnel/relay ports required to talk to the node via RPC (gRPC for lightning) 29 30 # Telling SatSale to use SSH to tunnel the required ports 31 # Make sure this command works `ssh HOST@IP -q -N -L 8332:localhost:8332` 32 tunnel_host = "pi@1.1.1.1" 33 34 # We don't need to connect over tor if we're using SSH. 35 # or tor hidden service for RPC (see docs for how to set up), need onion: 36 tor_bitcoinrpc_host = None # e.g. "http://if...dwr.onion" 37 # and a tor proxy, default 127.0.0.1:9050 (for Tor Browser use "127.0.0.1:9150") 38 tor_proxy = None 39 40 41 #### Payment method #### 42 pay_method = "bitcoind" 43 44 #### Lightning #### 45 # Payment method has been switched to lnd 46 pay_method = "lnd" 47 48 # Specify lightning directory and port 49 lnd_dir = "~/.lnd/" 50 lnd_rpcport = "10009" 51 52 53 # Check for payment every xx seconds 54 pollrate = 15 55 56 # Payment expires after xx seconds 57 payment_timeout = 60*60 58 59 # Required confirmations for a payment 60 required_confirmations = 2 61 62 # Global connection attempts 63 connection_attempts = 3 64 65 # Generic redirect url after payment 66 redirect = "https://github.com/nickfarrow/satsale" 67 68 # DO NOT CHANGE THIS TO TRUE UNLESS YOU WANT ALL PAYMENTS TO AUTOMATICALLY 69 # BE CONSIDERED AS PAID. 70 free_mode = False