On 21.12.2020 08:31, Thomas wrote:
It works fine when I run it as sudo, but according to its output, it "isn't a good idea, nor should it be necessary." So my first question is: How do I go about getting Nyx to connect to Tor's control socket as a standard, non-sudo process?
That will be FAQ in this list ;-) You have to add yourself to the Tor user 'debian-tor' group. (_tor-00, _tor-01,... if you set up several instances. see below)
adduser user_name group_name or usermod -aG user_name group_name
usermod -aG debian-tor user
My second question revolves around running the Tor daemon as a service. It seems as if, again, I need to run it as root to make it work, otherwise it gives me permission denied errors. What I want is to be able to run 2 consecutive nodes on different accounts; that way I can be more safe and secure while running my relay. If that's able to happen, how would I go about configuring my relay daemons to be separate, i.e. where would I put my torrc?
Create 2 or more Tor instances: ~$ apt install tor-instances installs a helper script on a Debian or Ubuntu system. On other distributions you have to do all of this by hand what this script does!
~$ systemctl stop tor
~$ tor-instance-create 00 ~$ tor-instance-create 01 ~$ ... ~$ systemctl enable tor@00 ~$ systemctl enable tor@01 ~$ ... ~$ systemctl mask tor@default
~$ nano /etc/tor/instances/00/torrc ~$ nano /etc/tor/instances/01/torrc ~$ ...
~$ systemctl start tor@00 ~$ systemctl start tor@01 ...
To see if the tor daemon is running: systemctl status _tor@00 systemctl status _tor@01 or '~$ journalctl -xe' to see if everything is ok
I wrote it a little more in detail in the PIVX forum. Ignore the PIVX stuff: https://forum.pivx.org/threads/howto-setup-masternode-or-staker-wallet-behin...