1

I have set up monerod to run as a service so it is easier to manage.

Service file:

[Unit]
Description=Monero Full Node
After=network.target

[Service]
User=monero
Group=monero
WorkingDirectory=/mnt/ext/monero/monerod/
RuntimeDirectory=monero/

Type=forking
PIDFile=/run/monero/monerod.pid
ExecStart=/mnt/ext/monero/monerod/monerod --config-file /etc/monerod.conf \
    --detach --pidfile /run/monero/monerod.pid

Restart=always

[Install]
WantedBy=multi-user.target

Config file:

data-dir=/mnt/ext/monero/
log-file=/var/log/monero/monerod.log
log-level=0
no-igd=true
rpc-bind-ip=0.0.0.0
rpc-bind-port=18089
rpc-bind-ipv6-address=IPv6AddrHere
rpc-use-ipv6=true
restricted-rpc=true
confirm-external-bind=true
public-node=true

The service runs as expected, however I am unable to run commands against the daemon.

Example:

Running

./monerod status --rpc-bind-port 18089

Returns

Error: Problem fetching info-- rpc_request:
Height: 2039302/2039302 (100.0%) on mainnet, mining info unavailable, net hash 1.49 GH/s, v12, up to date, 0(out)+0(in) connections

I can't tell whether monerod is actually not connecting to other peers, or if the info can't be fetched.

Did I set up the service incorrectly?

How can I go about running commands against monerod when it is running as a service, and get a response similar to when it is running interactively?

1

The RPC does not return connection info when running the status command because it is a restricted RPC and restricted RPCs do not return any privacy sensitive info.

In order to get the proper output to the status command it must be run against an unrestricted RPC port.

It is possible to run a node with both restricted and unrestricted RPC ports. This would allow public access to your node through the restricted RPC, while keeping the unrestricted RPC sealed off for your own access.

If you decide to run an unrestricted RPC port make sure it is not exposed to the internet!!! Otherwise you may be jeopardizing your privacy and allowing anyone to control your node and use your CPU to mine for their wallet.

| improve this answer | |
  • Perhaps update your answer with the other information given to you in the reddit thread. For example, you can still run a public node with a restricted port and a local unrestricted port. – jtgrassie Mar 2 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.