Bitcoin Forum
November 11, 2024, 12:04:34 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 »  All
  Print  
Author Topic: Questions RE: setting up Lightning Node on Raspberry Pi with Stadicus' guide  (Read 22070 times)
Zand_ (OP)
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 05, 2018, 03:37:03 PM
 #21

Once this opened I added the public key, saved by hitting Ctrl + O, enter, and then exiting with Ctrl + X. Below is an example of the public key I put in, I'm wondering if I was supposed to include the entire string?

Yes, you have to include the entire string.

Usually, after creating your keypair you simply move it to your server (your PI in this case).
This works with this command:

Code:
ssh-copy-id -i .ssh/key_rsa.pub PI-USERNAME@192.168.56.101 

with PI-USERNAME being your username on the PI and 192.168.56.101 being the IP of your PI.


Afterwards you will be able to authenticate using public key cryptography, without entering your password.

When would I enter that? After the "chmod -R 700 .ssh/" command?

chmod -R 700 .ssh/ (Nothing happened after doing this)
exit

chmod doesn't give you any output if it succeeds, so don't worry about that. If you did ls -l before chmod, then again after chmod, you'd notice the file permissions change, which is chmod's purpose.


For example, at the very end it has the nickname I gave the key "LightNode Keys". Should I omit that?

"LightNode Keys" has a space character in it, but you're not using double quotes around the nickname in the example public key string you gave. I'm not saying that's the overall problem, but it's likely a problem. Avoid putting spaces in anything that's going to get parsed by a command line tool, a space is treated like an indication that a new parameter is after the space from the perspective of parsing commands.

Ok I can try again changing the nickname to just LightNode, but what about the "2048 37" at the beginning of the public key. Will the spaces there also create a problem? Also what are your thoughts on just skipping this step altogether?
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 05, 2018, 04:19:10 PM
Last edit: October 06, 2018, 06:21:32 PM by BitCryptex
 #22

Ok I can try again changing the nickname to just LightNode, but what about the "2048 37" at the beginning of the public key. Will the spaces there also create a problem? Also what are your thoughts on just skipping this step altogether?

You can skip this step and use a strong password instead. I have been using only passwords for a long time and nothing bad has happened yet. Here is how my public key looks like in ".ssh/authorized_keys".

Code:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAouIC+YCXpx9dnUsjg6pROV6pTMKJBkoHEB4vy/R9XL+WHdKQbLGm7wt9kQ4soI15oHDAaHScm6lAnAirGzRFIGGLOfgBVGJygaptqz2Q9iw3
+giUoeXvFeluxKtMSEeDfjSH1s1u991/KhWso6N/t5tcqlqB5gurLc5Bc/W7TRTqTnZzAohWOqsm5HYo8F/
0gaHwDCZWb7cKZVJlzVegw1JL40hox0sKnCNV6aooh1Qdog5e1d8m2BKwDasc1mKdcFgg82MB+FmnxlYRTwLi3
dW0hwEC+hIq+vF4AdBGrmskxaI/n1wMxAHJ9egJi5dwzHGCSp0QRlCeFbIIGtWlLw== rsa-key-20181004

Of course it would be better if you managed to get it worked out.
Zand_ (OP)
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 05, 2018, 06:10:19 PM
 #23

Finally got it working! Was able to narrow it down and realized I did something wrong during the "Enabling the Uncomplicated Firewall" step. Should be good for now!
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3080



View Profile
October 05, 2018, 06:49:35 PM
 #24

Nice work Smiley

Vires in numeris
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
October 06, 2018, 05:55:37 AM
 #25

When would I enter that? After the "chmod -R 700 .ssh/" command?

Usually, you shoudn't enter this command at all.
Inside of the .ssh directory, there are files which are fine to be read by non-root users (e.g. known_hosts).

All you have to protect inside of the directory are the private keys of the machine from reading and the public key from connecting clients from manipulation.


Back to your question. Usually you enter this command to move the public key of your machine you use to login into the .ssh directory of your server (the machine you want to connect to).
You just need a valid private-/public- ssh keypair on your machine used to login before executing this command.

Zand_ (OP)
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 06, 2018, 07:42:12 PM
Last edit: October 06, 2018, 10:03:43 PM by Zand_
 #26

I've been cruising through the rest of the guide but just hit another road block (under Lightning > Assign LND permissions to "admin"). It asks us to check to see if files admin.macaroon and readonly.macaroon have been created by using the following command

ls -la /home/bitcoin/.lnd/

When I execute this command I get everything in the screenshot except those two files. Do I have to wait for them to be created or am I doing something wrong?
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3080



