Skip to content
Plasmoid77Public

About

Minimal CLI/TUI for running one P2Pool + XMRig pair under systemd

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Moneroid

Minimal CLI/TUI to run one P2Pool + XMRig pair under systemd on Linux: status, health, doctor, logs, start/stop, payouts, node probing. One static binary; the upstream programs stay untouched.

A small CLI/TUI for operating one P2Pool + XMRig pair under systemd on Linux. A single binary without host dependencies; the miners remain the stock upstream programs with their native configs and are updated independently. Moneroid mines nothing, stores nothing and rewrites nothing — it only uses systemctl, journalctl, the XMRig HTTP API and the P2Pool Data API files.

XMRig ──Stratum──▶ P2Pool ──RPC/ZMQ──▶ Monero node
   ▲                  ▲
   └── moneroid ─────┘   (systemd · GET /2/summary · reads /run/…-api)

Status: v1 is implemented and verified on Arch Linux (systemd 261), Debian 13 (systemd 257) and Ubuntu 22.04 (systemd 249) with P2Pool 4.18 and XMRig 6.26.0 — acceptance report.

What it does

Command What it does
moneroid status [--json] [--check] Service states, XMRig/P2Pool metrics, source freshness, health with reasons. --check → exit 1 unless health is ok
moneroid tui Live full-screen dashboard in the spirit of htop: hashrate with meters and a sparkline, P2Pool, payouts, issues; start/stop/restart menu with confirmation, journal view, payouts screen (p)
moneroid start|stop|restart [all|p2pool|xmrig] Control through systemd; prints the actual state afterwards
moneroid logs [--follow] [--lines N] [target] journalctl by exact unit names
moneroid doctor [--json] 31 checks: units, dependencies, permissions, APIs, freshness, node
moneroid payouts [--json] [--since TIME] Payouts from the P2Pool journal: time, amount, block, total; the wallet address is never printed
moneroid node list / node select [--dry-run] Probes the nodes from nodes.txt (RPC latency, sync, ZMQ port); select rewrites host/rpc-port/zmq-port in p2pool.conf
moneroid config path, version Utilities

status and tui use the Monero colours (orange/white; red only for problems); in a pipe or with NO_COLOR=1 the output is plain text, and the meaning is always in the text.

Boundaries (deliberate): no binary installer inside the tool, no auto-updates, no database, no web UI, no monerod management, no multiple stacks, no kernel/MSR/hugepages tuning inside the tool. The full list is in the spec.

Requirements

  • Linux x86_64, systemd ≥ 249 (verified up to 261); polkit only for the optional password-less control.
  • Installed P2Pool and XMRig binaries (official releases, checksum/signature verified).
  • A Monero node with RPC and ZMQ (--zmq-pub) open: your own or a remote one. A remote node sees the host's IP and the payout address.
  • A primary Monero wallet address (starts with 4).

Installation

One command (Linux x86_64 with systemd; Debian 13, Ubuntu 22.04 and Arch verified), as a user with sudo:

curl -fsSLO https://raw.githubusercontent.com/Plasmoid77/moneroid/main/install.sh
sh install.sh --wallet 4YOUR_PRIMARY_ADDRESS          # + --enable (autostart), --hugepages, --node HOST:RPC:ZMQ, --sidechain mini|nano|main

--i2p (together with --node LAN_IP:RPC:ZMQ or a .b32.i2p node) installs i2pd, creates a server tunnel and moves P2Pool's p2p traffic into I2P — see the section in docs/install.md.

The script downloads the official P2Pool and XMRig releases and the Moneroid binary, checks them against the SHA256 values pinned in the script (the P2Pool signature was verified when pinning), creates the group and two system users, installs the configs and unit files, picks a Monero node by probing nodes.txt, starts the services and shows doctor. Running it again overwrites nothing in /etc/moneroid. Removal: sh install.sh --uninstall [--purge].

Manually, step by step (or from source: make build, Go 1.27) — docs/install.md.

Permissions

  • status, tui, doctor, logs — a regular user in group moneroid (reads the Data API and configs) plus systemd-journal/wheel for the journal.
  • start/stop/restart — through sudo or the optional polkit rule examples/polkit/50-moneroid.rules (two units only, start/stop/restart only, group moneroid only).
  • node select writes p2pool.conf → sudo.
  • The Data API directory contains local/console with the cookie of the P2Pool TCP console: read access to the directory equals control of P2Pool, hence a single group.

How it works and how to maintain it

  • docs/architecture.md — data flow, packages, invariants, health rules.
  • AGENTS.md — change rules for people and AI agents, known traps.
  • CHANGELOG.md · releases on GitHub, sha256sum -c SHA256SUMS.
  • make check — gofmt, vet, tests (no network, no systemctl), static build; CI does the same.

Documents

License — MIT. XMRig and P2Pool are not part of the distribution and come under their own licenses.

About

Minimal CLI/TUI for running one P2Pool + XMRig pair under systemd

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages