XorMon on 443

Allow the node binary to use privileged ports (< 1024) so that XorMon can run on the standard HTTPS port (443).
Otherwise, XorMon will run on port 8443.
That is required in case XorMon is started via rc.local script.
XorMon systemd service does not need it, rigths escalation is already included in the Linux.

Note: This procedure must be performed every time you upgrade the Node.js binary.

  • Run as root:
    /usr/sbin/setcap 'cap_net_bind_service=+ep' $(readlink -f $(which node))
    
    # verify it
    /usr/sbin/getcap $(readlink -f $(which node))
    
    # Output should be:
    /usr/bin/node cap_net_bind_service=ep
    
    Some Linux distributions, such as SUSE, set command alternatives for multiple verions.
    In this case, set the port binding capability for the default alternative as well.

    • Check for alternatives
      update-alternatives --get-selections | grep node
        node-default                   auto     /usr/bin/node24
    • Set port binding capability
      /usr/sbin/setcap 'cap_net_bind_service=+ep' /usr/bin/node24
  • Change XorMon port configuration: /home/xormon/xormon-ng/server-nest/.env
    APP_PORT=8443
    -->
    APP_PORT=443
  • Restart XorMon under xormon user
    su - xormon
    cd ~/xormon-ng
    ./xormon.sh stop
    ./xormon.sh start
  • Navigate to XorMon UI
    https://<XorMon-IP/Hostname>/

Dernière mise à jour :