View Profile
October 07, 2018, 12:54:07 PM
 #27

ls -la /home/bitcoin/.lnd/

That command just lists files in /home/bitcoin/.lnd/, 'ls' is the list command.

To create those files... either running lnd will do that (i haven't used lnd), or you could do it yourself (the command would be touch /home/bitcoin/.lnd/admin.macaroon). But it makes more sense that lnd would do it, the idea is that a macaroon file is similar to a cookie file (both are biscuits IRL, a curious metaphor IMO). Checking the documentation for lnd should tell you more (at this stage, you've probably done most of what the guide can tell you).

Vires in numeris
Zand_ (OP)
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 07, 2018, 04:12:27 PM
 #28

ls -la /home/bitcoin/.lnd/

That command just lists files in /home/bitcoin/.lnd/, 'ls' is the list command.

To create those files... either running lnd will do that (i haven't used lnd), or you could do it yourself (the command would be touch /home/bitcoin/.lnd/admin.macaroon). But it makes more sense that lnd would do it, the idea is that a macaroon file is similar to a cookie file (both are biscuits IRL, a curious metaphor IMO). Checking the documentation for lnd should tell you more (at this stage, you've probably done most of what the guide can tell you).

Hmm not sure why the lnd didn't create them. Ran through the steps again just to make sure I didn't miss anything but still not seeing the macaroon files. Actually have a question about the "Public IP script" portion of the guide. When I run the command "sudo systemctl status getpublicip" I get the following screen. Not sure what I'm supposed to do here, I just Ctrl +C'd out and continued with the rest of the steps.

Also, when I tried touch /home/bitcoin/.lnd/admin.macaroon I got "Permission denied"



Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 07, 2018, 04:43:53 PM
 #29

Actually have a question about the "Public IP script" portion of the guide. When I run the command "sudo systemctl status getpublicip" I get the following screen. Not sure what I'm supposed to do here, I just Ctrl +C'd out and continued with the rest of the steps.

Everything is fine. You can use the following command to check whether or not your public IP is detected correctly.

Code:
cat /run/publicip

As for the permission files problem, you should have mainnet and testnet folders in the .lnd/data/chain/bitcoin directory. You should find admin.macaroon and other needed files in them.
Zand_ (OP)
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 07, 2018, 04:52:49 PM
 #30

Actually have a question about the "Public IP script" portion of the guide. When I run the command "sudo systemctl status getpublicip" I get the following screen. Not sure what I'm supposed to do here, I just Ctrl +C'd out and continued with the rest of the steps.

Everything is fine. You can use the following command to check whether or not your public IP is detected correctly.

Code:
cat /run/publicip

As for the permission files problem, you should have mainnet and testnet folders in the .lnd/data/chain/bitcoin directory. You should find admin.macaroon and other needed files there.

What would the command be to check that directory?
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 07, 2018, 05:01:54 PM
 #31

What would the command be to check that directory?

It's very similar to the command you have used previously. The following one will tell you whether or not folders mainnet and testnet exist.

Code:
ls -la /home/bitcoin/.lnd/data/chain/bitcoin/

If these folders exist you can check what's inside them by adding either testnet or mainnet after /bitcoin/. By the way, you were not able to use the touch command earlier because you forgot to add sudo before it.

Zand_ (OP)
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 07, 2018, 05:35:29 PM
 #32

Hmm looks like those files do exist. Not sure why they don't appear when I do "ls -la /home/bitcoin/.lnd/"

Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3080



View Profile
October 07, 2018, 05:43:57 PM
Last edit: October 08, 2018, 06:41:24 PM by Carlton Banks
 #33

When I run the command "sudo systemctl status getpublicip" I get the following screen. Not sure what I'm supposed to do here, I just Ctrl +C'd out and continued with the rest of the steps.


Press Q to get the prompt back


Hmm looks like those files do exist. Not sure why they don't appear when I do "ls -la /home/bitcoin/.lnd/"



Probably a typo in the original guide. Let Stadicus know, it would be appreciated it if that turns out to be the case.

Vires in numeris
Zand_ (OP)
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 07, 2018, 06:11:25 PM
 #34

When I run the command "sudo systemctl status getpublicip" I get the following screen. Not sure what I'm supposed to do here, I just Ctrl +C'd out and continued with the rest of the steps.


Press Q to get the prompt back


Hmm looks like those files do exist. Not sure why they don't appear when I do "ls -la /home/bitcoin/.lnd/"



Probably a typo in the original guide. Let Stadicus know, he'd appreciate it if that turns out to be the case.

