Security Recommendations
Operator responsibility
These recommendations are a collection of practical notes contributed by independent node operators. There is no central ADAMANT company, operations team, or support service managing network hosts. Every operator selects their own architecture and tools and is solely responsible for the security and availability of their nodes and services. Following these recommendations reduces common operational risks, but cannot guarantee protection against compromise; adapt and verify every step in your own environment.
Access
- Use SSH keys only: Disable password authentication and root password login in
sshd_config. Issue a separate SSH key per person and per device so a single lost laptop or rotated key can be revoked without affecting other access. - Protect provider console and recovery channels: Enable hardware or TOTP multi-factor authentication on your VPS provider account, DNS registrar, and out-of-band console. Host-level SSH hardening does not protect against a compromised hosting control panel.
- Non-default SSH ports and port knocking (optional): Moving SSH to a non-default port or placing it behind a port-knocking daemon (for example
knockd) reduces automated scan noise and log clutter. Treat these measures as noise reduction only — they are not access control and do not replace strong key management or firewall allowlists. - Least-privilege service accounts: Run the ADAMANT node under its dedicated unprivileged user (for example
adamant) rather thanroot, and avoid granting unnecessarysudoprivileges to service accounts.
Firewall
- Keep one firewall owner on the host: Pick a single firewall manager (for example
nftablesorufw) rather than mixing tools that silently overwrite each other's rules. - Cover both IPv4 and IPv6: Apply matching default-deny inbound policies on both address families (for example allowing SSH only from your administration ranges such as
198.51.100.0/24or2001:db8::/32). - Expose only required ports:
- Public P2P/HTTP port (
36666mainnet /36667testnet) if participating directly in peer exchange, or reverse-proxied HTTPS (443) for a public API node. - Client WebSocket port (
36668mainnet /36665testnet) only when intentionally serving WebSocket clients (directly or behind a TLS reverse proxy). - Keep PostgreSQL (
5432), Redis (6379), local monitoring agents, and the forging Unix control socket (0600in a0700directory) strictly private.
- Public P2P/HTTP port (
- Container networking caveat: Container runtimes (such as Docker) publish
-pports via NAT rules that can bypass simple hostINPUTfirewall policies. Bind container-only services explicitly to127.0.0.1(for example-p 127.0.0.1:36666:36666) or enforce rules in the container runtime's forward chain. - Public coin-node RPC frontends: If operating companion coin nodes or wallet backends on the same infrastructure, note that RPC proxies expose every daemon method that the frontend does not explicitly filter. Never hold an active wallet or unencrypted funds on a host that serves public RPC traffic.
Updates and Vulnerability Checks
- Automate OS security updates, but exclude databases: Enable unattended security patches for base OS packages, while explicitly excluding PostgreSQL and Redis server packages from unattended upgrades. An unexpected PostgreSQL restart can interrupt active node operations; coordinate database updates with a graceful node stop first.
- Cover third-party repositories: PostgreSQL installed from the PGDG repository (as configured by
tools/install_node.sh) is not covered by Ubuntu's defaultunattended-upgradesorigins. Maintain a separate scheduled update routine for PGDG, Node.js, and any reverse-proxy packages. - Audit OS and runtime versions regularly: Periodically scan installed OS packages and the Node.js runtime (for example with
trivyor distribution advisories) and keep Node.js on a supported release (^22.22.2 || >=24.15.0as defined inpackage.json). - Verify installation sources: Run
tools/install_node.sh,tools/install_node_centos.sh, andtools/fix_node.shfrom a reviewed Git checkout rather than piping unverified remote scripts directly into a root shell. Verify any downloaded blockchain snapshot against a SHA-256 digest obtained from an independent trust channel.
Node Exposure
- Public API access (
api.access.publicandapi.access.whiteList): Keepapi.access.publicset tofalseon private or forging-only nodes. - Reverse proxy and Tor onion loopback pitfall: Placing a reverse proxy (Nginx, Caddy, HAProxy) or a Tor onion service in front of the node makes every proxied request arrive from
127.0.0.1. WithtrustProxy: false, every remote visitor matches the defaultapi.access.whiteList: ["127.0.0.1"]and shares a single rate-limit bucket.- Enable
trustProxy: trueonly when the node is reachable exclusively through one immediate reverse proxy that appends the real client IP toX-Forwarded-For(the node trusts only the single rightmost hop). - Never expose the node port directly to untrusted networks while
trustProxy: true. - When serving a Tor onion service, keep in mind that Tor does not provide per-client IP addresses, so apply outer rate limits at the proxy layer.
- Enable
- Enable anti-abuse limits: Review
api.options.limits,peers.options.limits,wsClient.limits, andwsNodeagainstconfig.default.json. Existing configs copied from older versions that still setmax: 0remain unprotected until you delete thelimitsblock or setlimitabove0. - Apply proxy or firewall rate limits to
/peer/*in v0.11.0: For mixed-version rollout compatibility with olderv0.10.xpeers,v0.11.0skips in-node/peer/*rate-limit and slow-down middleware for requests that omitX-Adamant-Rate-Limit: 1. Because callers control that header, hostile clients omitting it are not rate-limited by the node on/peer/*(includingGET /peer/blocks). Enforce outer rate limits or connection limits on/peer/*at your reverse proxy or firewall until unconditional/peer/*rate limiting ships after network rollout. - Legacy control APIs removed: As of v0.11.0, forging control routes and DApp runtime routes are no longer exposed over HTTP. Forging is controlled solely through
forging.secret, graceful restarts, and (for encrypted passphrases) the local0600Unix control socket. - Directory permissions for the control socket: Verify that the node checkout directory and its ancestors are not group- or world-writable (avoid
0775from a002umask; usechmod g-w,o-w), or the node will refuse to open its local forging control socket.
Process Lifecycle
- Graceful shutdown only: Always stop the node with one catchable signal (
SIGINTorSIGTERM) and wait until the log printsCleaned up successfully(seeAGENTS.mdand Installation — Graceful Shutdown). - Timeouts and service ordering:
- Do not rely on PM2's default 1600 ms
kill_timeout. Use at least120000ms (120seconds), matching the ecosystem file created bytools/install_node.sh. - Give systemd stop timeouts enough headroom for graceful drain and order the node service to stop before PostgreSQL and Redis stop.
- Disable core dumps for the node process in systemd so process memory containing keypairs is not written to disk on crash.
- Do not rely on PM2's default 1600 ms
- Database restarts: Even with v0.11.0 PostgreSQL reconnect and query-timeout improvements, stop the node cleanly before planned PostgreSQL restarts and verify synchronization resumes normally afterward.
- Encrypted signers start locked: When using encrypted delegate passphrases, every reboot, crash recovery, or planned restart leaves forging locked until an operator unlocks it via
npm run adm-node -- forging unlock.
Monitoring
Track both local host health and independent public chain state (for example with Zabbix, Prometheus, or simple cron checks):
- Chain height and sync status: Compare the node's height (
/api/blocks/getHeightor/api/node/status) against several independent peers and alert on sustained drift orsyncing: true. - Disk space and inodes: Alert well before root or PostgreSQL volumes fill up (disk exhaustion can corrupt database writes or block checkpoint rotation).
- TLS certificate expiry: Check certificate expiration against the live public HTTPS URL (for example
https://node.example.com), not only files on disk, to catch reload failures. - Backup freshness: Alert when scheduled backups stop completing or fail verification.
- Forging lock state and delegate outcome: Monitor local lock state through the owner-only control socket and monitor public missed blocks / productivity from a separate logical host so delegate identities are not linked to the forging host's address. See Monitoring.
Secrets and Backups
- Keep secrets out of command lines and logs: Never pass delegate passphrases or operator passwords via CLI flags, environment variables, shell history, or shared chat/clipboard tools. Encrypt delegate passphrases in
config.jsonwithnpm run adm-node -- forging encrypt(see Configuration — Encrypted Delegate Passphrases). - Encrypt off-host backups: Encrypt configuration and database backups before transferring them off-host, and restrict access to backup credentials.
- Test restores without double-signing: Periodically verify backup restores on an isolated host, and make sure
forging.secretis empty during any restore test so a second host never starts forging with the same delegate key.
If Something Goes Wrong
If you suspect host compromise or unauthorized access:
- Restrict access: Block inbound/outbound traffic at the provider firewall or isolate the host immediately while preserving forensic access if needed.
- Preserve logs and evidence: Copy system logs, SSH auth logs, PM2/node logs, and process/network snapshots off the compromised host for review.
- Rebuild from a clean image: Do not try to clean an untrusted host in place. Provision a fresh OS image, reinstall from reviewed sources, and restore only verified data.
- Rotate credentials: Replace all SSH keys, database passwords, Redis passwords, monitoring PSKs/certificates, TLS private keys, and operator passwords that were present on the affected host.
- Protect funds on a clean device: If a delegate passphrase or account key may have been exposed, transfer funds and update delegate/voting setup from a separate, clean device.