Servers: the CLI miner
necter-miner is one binary: CLI, background daemon, local HTTP API and dashboard. Mining needs no inbound
port: everything is outbound HTTPS plus one outbound WebSocket.
Install
Section titled “Install”The installer downloads the prebuilt binary for your platform (Linux x86_64 or aarch64, static; macOS Apple
Silicon or Intel), verifies its checksum and puts it in ~/.necter/bin. No sudo is needed.
curl -fsSL https://necter.network/install.sh | sh -s -- minernecter-miner --versionIf necter-miner is not found, add ~/.necter/bin to your PATH with the line the installer printed
(PATH lines). The archives
(necter-miner-1.0.1-<target>.tar.gz, with SHA256SUMS) are also on the
necter-releases page. On
Windows, use the necter-miner-<version>-x86_64-pc-windows-msvc.zip CLI from the same page (it also
installs as a Windows service, see Windows app) or the Linux
miner inside WSL.
Set up and join a project
Section titled “Set up and join a project”-
Initialize the data directory, the device key (
node.key) and an embedded wallet:Terminal window necter-miner initOn a server it asks
Open the web dashboard on this server's IP? [y/N]. Answeryto set a dashboard password (asked twice, at least 12 characters) and serve the dashboard over HTTPS on port 7878; the defaultNkeeps it on127.0.0.1only. See the dashboard on a server. -
Join a project: bind the device to the embedded wallet, get test NECTA from the faucet and subscribe with collateral, in one step. On a server that will run the miner as a service, add
--no-run:Terminal window necter-miner join --project 0x<project_id> --payout 0x<your payout address> --no-runWithout
--no-run,joinkeeps mining in the foreground until you stop it (Ctrl-C). -
Check it:
Terminal window necter-miner status
Data: ~/.local/share/necter-miner on Linux, ~/Library/Application Support/network.necter.miner on macOS.
On a headless host without a keyring, the embedded wallet’s encryption key lives in
<data_dir>/wallet.key (0600) unless you pass --wallet-key-file.
Run it as a service
Section titled “Run it as a service”Run service install through sudo, from the account that ran init and join:
sudo ~/.necter/bin/necter-miner service installnecter-miner statusIt writes /etc/systemd/system/necter-miner.service and enables and starts it. The service runs as your
user, with the data directory init and join set up (~/.local/share/necter-miner, or the --data-dir
you pass), so it keeps the same device identity, wallet binding, subscriptions and dashboard settings. It is
hardened with ProtectSystem=strict, ProtectHome=read-only (only the data directory is writable) and
NoNewPrivileges. Logs: journalctl -u necter-miner -f.
Stop a miner you started by hand first (necter-miner stop --daemon); service install refuses to start a
second instance on the same data directory.
Run directly as root (no sudo), the service uses a dedicated necter-miner system user with
/var/lib/necter-miner instead, and copies root’s own miner data there the first time.
necter-miner ui # opens the local dashboard at http://127.0.0.1:7878, already signed innecter-miner service install # launchd agent ~/Library/LaunchAgents/network.necter.miner.plistThe agent starts the miner at login; logs go to ~/Library/Logs/necter-miner.log.
necter-miner service uninstall removes the service (the data directory is kept).
join: one-step setup
Section titled “join: one-step setup”necter-miner join --project <id> does init + bind (embedded wallet) + faucet + subscribe + run:
| Flag | |
|---|---|
--project <id> |
the project to mine (its id from the store) |
--collateral <NECTA> |
decimal, e.g. 10 or 12.5; default: the project’s minimum |
--payout 0x… |
where rewards go (default: the owner wallet) |
--no-run |
do not start the daemon afterwards |
Find project ids in the store, or: curl -s https://testnet-rpc.necter.network/v1/projects.
A fresh init prints:
Data dir: /home/miner/.local/share/necter-minerNode ID: ndsr-f7f67866c5cfe55cWallet: 0x0414cceceab0d06f76db18c923afca75c672ceb4 (embedded)Dashboard: ssh -L 7878:127.0.0.1:7878 <user>@<host> then open http://127.0.0.1:7878and status:
State: stoppednode: ndsr-f7f67866c5cfe55cowner: (unbound)relay: disconnectedengine: nativeleases: 0 active, 0 today (0 units)(daemon not running; start it with `necter-miner start`)Everyday commands
Section titled “Everyday commands”necter-miner status [--json] # state, owner, relay, engine, leasesnecter-miner start | stop [--daemon] # stop mining; --daemon also exits the daemonnecter-miner subscriptions [--json]necter-miner claims [--submit] # show / claim rewards (gasless)necter-miner faucet # test NECTA for the owner walletnecter-miner leave --project <id> # unbond this device's subscriptionnecter-miner withdraw --project <id> # withdraw released collateral after unbondingnecter-miner payout set 0x… # change the payout address (gasless)necter-miner policy show | policy set max_cpu_pct=50 networks='["ethernet"]'necter-miner logs [-f] [--level warn]necter-miner bench # run the benchmark suitenecter-miner update [--check]Full list: necter-miner CLI.
The dashboard on a server
Section titled “The dashboard on a server”By default the dashboard listens only on 127.0.0.1:7878. Reach it through SSH:
ssh -L 7878:127.0.0.1:7878 user@host # then open http://127.0.0.1:7878To open it on the server’s IP (opt-in; password and TLS are mandatory):
-
Enable it interactively:
Terminal window necter-miner ui enable-remote # prompts for a password twice (min 12 chars)necter-miner ui enable-remote --domain miner.example.org # Let's Encrypt instead of self-signedor non-interactively:
Terminal window install -m 600 /dev/stdin /root/ui-pass <<< 'a-long-unique-password'necter-miner --ui-public --ui-password-file /root/ui-pass run -
Allow TCP 7878 in your firewall or security group.
-
Open
https://<server-ip>:7878. With the self-signed certificate, compare the SHA-256 fingerprint the CLI printed with the one your browser shows before accepting it.
How it is protected:
- The password is stored only as an argon2id hash in
miner.toml. The daemon refuses to start (exit 78) if the dashboard is bound to a non-loopback address without a password or without TLS. - TLS: a self-signed ECDSA P-256 certificate (397 days, renewed 30 days before expiry), or Let’s Encrypt with
--ui-domain(HTTP-01 on port 80, or TLS-ALPN-01 when the dashboard uses port 443). - 5 failed sign-ins per IP in 15 minutes → 15-minute lockout, doubling up to 24 hours; 60 attempts per minute
globally. Sessions are
Secure; HttpOnly; SameSite=Strictcookies (12 h, 1 h idle) with CSRF protection. - Payout changes, unbond, withdraw, wallet create/unlock and dashboard settings ask for the password again. Wallet import and export are never available remotely.
necter-miner ui status | disable-remote [--forget-password] | set-password | rotate-tokenwork on a running daemon.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | ok |
| 1 | runtime error |
| 2 | usage error |
| 73 | cannot create the data directory or key |
| 75 | another instance holds miner.lock |
| 78 | configuration refused (e.g. remote dashboard without password/TLS) |
If the Hub is unreachable, the daemon keeps running, serves the dashboard, raises a hub_unreachable alert and
retries with backoff (1 s to 60 s).
Upgrade and uninstall
Section titled “Upgrade and uninstall”To upgrade, re-run the installer: a newer installer installs the newer release. necter-miner update --check
tells you whether one is available. If you run the systemd service, restart it afterwards:
sudo systemctl restart necter-miner.
To remove the service and then the binary:
necter-miner service uninstallcurl -fsSL https://necter.network/install.sh | sh -s -- --uninstallOn Linux run service uninstall with sudo (as you did for service install). The installer’s uninstall
removes only what it installed; your miner data (device key, wallet, configuration) is kept in the data
directory.