8

I'm running a headless, low wattage Ubuntu 16.04 (x86, if that matters) system that I have SSH'ed into, ran Screen, ran ./monerod, and then detached the Screen. This is my node. I also set up this system with a static IP, both within Ubuntu and within my router settings.

I've got a second computer (client) that I dual boot into either Mac OSX or Ubuntu. I figure I can --restore-deterministic-wallet in each OS (which happens to be a wallet from a prior installation), and then I can use that wallet from either OS. I'll just need to ensure it refreshes whenever switching to the other OS, if I've made any transactions.

Anyway, what I was thinking is that I want the wallet on this computer (client) to be refreshed from the other computer (node).

Can this work? Basically, I don't want my "client" computer to have to sync the blockchain every time it fires up. I just want to use it as a light client, since I've already got a node online and fully synced. Can I do it? How do I do it?

2 Answers 2

6

Yep! That can totally work. We'll call your headless node the Monerodo for simplicities sake (Monerodo = Monero Node).

On the Monerodo you want to launch monero with the following flag:

monerod --rpc-bind-ip IP.OF.YOUR.MONERODO

This tells your daemon to listen to RPC calls on the IP address provided.

Then on your other computers, you just run the wallet with:

monero-wallet-cli --daemon-host IP.OF.YOUR.MONERODO

And that's it!

You'll have to open the firewall for port 18081 on your Monerodo to allow connections between the two devices.

4
  • 1
    I have a couple clarification follow ups. A. I tried the first command, and the daemon failed. But I changed --rpc-bind-port into --rpc-bind-ip, and that worked. B. I didn't do any firewall work, and my wallet is currently refreshing successfully, it appears. Oct 10, 2016 at 4:15
  • It was probably a typo as he gives an IP as the argument rather than a port no. Good thing you noticed.
    – pl55
    Oct 10, 2016 at 8:16
  • Are there security concerns with such a setup? Seems this opens up your node to RPC requests from anyone, correct? Apr 3, 2017 at 19:20
  • Anyone within your internal network. Most home routers have firewalls that prevent anything from the internet from getting into your home network. In order to access it from outside of your home network, you'd need to setup some port forwarding.
    – Ginger Ale
    Apr 3, 2017 at 23:59
2

I was trying to do the same thing, but so far didn't realize what I was doing wrong. There reason it took me so long to figure it out was that I didn't find the errors here on Stack Exchange, at least not in the context of using a LAN node. Therefore, I'll post them in my answer, to hopefully help other people searching for them. My LAN set-up:

  • Server, where monerod is running, with an up-to-date blockchain.
  • Laptop, where I also have the Monero (CLI) software installed.

On the server, I could obviously use monero-wallet-cli without passing any special options.

However, from the laptop, using the --daemon-host option didn't work. I always got these wallet failed to connect to daemon errors:

$ monero-wallet-cli --daemon-host 192.168.0.100 --wallet-file monero.wallet
Monero 'Wolfram Warptangent' (v0.10.1.0-release)
…
**********************************************************************
Use "help" command to see the list of available commands.
**********************************************************************
Error: wallet failed to connect to daemon: http://192.168.0.100:18081. Daemon either is not started or wrong port was passed. Please make sure daemon is running or restart the wallet with the correct daemon address.
Error: wallet failed to connect to daemon: http://192.168.0.100:18081. Daemon either is not started or wrong port was passed. Please make sure daemon is running or restart the wallet with the correct daemon address.

When using exactly the same command as above on the server, that didn't work either, a bit to my surprise … Only when I changed the actual IP address (192.168.0.100) to the loopback IP (127.0.0.1 or localhost), it would work:

$ monero-wallet-cli --daemon-host 127.0.0.1 --wallet-file monero.wallet

I then realized I had to tell monerod to actually bind to the external IP address rather that the loopback address:

$ monerod exit
$ monerod --rpc-bind-ip 192.168.0.100 --detach

Then, in the ~/.bitmonero/bitmonero.log file, you'll see the IP address it binds to:

2016-Dec-23 02:05:06.996460 P2p server initialized OK
2016-Dec-23 02:05:06.996663 Initializing core rpc server...
2016-Dec-23 02:05:06.996968 Binding on 192.168.0.100:18081
2016-Dec-23 02:05:06.997666 Core rpc server initialized OK on port: 18081

With the server properly configured, I could now finally use the server's daemon remotely from the laptop, without any errors:

$ monero-wallet-cli --daemon-host 192.168.0.100 --wallet-file monero.wallet

In hindsight, this looks very trivial, but I didn't get it at first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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