PID1 connection problem trying to run Tor with core lightning node

I have the this version of tor, tor-browser-linux64-11.5.8_en-US.tar.xz,
and I get stuck at the point of commanding;
sudo systemctl restart tor

and I this message:

System has not been booted with systemd as init system (PID 1). Can’t operate.
Failed to connect to bus: Host is down.

Ive been working on it for days, I have completely deleted everything relating to tor and reinstalling but I keep coming up against this problem
My PID 1 file does not have a number in it. I dont know how to create a PID 1 number.

I would appreciate any suggestion rather than re-imaging my little Intel-NUC

Why can,t the PID number be recorded in a file, there are heaps of txt files in the tor-bundle.

Tor-Log from the Browser, not sure if it means anything
11/24/22, 09:25:01.750 [NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.
11/24/22, 09:25:09.743 [NOTICE] New control connection opened from 127.0.0.1.

I have used tails mostly in the last decade, though I have also used tor and haven’t had any problems like this that I can recall.

Could you advise where I can go for help if this is not a problem for this forum

me@home

Do you want to run tor (as service) or Tor Browser (as GUI user app).

If the latter, then you just run it. There’s no systemctl restart or anything.
If the former, you need to start the service (tor).
With a systemd-based distribution, you start a service using “systemctl start”, so “systemctl start tor”.

But apparently you have something else, so you would have to either read the documentation for your linux distribution, or post it here.

Maybe also explain what you did with that .tar.xz, i.e. where you installed it and how?

1 Like

Oh, and “PID 1” is just a fancy way of referring to the first process that runs when you boot (called “init”). Can be systemd, but can be something else.

I am running my bitcoin node through tor as non-hidden service
and it is working okay it seems.
I have debian-tor group for my username
But setting it up on the CLightning Node Im getting the error that the debian-tor group doesn exist even though I can see it on the list when I do

getent group | cut -d: -f1 | sort

Well I downloaded
tor-browser-linux64-11.5.8_en-US.tar.xz
tor-browser-linux64-11.5.8_en-US.tar.xz.asc
verified it
then

  • From inside the Tor Browser directory, you can launch Tor Browser by running:‪./start-tor-browser.desktopNote: If this command fails to run, you probably need to make the file executable. From within this directory run: chmod +x start-tor-browser.desktop

Well, I want to run a service. and I m using a guide by grubles

Generating your Tor .onion address

On a Debian-based Linux (such as Ubuntu), simply install tor with apt:

$ sudo apt install tor

We need to edit our /etc/tor/torrc file to configure tor to pass traffic to our c-lightning node and to generate our .onion address(es).

$ sudo nano /etc/tor/torrc

Add these lines to your torrc file:

HiddenServiceDir /var/lib/tor/lightningd-service_v2/
HiddenServicePort 1234 127.0.0.1:9735

This will tell tor to create a version 2 .onion address.

HiddenServiceDir /var/lib/tor/lightningd-service_v3/
HiddenServiceVersion 3
HiddenServicePort 1234 127.0.0.1:9735

This will generate a version 3 address which has many advantages over the older v2 addresses. You can of course create both and be able to have peers connect to either.

With this tor configuration, your Lightning node will have a persistent .onion address and be able to accept incoming channels privately — without exposing your home address.

Once you have your torrc file setup, you can simply restart the tor daemon:

$ sudo systemctl restart tor

Your newly generated addresses can be found in:

/var/lib/tor/lightningd-service_v2/hostname

and

/var/lib/tor/lightningd-service_v3/hostname

Configuring c-lightning:

To run your c-lightning node completely over Tor, simply pass these flags when you start lightningd .

$ ./lightningd --mainnet --bind-addr=127.0.0.1:9735 --announce-addr=<your v2 .onion> --announce-addr=<your v3 .onion> --proxy=127.0.0.1:9050

--bind-addr=127.0.0.1:9735 makes your node only listen for Tor connections.

--announce-addr= announces your onion addresses to the network.

--proxy=127.0.0.1:9050 proxies outgoing connections over Tor.

Now you should be running completely over Tor!

Thats what I am trying to achieve

and thank you for replying

But what linux distribution are you running?

It seems to be neither debian nor ubuntu, as otherwise you would have systemd (as “pid 1”).

From all you’ve written, the (only?) problem seems to be when you execute “sudo systemctl restart tor”, which just means that tor needs to be restarted, so that it will generate your hidden address.
You could just reboot and it will also work.

But maybe you want to explain which OS you’re actually using.

No I have rebooted several times.
I am running MX-Linux; Xfce distro based on Debian Stable

till i remember more new versions tors make you upgrade your onion to V3 :face_with_monocle:

this is my torrc file

ControlPort 9051
CookieAuthentication 1
CookieAuthFile /var/lib/tor/control_auth_cookie
CookieAuthFileGroupReadable 1

HiddenServiceDir /var/lib/tor/lightningd-service_v3/
HiddenServiceVersion 3
HiddenServicePort 1234 127.0.0.1:9735

ExitPolicy reject : # no exits allowed

MX Linux doesn’t use systemd (AFAIK anyway).
We (or I, at least) still don’t know if the tor service is starting or not.
Maybe you could check the log (check in /var/log/tor/) to see if it’s actually starting.
If it is, have a look then in /var/lib/tor/…/hostname and find your hidden service hostname.

If the above does not work, you may have to check in some MX Linux forum. If it does, then either everything is OK, or you still have another problem, in which case you should post about it…

Good luck!