key-networks / ztncui

ZeroTier network controller UI
GNU General Public License v3.0
1.53k stars 228 forks source link

ZT-TOKEN #49

Closed Jarusss closed 3 years ago

Jarusss commented 3 years ago

Hi, I have extremely naive question ;) During the installation steps you wrote: ZT_TOKEN=######################## what is ZT_TOKEN? How to get and how to use it?

Thanks in advance :)

key-networks commented 3 years ago

Firstly, you need to install zerotier-one - https://www.zerotier.com/download/

Then: sudo cat /var/lib/zerotier-one/authtoken.secret

Jarusss commented 3 years ago

@key-networks I installed ZeroTier as described in installation instruction. But why and when should I use it?

key-networks commented 3 years ago

ztncui is a web UI to ZeroTier acting in the role of a network controller. Without ZeroTier, ztncui has nothing to interact with.

Jarusss commented 3 years ago

Ok, i just try to understand it, because right now I haven't set this token and I'm able to add new nodes to my network and authorize. That is why I'm asking :-)

Fastidious commented 3 years ago

@Jarusss are you using ztncui? I went a little bit broader than the install instructions recommend. I granted access to zerotier-one:zerotier-one to the entire zerotier-one directory under /var/lib/. No issues.

Jarusss commented 3 years ago

@Fastidious I do not have any issues. I was wondering about this field. @key-networks wrote that ZT_TOKEN comes from authtoken.secret, but why need I use it? As I wrote, in my configuration I forgot (to be honest - do not know what it is) to add ZT_TOKEN to .env file and it is working. I can add new hosts, manage them, connect between them. That is why I was asking - where and why should I use authtoken.secret? Not as an issue - just wondering ;-)

key-networks commented 3 years ago

@Jarusss, did you perhaps execute the previous option?

sudo usermod -aG zerotier-one username
sudo chmod g+r /var/lib/zerotier-one/authtoken.secret
Jarusss commented 3 years ago

Yes. As I said - all steps from the instruction.

key-networks commented 3 years ago

Ok, that explains it - you need to do either A or B under step 3. B is redundant if you have done A.