From 416728ce02f9ee6765f86058ceee851e10aeeb39 Mon Sep 17 00:00:00 2001 From: missaghi Date: Sat, 9 Feb 2019 13:09:22 -0600 Subject: [PATCH 1/8] Create iOS-Via-VPN-remote.md High level tutorial for setting up systems for iOS to connect to LND over VPN. --- iOS-Via-VPN-remote.md | 70 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 iOS-Via-VPN-remote.md diff --git a/iOS-Via-VPN-remote.md b/iOS-Via-VPN-remote.md new file mode 100644 index 0000000..7d3727b --- /dev/null +++ b/iOS-Via-VPN-remote.md @@ -0,0 +1,70 @@ +# Zap iOS via OpenVPN lnd node +Running Zap on iOS connected to remote LND on windows via OpenVPN or Hamachi + +If you would like to have a lightening wallet on your phone that connects to your own node running on a server but you don't want to make your server public then you can run a VPN server to put both devices on the same vitual network that's hidden from the outside world. I'm new to writing tutorial, I hope you find this helpful, but if you have suggestions or questions please let me know. + +Setting up OpenVPN seemed much harder than it should have for such a fundamental tool. I have a feeling the information is actively obfuscated so that barrier to entry will persuade you to go with one of the fee based VPN providers, aka third parties. + +[![Preview](https://img.youtube.com/vi/ra8-WnOhoVM/1.jpg)](https://youtu.be/ra8-WnOhoVM) + +Here is the stack: + +Windows Server: (static-ish IP or DynDNS) +- bitcoin full node +- lnd (lighting node) +- OpenVPN + +iOS iPhone +- OpenVPN connect +- [Zap](https://github.com/LN-Zap/zap-iOS) + +###Steps: +0. Run [Pierre's Lightning Node Launcher](https://medium.com/lightning-power-users/easy-lightning-with-node-launcher-zap-488133edfbd) to setup bitcoin node and lighting node. +1. Setup VPN between your node and phone (openVPN with static IP or DynDNS or mediated like Hamachi) +2. Configure LND for externalIP +3. Create Zap connection text using LNDConnect or Node launcher's "Show QR" button when it's ready" +4. Test it out with this invoice (sends me a coffee): lightning:lnbc1m1pw97ykwpp5jry9xzz9qxens0e9va72p6ek0j78wmupcrxy4zcgn0l37g650ursdpg2djhgatsypdxzupqv9hxggzvfezzqen0wgs9v5zwcqzysnqrz3q0km07rk6mev5u07dj4fcp99us0gafl2r2pq2u9hp064vtssy93mzyl547l7z60xp8xmmn8ql8vgfcvcpyhmu6xsc3ukyds8jgpuhq4p4 + +####Step 0: [Run the node launcher](https://medium.com/lightning-power-users/easy-lightning-with-node-launcher-zap-488133edfbd) + +####Step 1: +####Option 1: OpenVPN +[Setting up OpenVPN](https://www.reddit.com/r/OpenVPN/comments/81q2q6/guide_how_to_set_up_openvpn_server_on_windows_10/) +* I forgot to click on the EasyRSA button so I didn't get the scripts but you can also get EasyRSA from [github repo](https://github.com/OpenVPN/easy-rsa/releases) and when you run .\EasyRSA-Start.bat it will give you shell where you can type ./easyrsa and run similar scripts. + +After you set the server up you need to run OpenVPN connect on your phone, email the config file to yourself and open in the ios default mail app (gmail app didn't handle the attachment correctly). + +#####Option 2: Hamachi +You can install Hamachi from [LogMeIn](https://www.vpn.net) +After you create a new network you can go into the web based manager and invite a new client which will send an email to your phone with the VPN profile. + +####Step 2.1: Configure LND.conf +In the node launcher's advanced page there is a link to the lnd.conf file. Open the file and add these lines for each IP you need: + +> externalip=25.8.179.146 +> tlsextraip=25.8.179.146 +> restlisten=25.8.179.146:8080 +> rpclisten=25.8.179.146:10009 + +For hamachi you will need whatever the IP address is for the computer you are running both hamachi and the LND node. To-do add image + +####Step 2.2: Recreate tls.key and tls.cert + +In the smae folder as lnd.conf you can delete the file tls.cert and tls.key, then restart LND, this will let LND create a new cert with "subject alt names" that include the IP addresses that you added. + +####Step 3: Configure Zap +In order for Zap to work it needs the URL, certificate, and macaroon from LND. The cert enables a TLS connection, the Macaroon is the credentials to control the node. There are two ways to get this info into ZAP, one is with a QR code that the node launcher will be showing soon. The second is to run the node script from LNDConnect which will generate a text which you can paste into the app. + +To run this script I found the easiest way was to: +1. install [node.js](https://nodejs.org/en/download/) +2. install [VSCode](https://code.visualstudio.com/download) +3. Create a file called app.js, paste [this code sample](https://gist.github.com/missaghi/342929aa8adb0503a1e4c4eca77db0b2) into it. +4. Run without debugging (you may have to correct the path to your macaroon and cert, check the node launcher for those.) +5. open the file created in the same folder ass app.js called lnd.txt and paste the contents into the app. + +####Step 4: Hope and pray +So the first time i set this up I kept getting TLS handshake erros and Zap wouldn't connect on hamachi but it would on OpenVPN, but then an hour later it worked on both... I think LND needs some tweaks to it's cert generation to work better with externalIP which i think is comeing in the next version (see this issue: https://github.com/lightningnetwork/lnd/issues/684) + +**Some other helpful tutorials:** +- https://ln-zap.github.io/zap-tutorials/iOS-remote-node-setup.html +- From 9cd05a4a7b4a4ad2c9a62c59683f96431c7319ee Mon Sep 17 00:00:00 2001 From: missaghi Date: Sat, 9 Feb 2019 13:13:20 -0600 Subject: [PATCH 2/8] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d2ca1bc..ed7be5b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ ## Mobile - [Zap iOS: Remote Node setup with Zap Connect tutorial](https://ln-zap.github.io/zap-tutorials/iOS-remote-node-setup) - [Zap iOS: Remote Node setup with Docker](https://ln-zap.github.io/zap-tutorials/iOS-remote-node-setup-docker) +- [Zap iOS: Remote Node setup over OpenVPN](https://ln-zap.github.io/zap-tutorials/iOS-Via-VPN-remote) ## Desktop - [Zap Desktop: Getting Started](https://ln-zap.github.io/zap-tutorials/zap-desktop-getting-started) From 4caaa632a2c398857db08a839778a566d20c66e4 Mon Sep 17 00:00:00 2001 From: missaghi Date: Sat, 16 Feb 2019 11:56:49 -0600 Subject: [PATCH 3/8] Removed hamachi option, fixed formatting, recemmended LNDConnect --- iOS-Via-VPN-remote.md | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/iOS-Via-VPN-remote.md b/iOS-Via-VPN-remote.md index 7d3727b..0c1d6c4 100644 --- a/iOS-Via-VPN-remote.md +++ b/iOS-Via-VPN-remote.md @@ -1,9 +1,9 @@ # Zap iOS via OpenVPN lnd node -Running Zap on iOS connected to remote LND on windows via OpenVPN or Hamachi +Running Zap on iOS connected to remote LND on windows via OpenVPN -If you would like to have a lightening wallet on your phone that connects to your own node running on a server but you don't want to make your server public then you can run a VPN server to put both devices on the same vitual network that's hidden from the outside world. I'm new to writing tutorial, I hope you find this helpful, but if you have suggestions or questions please let me know. +So you got your lightning node running at home and you want to connect your phone wallet to it without having to open a port to your node. With OpenVPN running on your node you can have your phone appear on it's network at all times. This will let your phone connect to the server as if it were on the same network even when you leave the house, all without exposing your RPC port to the public internet. I think OpenVPN has some paid service that will mediate the connections so that you dont have to expose a port for the VPN server but this tutorial is intended for folks that want to run their own VPN for free. -Setting up OpenVPN seemed much harder than it should have for such a fundamental tool. I have a feeling the information is actively obfuscated so that barrier to entry will persuade you to go with one of the fee based VPN providers, aka third parties. +Setting up OpenVPN seemed much harder than it should have for such a fundamental tool. I have a feeling the information is actively obfuscated so that barrier to entry will persuade you to go with one of the fee based VPN providers, aka trusted third parties. I'll be working on an OpenVPN installer to make this easier one day. [![Preview](https://img.youtube.com/vi/ra8-WnOhoVM/1.jpg)](https://youtu.be/ra8-WnOhoVM) @@ -18,53 +18,53 @@ iOS iPhone - OpenVPN connect - [Zap](https://github.com/LN-Zap/zap-iOS) -###Steps: +### Steps: 0. Run [Pierre's Lightning Node Launcher](https://medium.com/lightning-power-users/easy-lightning-with-node-launcher-zap-488133edfbd) to setup bitcoin node and lighting node. 1. Setup VPN between your node and phone (openVPN with static IP or DynDNS or mediated like Hamachi) 2. Configure LND for externalIP 3. Create Zap connection text using LNDConnect or Node launcher's "Show QR" button when it's ready" 4. Test it out with this invoice (sends me a coffee): lightning:lnbc1m1pw97ykwpp5jry9xzz9qxens0e9va72p6ek0j78wmupcrxy4zcgn0l37g650ursdpg2djhgatsypdxzupqv9hxggzvfezzqen0wgs9v5zwcqzysnqrz3q0km07rk6mev5u07dj4fcp99us0gafl2r2pq2u9hp064vtssy93mzyl547l7z60xp8xmmn8ql8vgfcvcpyhmu6xsc3ukyds8jgpuhq4p4 -####Step 0: [Run the node launcher](https://medium.com/lightning-power-users/easy-lightning-with-node-launcher-zap-488133edfbd) +#### Step 0: [Run the node launcher](https://medium.com/lightning-power-users/easy-lightning-with-node-launcher-zap-488133edfbd) -####Step 1: -####Option 1: OpenVPN +#### Step 1: OpenVPN [Setting up OpenVPN](https://www.reddit.com/r/OpenVPN/comments/81q2q6/guide_how_to_set_up_openvpn_server_on_windows_10/) * I forgot to click on the EasyRSA button so I didn't get the scripts but you can also get EasyRSA from [github repo](https://github.com/OpenVPN/easy-rsa/releases) and when you run .\EasyRSA-Start.bat it will give you shell where you can type ./easyrsa and run similar scripts. After you set the server up you need to run OpenVPN connect on your phone, email the config file to yourself and open in the ios default mail app (gmail app didn't handle the attachment correctly). -#####Option 2: Hamachi -You can install Hamachi from [LogMeIn](https://www.vpn.net) -After you create a new network you can go into the web based manager and invite a new client which will send an email to your phone with the VPN profile. - ####Step 2.1: Configure LND.conf In the node launcher's advanced page there is a link to the lnd.conf file. Open the file and add these lines for each IP you need: -> externalip=25.8.179.146 -> tlsextraip=25.8.179.146 -> restlisten=25.8.179.146:8080 -> rpclisten=25.8.179.146:10009 +> externalip=yourNetworkAdaperIPaddress +> tlsextraip=yourNetworkAdaperIPaddress +> restlisten=yourNetworkAdaperIPaddress:8080 +> rpclisten=yourNetworkAdaperIPaddress:10009 -For hamachi you will need whatever the IP address is for the computer you are running both hamachi and the LND node. To-do add image +Note that you don't need to put your public IP here becasue on the VPN your phone will address the local IP of your servers network adapter. -####Step 2.2: Recreate tls.key and tls.cert +#### Step 2.2: Recreate tls.key and tls.cert In the smae folder as lnd.conf you can delete the file tls.cert and tls.key, then restart LND, this will let LND create a new cert with "subject alt names" that include the IP addresses that you added. -####Step 3: Configure Zap -In order for Zap to work it needs the URL, certificate, and macaroon from LND. The cert enables a TLS connection, the Macaroon is the credentials to control the node. There are two ways to get this info into ZAP, one is with a QR code that the node launcher will be showing soon. The second is to run the node script from LNDConnect which will generate a text which you can paste into the app. +#### Step 3: Configure Zap +In order for Zap to work it needs the URL, certificate, and macaroon from LND. The cert enables a TLS connection, the Macaroon is the credentials to control the node. There are two ways to get this info into ZAP, one is by pasting the connection string scanning a QR code representaion of it. + +##### Step 3 Option 1, lndconnect to generate QR and URI +You can creat the QR code by using [LNDConnect](https://github.com/LN-Zap/lndconnect) which will generate the text and QR code. I tried to install go and run the first command in the instructions "go get -d github.com/LN-Zap/lndconnect" but nothing happened... if you know go language better then this would be the most future proof option. + +##### Step 3 Option 2, Run node script to generate URI +The other option is to run a node script that builds the URI specified [here](https://github.com/LN-Zap/lndconnect/blob/master/lnd_connect_uri.md), but this may not be backwards compatible. -To run this script I found the easiest way was to: 1. install [node.js](https://nodejs.org/en/download/) 2. install [VSCode](https://code.visualstudio.com/download) 3. Create a file called app.js, paste [this code sample](https://gist.github.com/missaghi/342929aa8adb0503a1e4c4eca77db0b2) into it. 4. Run without debugging (you may have to correct the path to your macaroon and cert, check the node launcher for those.) 5. open the file created in the same folder ass app.js called lnd.txt and paste the contents into the app. -####Step 4: Hope and pray -So the first time i set this up I kept getting TLS handshake erros and Zap wouldn't connect on hamachi but it would on OpenVPN, but then an hour later it worked on both... I think LND needs some tweaks to it's cert generation to work better with externalIP which i think is comeing in the next version (see this issue: https://github.com/lightningnetwork/lnd/issues/684) +#### Step 4: Hope and pray +So the first time i set this up I kept getting TLS handshake erros but then an hour later it worked, probably cache, haven't been able to recreate but now you knoew... I think LND needs some tweaks to it's cert generation to work better with externalIP which i think is coming in the next version (see this issue: https://github.com/lightningnetwork/lnd/issues/684) **Some other helpful tutorials:** -- https://ln-zap.github.io/zap-tutorials/iOS-remote-node-setup.html +- https://ln-zap.github.io/zap-tutorials/ - From 80d4a8b2144137616a30812c7395ea33b8c6e909 Mon Sep 17 00:00:00 2001 From: missaghi Date: Sat, 16 Feb 2019 12:00:40 -0600 Subject: [PATCH 4/8] Removed static invoice --- iOS-Via-VPN-remote.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/iOS-Via-VPN-remote.md b/iOS-Via-VPN-remote.md index 0c1d6c4..8c4a740 100644 --- a/iOS-Via-VPN-remote.md +++ b/iOS-Via-VPN-remote.md @@ -18,22 +18,22 @@ iOS iPhone - OpenVPN connect - [Zap](https://github.com/LN-Zap/zap-iOS) -### Steps: +## Steps: 0. Run [Pierre's Lightning Node Launcher](https://medium.com/lightning-power-users/easy-lightning-with-node-launcher-zap-488133edfbd) to setup bitcoin node and lighting node. 1. Setup VPN between your node and phone (openVPN with static IP or DynDNS or mediated like Hamachi) -2. Configure LND for externalIP +2. Configure LND for listening on your network adapter IP 3. Create Zap connection text using LNDConnect or Node launcher's "Show QR" button when it's ready" -4. Test it out with this invoice (sends me a coffee): lightning:lnbc1m1pw97ykwpp5jry9xzz9qxens0e9va72p6ek0j78wmupcrxy4zcgn0l37g650ursdpg2djhgatsypdxzupqv9hxggzvfezzqen0wgs9v5zwcqzysnqrz3q0km07rk6mev5u07dj4fcp99us0gafl2r2pq2u9hp064vtssy93mzyl547l7z60xp8xmmn8ql8vgfcvcpyhmu6xsc3ukyds8jgpuhq4p4 +4. Test it out by sending a tip: https://tippin.me/@missaghi -#### Step 0: [Run the node launcher](https://medium.com/lightning-power-users/easy-lightning-with-node-launcher-zap-488133edfbd) +### Step 0: [Run the node launcher](https://medium.com/lightning-power-users/easy-lightning-with-node-launcher-zap-488133edfbd) -#### Step 1: OpenVPN +### Step 1: OpenVPN [Setting up OpenVPN](https://www.reddit.com/r/OpenVPN/comments/81q2q6/guide_how_to_set_up_openvpn_server_on_windows_10/) * I forgot to click on the EasyRSA button so I didn't get the scripts but you can also get EasyRSA from [github repo](https://github.com/OpenVPN/easy-rsa/releases) and when you run .\EasyRSA-Start.bat it will give you shell where you can type ./easyrsa and run similar scripts. After you set the server up you need to run OpenVPN connect on your phone, email the config file to yourself and open in the ios default mail app (gmail app didn't handle the attachment correctly). -####Step 2.1: Configure LND.conf +### Step 2.1: Configure LND.conf In the node launcher's advanced page there is a link to the lnd.conf file. Open the file and add these lines for each IP you need: > externalip=yourNetworkAdaperIPaddress @@ -43,17 +43,17 @@ In the node launcher's advanced page there is a link to the lnd.conf file. Open Note that you don't need to put your public IP here becasue on the VPN your phone will address the local IP of your servers network adapter. -#### Step 2.2: Recreate tls.key and tls.cert +## Step 2.2: Recreate tls.key and tls.cert In the smae folder as lnd.conf you can delete the file tls.cert and tls.key, then restart LND, this will let LND create a new cert with "subject alt names" that include the IP addresses that you added. -#### Step 3: Configure Zap +## Step 3: Configure Zap In order for Zap to work it needs the URL, certificate, and macaroon from LND. The cert enables a TLS connection, the Macaroon is the credentials to control the node. There are two ways to get this info into ZAP, one is by pasting the connection string scanning a QR code representaion of it. -##### Step 3 Option 1, lndconnect to generate QR and URI +### Step 3 Option 1, lndconnect to generate QR and URI You can creat the QR code by using [LNDConnect](https://github.com/LN-Zap/lndconnect) which will generate the text and QR code. I tried to install go and run the first command in the instructions "go get -d github.com/LN-Zap/lndconnect" but nothing happened... if you know go language better then this would be the most future proof option. -##### Step 3 Option 2, Run node script to generate URI +### Step 3 Option 2, Run node script to generate URI The other option is to run a node script that builds the URI specified [here](https://github.com/LN-Zap/lndconnect/blob/master/lnd_connect_uri.md), but this may not be backwards compatible. 1. install [node.js](https://nodejs.org/en/download/) @@ -62,7 +62,7 @@ The other option is to run a node script that builds the URI specified [here](ht 4. Run without debugging (you may have to correct the path to your macaroon and cert, check the node launcher for those.) 5. open the file created in the same folder ass app.js called lnd.txt and paste the contents into the app. -#### Step 4: Hope and pray +## Step 4: Hope and pray So the first time i set this up I kept getting TLS handshake erros but then an hour later it worked, probably cache, haven't been able to recreate but now you knoew... I think LND needs some tweaks to it's cert generation to work better with externalIP which i think is coming in the next version (see this issue: https://github.com/lightningnetwork/lnd/issues/684) **Some other helpful tutorials:** From 916f90c0a9b4661e3c8546e7093b6d0969ef5354 Mon Sep 17 00:00:00 2001 From: missaghi Date: Sat, 16 Feb 2019 12:13:22 -0600 Subject: [PATCH 5/8] Fixed formatting added tip --- iOS-Via-VPN-remote.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/iOS-Via-VPN-remote.md b/iOS-Via-VPN-remote.md index 8c4a740..20b0383 100644 --- a/iOS-Via-VPN-remote.md +++ b/iOS-Via-VPN-remote.md @@ -36,10 +36,12 @@ After you set the server up you need to run OpenVPN connect on your phone, email ### Step 2.1: Configure LND.conf In the node launcher's advanced page there is a link to the lnd.conf file. Open the file and add these lines for each IP you need: -> externalip=yourNetworkAdaperIPaddress -> tlsextraip=yourNetworkAdaperIPaddress -> restlisten=yourNetworkAdaperIPaddress:8080 -> rpclisten=yourNetworkAdaperIPaddress:10009 +``` +externalip=yourNetworkAdaperIPaddress +tlsextraip=yourNetworkAdaperIPaddress +restlisten=yourNetworkAdaperIPaddress:8080 +rpclisten=yourNetworkAdaperIPaddress:10009 +``` Note that you don't need to put your public IP here becasue on the VPN your phone will address the local IP of your servers network adapter. @@ -67,4 +69,3 @@ So the first time i set this up I kept getting TLS handshake erros but then an h **Some other helpful tutorials:** - https://ln-zap.github.io/zap-tutorials/ -- From a7243358294a8365b5533686178295730475bddb Mon Sep 17 00:00:00 2001 From: missaghi Date: Sat, 16 Feb 2019 12:18:15 -0600 Subject: [PATCH 6/8] Fixed links --- iOS-Via-VPN-remote.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iOS-Via-VPN-remote.md b/iOS-Via-VPN-remote.md index 20b0383..556eb96 100644 --- a/iOS-Via-VPN-remote.md +++ b/iOS-Via-VPN-remote.md @@ -10,12 +10,12 @@ Setting up OpenVPN seemed much harder than it should have for such a fundamental Here is the stack: Windows Server: (static-ish IP or DynDNS) -- bitcoin full node +- [bitcoin](https://openvpn.net/community-downloads/) full node - lnd (lighting node) -- OpenVPN +- [OpenVPN](https://openvpn.net/community-downloads/) iOS iPhone -- OpenVPN connect +- [OpenVPN connect](https://itunes.apple.com/us/app/openvpn-connect/id590379981?mt=8) - [Zap](https://github.com/LN-Zap/zap-iOS) ## Steps: From 9901ecc36962d16dae2667d1a24bf5c96c811fe9 Mon Sep 17 00:00:00 2001 From: missaghi Date: Sat, 16 Feb 2019 12:19:24 -0600 Subject: [PATCH 7/8] Added tip --- iOS-Via-VPN-remote.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iOS-Via-VPN-remote.md b/iOS-Via-VPN-remote.md index 556eb96..c282862 100644 --- a/iOS-Via-VPN-remote.md +++ b/iOS-Via-VPN-remote.md @@ -64,8 +64,10 @@ The other option is to run a node script that builds the URI specified [here](ht 4. Run without debugging (you may have to correct the path to your macaroon and cert, check the node launcher for those.) 5. open the file created in the same folder ass app.js called lnd.txt and paste the contents into the app. -## Step 4: Hope and pray +## Step 4: Hope and then test So the first time i set this up I kept getting TLS handshake erros but then an hour later it worked, probably cache, haven't been able to recreate but now you knoew... I think LND needs some tweaks to it's cert generation to work better with externalIP which i think is coming in the next version (see this issue: https://github.com/lightningnetwork/lnd/issues/684) +If it works, try it out by buying me coffee: https://tippin.me/@missaghi + **Some other helpful tutorials:** - https://ln-zap.github.io/zap-tutorials/ From 56d5cebbc339f07bc89a8d288a3f203e7d9e6e91 Mon Sep 17 00:00:00 2001 From: missaghi Date: Mon, 22 Apr 2019 12:50:52 -0500 Subject: [PATCH 8/8] several updates 1. ZAP desktop now has LNDconnect. 2. OVNP setting to only tunnel LND traffic 3. fix typo, removed tip link. --- iOS-Via-VPN-remote.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/iOS-Via-VPN-remote.md b/iOS-Via-VPN-remote.md index c282862..a8f321a 100644 --- a/iOS-Via-VPN-remote.md +++ b/iOS-Via-VPN-remote.md @@ -33,6 +33,13 @@ iOS iPhone After you set the server up you need to run OpenVPN connect on your phone, email the config file to yourself and open in the ios default mail app (gmail app didn't handle the attachment correctly). +If you would like to exclude all traffic except to your node from the VPN (performance reasons usually) you can add these line to the server.OVPN file: + +``` +route-nopull +route yourNetworkAdaperIPaddress 255.255.255.255 +``` + ### Step 2.1: Configure LND.conf In the node launcher's advanced page there is a link to the lnd.conf file. Open the file and add these lines for each IP you need: @@ -52,6 +59,8 @@ In the smae folder as lnd.conf you can delete the file tls.cert and tls.key, the ## Step 3: Configure Zap In order for Zap to work it needs the URL, certificate, and macaroon from LND. The cert enables a TLS connection, the Macaroon is the credentials to control the node. There are two ways to get this info into ZAP, one is by pasting the connection string scanning a QR code representaion of it. +Update: now Zap Desktop will generate a settings QR using LNDConnect. Click on the QR code icon at the top left of the app and then select lndconnect. + ### Step 3 Option 1, lndconnect to generate QR and URI You can creat the QR code by using [LNDConnect](https://github.com/LN-Zap/lndconnect) which will generate the text and QR code. I tried to install go and run the first command in the instructions "go get -d github.com/LN-Zap/lndconnect" but nothing happened... if you know go language better then this would be the most future proof option. @@ -64,10 +73,7 @@ The other option is to run a node script that builds the URI specified [here](ht 4. Run without debugging (you may have to correct the path to your macaroon and cert, check the node launcher for those.) 5. open the file created in the same folder ass app.js called lnd.txt and paste the contents into the app. -## Step 4: Hope and then test -So the first time i set this up I kept getting TLS handshake erros but then an hour later it worked, probably cache, haven't been able to recreate but now you knoew... I think LND needs some tweaks to it's cert generation to work better with externalIP which i think is coming in the next version (see this issue: https://github.com/lightningnetwork/lnd/issues/684) - -If it works, try it out by buying me coffee: https://tippin.me/@missaghi +## Step 4: Certificate isssues +So the first time i set this up I kept getting TLS handshake errors but then an hour later it worked. You may need to go to the section "Certificates for remote usage (RaspiBolt tutorial)" at the [ZAP remote node setup tutorial](https://ln-zap.github.io/zap-tutorials/iOS-remote-node-setup) -**Some other helpful tutorials:** -- https://ln-zap.github.io/zap-tutorials/ +Congrats!