Suddenly started getting this error, where should I look to try and fix it? Tor version Tor compiled with GCC version 12.2.0 and lightning v0.11.2

e: lightning_connectd: Connecting stream socket to Tor service: Connection refused
lightningd: connectd failed (exit status 1), exiting.

tor.service - Anonymizing overlay network for TCP (multi-instance-master) Loaded: loaded (/lib/systemd/system/tor.service; enabled; preset: enabled) Active: active (exited) since Mon 2022-12-19 11:59:13 AEDT; 8h ago Process: 15294 ExecStart=/bin/true (code=exited, status=0/SUCCESS) Main PID: 15294 (code=exited, status=0/SUCCESS) CPU: 1ms Dec 19 11:59:13 Sophia systemd[1]: Starting Anonymizing overlay network for TCP (multi-instance-master)... Dec 19 11:59:13 Sophia systemd[1]: Finished Anonymizing overlay network for TCP (multi-instance-master). Is tor working??? – user209474

My debug.log file does not open when I just enter tor. I get the message Couldn't open file for 'Log debug file var/log/tor/debug.log': No such file or directory debug.log has my user name as the group in file properties. How do I correct this problem. Appreciate any ideas.

torrc config: Log debug file /var/log/tor/debug.log ControlPort 9051 HashedControlPassword16:XXXXX ExitPolicy reject : # no exits allowed

and the ln config;

proxy= bind-addr= addr=statictor: always-use-proxy=true


and finally when I now try to start LN I get: Tor returned '515 Authentication failed: Password did not match HashedControlPassword value from configuration


  • 2
    This sounds like your local Tor daemon is not running. Depending on your distribution the following might work: sudo systemctl status tor. If it shows disabled or some other error code, then you need to address that issue or simply restart it.
    – cdecker
    Dec 18, 2022 at 10:50
  • 1
    @cdecker: I think that sounds like an answer. Could you post it as an answer instead please?
    – Murch
    Dec 18, 2022 at 14:24
  • @Murch not an answer, connectivity problem still exists
    – user209474
    Dec 19, 2022 at 9:29
  • @user209474 Does the tor user have permission to open its debug.log file, and access the rest of its files? You can test this by running sudo -u debian-tor ls -l /var/log/tor/, although the tor username could be different on your system.
    – Zephyrus
    Dec 19, 2022 at 11:25
  • @Zephyrus the tor user name is different, the result was as follows: -rw-r--r-- for debug.log.
    – user209474
    Dec 20, 2022 at 1:28

1 Answer 1


The statictor method uses a control port (9051 by default) and authentication to allow CLN to set up the .onion address and control Tor so you don't have to do it manually. I haven't used statictor myself but I'm pretty sure the following will get you up and running.

There are 2 authentication methods: cookie or password. It looks like you already have it partially set up to use password authentication, so we'll go with that.

The first thing you need to do is choose a password if you have not already chosen one. It can be any password you want. Let's say we've chosen the fake password xyzxyzxyz. Then we would run the following command on the command line. (You will want to use the real password you chose instead of this fake one.)

tor --hash-password xyzxyzxyz

That will return a hash of your password that looks something like this:


That hash needs to be added to torrc so that Tor can authenticate your node. (That's why your getting that error message saying Password did not match HashedControlPassword value from configuration.) In your torrc file you'll need to make sure that HashedControlPassword is set to the hash returned by the command we just ran. You can copy and paste it into torrc and it will look similar to this example.

HashedControlPassword 16:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789

Restart Tor.

Now that Tor knows the hash of your password, you have to let CLN know what the actual password is by adding the following line to CLN's config file. (CLN's config file stores your Tor password in plain text, so the file should be kept as secure as possible.) Using the fake password we chose above, it would look like this. You'll need to use your real password, of course.


Combined with the settings that you already have in your two config files, adding the settings and making the other changes mentioned above should solve your problem.

You can read more details about using statictor and about cookie authentication (the other authentication method) in the Letting Core Lightning Control Tor section of the CLN documentation. You can also find details about the settings and commands supported by your specific version of Tor by running man torrc or man tor.

  • thanks for the info it has been very useful and I can move onto the next problem
    – user209474
    Dec 24, 2022 at 3:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.