nkn.ovh - Open source monitoring for NKN nodes
Be careful! nkn.ovh is no longer the official domain of the project!
- Since version 1.1 the programm can work in standalone mode (without frontend proxy), but only for HTTP protocol.
- Network bandwidth 30 mbps+.
- MySQL 5.6+ / MariaDB 10+ with InnoDB support.
- At least 512MB RAM
- (Optional) Any frontend server with WebSocket proxy support for HTTPS protocol access.
- For building the nknovh daemon, you need Golang 1.15 or higher
- Get the package and build it:
git clone https://github.com/bytestostring/nkn.ovh.git
cd nkn.ovh
# Compile main daemon
go build cmd/nknovh/nknovh.go
# Compile WebAssembly (optionally)
GOOS=js GOARCH=wasm go build -ldflags=-s -o web/static/lib.wasm cmd/wasm/wasm.go
Note. If you have compiled WebAssembly (wasm.go), make sure to copy wasm_exec.js from your golang distribution to web/static/js/ directory. As example, for Go version 1.15, this file can be found here: https://github.com/golang/go/blob/dev.boringcrypto.go1.15/misc/wasm/wasm_exec.js
- Create a database and import the sql file this way:
mysql -uroot -p
CREATE DATABASE nknovh;
quit
mysql -uroot -p nknovh < struct.sql
- Copy the configuration file:
cp conf.json.example conf.json
-
Edit DB settings in the configuration file conf.json, Also if you use proxy server, add your proxy server IP into TrustedProxies json array.
-
Run daemon
./nknovh
Optionally you can use systemd script located in scripts/systemd/ (Linux)
- Go to http://your_ip:8081/ The first loading the frontend interface may be long because the application should scan NKN Mainnet Network firstly.
You can check journal files in the logs directory
-
Stop your nknovh: kill -9 / systemctl stop nknovh / etc
-
Check the version of your nknovh
cat conf.json | grep "Version"
- Upgrade using git, and recompile main daemon.
git pull
go build cmd/nknovh/nknovh.go
- Optionally! ONLY If you want to recompile .wasm binary from source:
GOOS=js GOARCH=wasm go build -ldflags=-s -o web/static/lib.wasm cmd/wasm/wasm.go
Note, if you have compiled lib.wasm, make sure to copy wasm_exec.js from your golang distribution to web/static/js directory.
- Before restarting the nknovh, check "sqlupgrade" directory for sql changes and import the changes if they exist. For example, if your current version is "1.1.0" and you need to upgrade your database structure to the latest version "1.1.0-dirty-4":
mysql -uroot -p nknovh < sqlupgrade/from-1.1.0-to-1.1.0-dirty-4.sql
- Start the nknovh:
./nknovh
# Or if you are using the systemctl script
systemctl start nknovh
If you want to support this project: