Issue#91 and issue#107 (#111)
* issue#91: Fix in views/network_detail.pug * issue#91: before-upgrade.sh = before-install.sh * issue#91: Update README.md with new instruction for authtoken.secret for zerotier-one 1.10.4 onwards
This commit is contained in:
parent
0557b386a9
commit
42248c1359
34
README.md
34
README.md
@ -10,7 +10,7 @@ Follow us on [![alt @key_networks on Twitter](https://i.imgur.com/wWzX9uB.png)](
|
|||||||
Instructions for installing on Linux from RPM or DEB packges are available at [key-networks.com/ztncui](https://key-networks.com/ztncui).
|
Instructions for installing on Linux from RPM or DEB packges are available at [key-networks.com/ztncui](https://key-networks.com/ztncui).
|
||||||
|
|
||||||
## Docker Container Image
|
## Docker Container Image
|
||||||
See [github.com/key-networks/ztncui-containerized](https://github.com/key-networks/ztncui-containerized)
|
See [https://github.com/key-networks/ztncui-aio](https://github.com/key-networks/ztncui-aio)
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
@ -45,21 +45,9 @@ npm install
|
|||||||
|
|
||||||
##### 3. authtoken.secret
|
##### 3. authtoken.secret
|
||||||
|
|
||||||
The app needs to know the zerotier-one authtoken.secret. There are two options:
|
The app needs to know the zerotier-one authtoken.secret.
|
||||||
|
|
||||||
###### A: Allow access to /var/lib/zerotier-one/authtoken.secret
|
###### Make a .env file
|
||||||
The user running the ztncui app needs read access to authtoken.secret. This can be achieved with:
|
|
||||||
```shell
|
|
||||||
sudo usermod -aG zerotier-one username
|
|
||||||
sudo chmod g+r /var/lib/zerotier-one/authtoken.secret
|
|
||||||
```
|
|
||||||
Where:
|
|
||||||
* username is the user running the ztncui app
|
|
||||||
|
|
||||||
Note that you need to log out and in again to apply the new group membership.
|
|
||||||
|
|
||||||
###### OR
|
|
||||||
###### B: Make a .env file
|
|
||||||
In the root of the ztncui directory, create a `.env` file with the content:
|
In the root of the ztncui directory, create a `.env` file with the content:
|
||||||
```
|
```
|
||||||
ZT_TOKEN=########################
|
ZT_TOKEN=########################
|
||||||
@ -67,17 +55,19 @@ ZT_TOKEN=########################
|
|||||||
Where:
|
Where:
|
||||||
* ######################## is the token string.
|
* ######################## is the token string.
|
||||||
|
|
||||||
You can also specify in the `.env` file a different address for the zerotier-one API (which defaults to localhost:9993):
|
After all edits to the `.env file` (see other options below), make the `.env` readable by the user running ztncui only:
|
||||||
|
```shell
|
||||||
|
chmod 400 .env
|
||||||
|
chown ztncui.ztncui .env
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 4. Zerotier-one API port
|
||||||
|
|
||||||
|
You can specify in the `.env` file a different address for the zerotier-one API (which defaults to localhost:9993):
|
||||||
```
|
```
|
||||||
ZT_ADDR=localhost:9995
|
ZT_ADDR=localhost:9995
|
||||||
```
|
```
|
||||||
|
|
||||||
Make `.env` readable by the user running ztncui only:
|
|
||||||
```shell
|
|
||||||
chmod 600 .env
|
|
||||||
```
|
|
||||||
|
|
||||||
The `.env` file should make it easier to run ztncui on a non-Linux platform.
|
|
||||||
|
|
||||||
##### 4. Run in production mode
|
##### 4. Run in production mode
|
||||||
To run the server in production mode, add the following to the `.env` file (see 3B above):
|
To run the server in production mode, add the following to the `.env` file (see 3B above):
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
getent passwd ztncui || useradd --system --home-dir /opt/key-networks/ztncui --shell /bin/false ztncui
|
||||||
|
if [ $(getent group zerotier-one) ]; then
|
||||||
|
echo "Adding user ztncui to group zerotier-one..."
|
||||||
|
usermod -a -G zerotier-one ztncui
|
||||||
|
chmod g+r /var/lib/zerotier-one/authtoken.secret
|
||||||
|
else
|
||||||
|
echo "Could not add user ztncui to group zerotier-one... is zerotier-one installed?"
|
||||||
|
fi
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ztncui",
|
"name": "ztncui",
|
||||||
"version": "0.8.11",
|
"version": "0.8.13",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./bin/www",
|
"start": "node ./bin/www",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//-
|
//-
|
||||||
ztncui - ZeroTier network controller UI
|
ztncui - ZeroTier network controller UI
|
||||||
Copyright (C) 2017-2021 Key Networks (https://key-networks.com)
|
Copyright (C) 2017-2023 Key Networks (https://key-networks.com)
|
||||||
Licensed under GPLv3 - see LICENSE for details.
|
Licensed under GPLv3 - see LICENSE for details.
|
||||||
|
|
||||||
extends network_layout
|
extends network_layout
|
||||||
@ -135,6 +135,7 @@ block net_content
|
|||||||
td
|
td
|
||||||
if (peer)
|
if (peer)
|
||||||
each path in peer.paths
|
each path in peer.paths
|
||||||
|
if (path.preferred == true)
|
||||||
- const [ip, port] = path.address.split('/');
|
- const [ip, port] = path.address.split('/');
|
||||||
= ip
|
= ip
|
||||||
span(style='color: gray;') /#{port}
|
span(style='color: gray;') /#{port}
|
||||||
@ -142,6 +143,7 @@ block net_content
|
|||||||
if (peer.latency != -1)
|
if (peer.latency != -1)
|
||||||
br
|
br
|
||||||
| (#{peer.latency} ms)
|
| (#{peer.latency} ms)
|
||||||
|
- break
|
||||||
else
|
else
|
||||||
.alert.alert-info
|
.alert.alert-info
|
||||||
strong There are no members on this network - invite users to join #{network.nwid}
|
strong There are no members on this network - invite users to join #{network.nwid}
|
||||||
|
Loading…
Reference in New Issue
Block a user