mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
doc/TOR.md: Add missing instructions to add user to Tor group.
Changelog-None Fixes: #4208
This commit is contained in:
committed by
neil saitug
parent
e4cd5eac28
commit
ff090ecfe6
48
doc/TOR.md
48
doc/TOR.md
@@ -69,6 +69,54 @@ Uncomment those in, then restart `tor` (usually `systemctl restart tor` or
|
|||||||
Debian and Ubuntu, or just restart the entire computer if you cannot figure
|
Debian and Ubuntu, or just restart the entire computer if you cannot figure
|
||||||
it out).
|
it out).
|
||||||
|
|
||||||
|
On some systems (such as Arch Linux), you may also need to add the following
|
||||||
|
setting:
|
||||||
|
|
||||||
|
```
|
||||||
|
DataDirectoryGroupReadable 1
|
||||||
|
```
|
||||||
|
|
||||||
|
You also need to make your user a member of the Tor group.
|
||||||
|
"Your user" here is whatever user will run `lightningd`.
|
||||||
|
On Debian-derived systems, the Tor group will most likely be `debian-tor`.
|
||||||
|
You can try listing all groups with the below command, and check for a
|
||||||
|
`debian-tor` or `tor` groupname.
|
||||||
|
|
||||||
|
```
|
||||||
|
getent group | cut -d: -f1 | sort
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternately, you could check the group of the cookie file directly.
|
||||||
|
Usually, on most Linux systems, that would be `/run/tor/control.authcookie`:
|
||||||
|
|
||||||
|
```
|
||||||
|
stat -c '%G' /run/tor/control.authcookie
|
||||||
|
```
|
||||||
|
|
||||||
|
Once you have determined the `${TORGROUP}` and selected the
|
||||||
|
`${LIGHTNINGUSER}` that will run `lightningd`, run this as root:
|
||||||
|
|
||||||
|
```
|
||||||
|
usermod -a -G ${TORGROUP} ${LIGHTNINGUSER}
|
||||||
|
```
|
||||||
|
|
||||||
|
Then restart the computer (logging out and logging in again should also
|
||||||
|
work).
|
||||||
|
Confirm that `${LIGHTNINGUSER}` is in `${TORGROUP}` by running the
|
||||||
|
`groups` command as `${LIGHTNINGUSER}` and checking `${TORGROUP}` is listed.
|
||||||
|
|
||||||
|
If the `/run/tor/control.authcookie` exists in your system, then log in as
|
||||||
|
the user that will run `lightningd` and check this command:
|
||||||
|
|
||||||
|
```
|
||||||
|
cat /run/tor/control.authcookie > /dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
If the above prints nothing and returns, then C-Lightning "should" work
|
||||||
|
with your Tor.
|
||||||
|
If it prints an error, some configuration problem will likely prevent
|
||||||
|
C-Lightning from working with your Tor.
|
||||||
|
|
||||||
Then make sure these are in your `${LIGHTNING_DIR}/config` or other C-Lightning configuration
|
Then make sure these are in your `${LIGHTNING_DIR}/config` or other C-Lightning configuration
|
||||||
(or prepend `--` to each of them and add them to your `lightningd` invocation
|
(or prepend `--` to each of them and add them to your `lightningd` invocation
|
||||||
command line):
|
command line):
|
||||||
|
|||||||
Reference in New Issue
Block a user