Yeah I think it might be a mistake because I have the macaroon files in testnet just not mainnet. So when I change the command below from mainnet to testnet, I'm able to continue with the rest of the steps

$ cd /home/bitcoin/
$ sudo cp --parents .lnd/data/chain/bitcoin/mainnet/admin.macaroon /home/admin/ (Changed this to testnet)
$ sudo cp /home/bitcoin/.lnd/tls.cert /home/admin/.lnd
$ sudo chown -R admin:admin /home/admin/.lnd/


I got some testnet BTC from a faucet and successfully deposited into my LND wallet, but for some reason unable to make a payment to Starblocks. See image below... LND is supposedly on "Autopilot" by default so it should be opening channels on its own, yet I don't see any channels open when I enter "lncli --network=testnet listchannels"

Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3080



View Profile
October 07, 2018, 06:29:06 PM
 #35

You checked that the transaction is confirmed?

Also, you might need to manually initiate the first connection, the lnd autopilot possibly doesn't do that part (but auto opens after the first connection is made).

Vires in numeris
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 07, 2018, 06:30:21 PM
Last edit: October 07, 2018, 06:49:38 PM by BitCryptex
Merited by DarkStar_ (2)
 #36

I got some testnet BTC from a faucet and successfully deposited into my LND wallet, but for some reason unable to make a payment to Starblocks. See image below... LND is supposedly on "Autopilot" by default so it should be opening channels on its own, yet I don't see any channels open when I enter "lncli --network=testnet listchannels"

You have to fund a channel first. Below you will find an example how to do it. Here you can browse testnet nodes.

Code:
lncli connect 0269a94e8b32c005e4336bfb743c08a6e9beb13d940d57c479d95c8e687ccbdb9f@197.155.6.38:9735
Code:
lncli openchannel 0269a94e8b32c005e4336bfb743c08a6e9beb13d940d57c479d95c8e687ccbdb9f 20000

20000 is number of satoshis. One satoshi equals 0.00000001 BTC. As far as I remember, six confirmations are needed for channels to work. I might be wrong.
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3080



View Profile
October 07, 2018, 06:34:11 PM
 #37

^^^ Right

1. Make LN connection
2. Open channel
3. Pay someone through channel

Vires in numeris
Zand_ (OP)
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 07, 2018, 08:13:24 PM
 #38

I got some testnet BTC from a faucet and successfully deposited into my LND wallet, but for some reason unable to make a payment to Starblocks. See image below... LND is supposedly on "Autopilot" by default so it should be opening channels on its own, yet I don't see any channels open when I enter "lncli --network=testnet listchannels"

You have to fund a channel first. Below you will find an example how to do it. Here you can browse testnet nodes.

Code:
lncli connect 0269a94e8b32c005e4336bfb743c08a6e9beb13d940d57c479d95c8e687ccbdb9f@197.155.6.38:9735
Code:
lncli openchannel 0269a94e8b32c005e4336bfb743c08a6e9beb13d940d57c479d95c8e687ccbdb9f 20000

20000 is number of satoshis. One satoshi equals 0.00000001 BTC. As far as I remember, six confirmations are needed for channels to work. I might be wrong.

Looks like there is still an issue with the macaroon files/path  Huh

Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 07, 2018, 08:22:33 PM
Last edit: October 07, 2018, 10:37:54 PM by BitCryptex
 #39

Looks like there is still an issue with the macaroon files/path  Huh

Use the following commands to create missing mainnet directory and copy files over there.

Code:
sudo mkdir /home/bitcoin/.lnd/data/chain/bitcoin/mainnet
Code:
sudo cp /home/bitcoin/.lnd/data/chain/bitcoin/testnet/admin.macaroon /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/

Are you sure that your LND instance runs on the testnet?

@Down: Fixed the command. Now it should work.
Zand_ (OP)
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 07, 2018, 08:35:15 PM
Last edit: October 07, 2018, 09:18:59 PM by Zand_
 #40

Looks like there is still an issue with the macaroon files/path  Huh

Use the following commands.

Code:
sudo mkdir /home/bitcoin/.lnd/data/chain/bitcoin/mainnet
Code:
sudo cp --parents /home/bitcoin/.lnd/data/chain/bitcoin/testnet/admin.macaroon .lnd/data/chain/bitcoin/mainnet/

Are you sure that your LND instance runs on the testnet?

Now I'm not so sure... After making the directory and entering that second command I get the following message

cp: with --parents, the destination must be a directory
Try 'cp --help' for more information.


Is it possible to remove the LND entirely and redo that part of the guide? At this point I'm probably better off with a clean install rather than troubleshooting to see what went wrong
Pages: « 1 [2] 3 4 5 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!