monero-wallet-rpc is the Monero wallet with an HTTP JSON-RPC interface instead of a screen. It holds your keys, scans the chain through a node, and lets a program ask for the balance, create subaddresses, list incoming transfers or send XMR. It ships in every Monero CLI and GUI download, next to monerod and monero-wallet-cli. The safe way to start it is: on localhost, with --rpc-login, against a node you control, and as a view-only wallet unless your program genuinely needs to spend.

This guide follows the 0.18.5.4 source code (src/wallet/wallet_rpc_server.cpp and .h) and the official monero-wallet-rpc reference, checked in November 2026. The Monero documentation's own advice applies throughout: "Use stagenet for learning and development on top of monero-wallet-rpc." Our stagenet guide shows how to get test coins.

How monero-wallet-rpc fits in

your program  --HTTP JSON-RPC-->  monero-wallet-rpc  --daemon RPC-->  monerod  --P2P-->  network
  • monerod stores the blockchain and never sees your keys.
  • monero-wallet-rpc has the keys, scans for your outputs and builds transactions.
  • Your program only talks to the wallet over HTTP on a port you choose.

You can point the wallet at a remote node with --daemon-address, but for a business the reference is direct: "For any real business you should be running your own full node." See how to run a Monero node.

Starting it

The syntax from the reference:

monero-wallet-rpc --rpc-bind-port <port> (--wallet-file <file> | --generate-from-json <file> | --wallet-dir <directory>) [options]

There is no default port: you must choose one. A production-style start:

./monero-wallet-rpc \
  --rpc-bind-port 18088 \
  --wallet-file /srv/monero/shop \
  --password-file /srv/monero/shop.pass \
  --rpc-login shop:LongRandomString \
  --daemon-address 127.0.0.1:18081 \
  --trusted-daemon \
  --log-file /var/log/monero-wallet-rpc.log

What each piece does:

  • --rpc-bind-port: the port your program connects to. The bind IP defaults to 127.0.0.1, so the wallet is not reachable from other machines unless you change --rpc-bind-ip and confirm with --confirm-external-bind.
  • --wallet-file: one wallet, opened at start. --wallet-dir instead lets your program create_wallet, open_wallet and close_wallet at runtime; the source refuses --password and --password-file together with --wallet-dir.
  • --password-file: keeps the wallet password out of the process list and shell history.
  • --trusted-daemon: tells the wallet the node is yours, which enables commands that rely on an honest node. Use --untrusted-daemon for anything else.
  • --tx-notify "/path/script %s": runs a program for each new incoming transaction, with %s replaced by its hash.

Exactly one of --wallet-file, --generate-from-json or --wallet-dir is required; the source stops with "Must specify --wallet-file or --generate-from-json or --wallet-dir" otherwise.

Authentication: the login file you did not know about

HTTP authentication is on by default. There are three cases in the source:

  1. --rpc-login user:password: those credentials are required.
  2. Neither option: the wallet generates a random username and password and writes them to a file named monero-wallet-rpc.<port>.login in the working directory, for example monero-wallet-rpc.18088.login. Your program reads the credentials from there.
  3. --disable-rpc-login: no authentication. Fine for a throwaway stagenet test on your own machine, nothing else. The two options cannot be combined.

The login uses HTTP digest authentication, which most HTTP libraries support. With curl:

curl -s --digest -u shop:LongRandomString \
  http://127.0.0.1:18088/json_rpc \
  -d '{"jsonrpc":"2.0","id":"0","method":"get_balance","params":{"account_index":0}}'

Read-only setups

Most shops, donation pages and accounting tools only need to see incoming payments. Two layers keep a compromised server from spending:

  • A view-only wallet. Create it from the primary address and the private view key; it can detect incoming payments but holds no spend key. Our view key guide shows how. One limit: a view-only wallet cannot by itself tell when your outputs are spent, so its balance can be too high if the same wallet also spends elsewhere.
  • --restricted-rpc on the wallet: "Restricts to view-only commands". Since Monero 0.18.5.0, sensitive methods are also restricted in this mode.

With both, a stolen server leaks your incoming payment history, but not your money.

Methods you will actually call

All methods go to POST /json_rpc. Amounts are integers in atomic units: 1 XMR = 1,000,000,000,000 piconero.

Balance and addresses

MethodUse
get_balanceTotal and unlocked balance, per account and per subaddress
get_addressThe addresses of an account
create_addressA new subaddress, optionally with a label
label_addressRename a subaddress
get_address_indexWhich account and index an address belongs to
validate_addressCheck an address before you send to it
get_heightHow far the wallet has scanned

The common pattern for payments is one subaddress per order or per customer, created with create_address. Our subaddress guide explains why this beats payment IDs, and the payment ID article covers the older method.

Incoming payments

MethodUse
get_transfersTransfers filtered by in, out, pending, failed, pool, by height range and subaddress
get_transfer_by_txidOne transaction, including its confirmations
incoming_transfersIndividual outputs you own, available or spent
refreshScan now instead of waiting for auto-refresh

A typical check loop: call get_transfers with in: true, pool: true for the order's subaddress index, show "seen" when it appears in the pool, and mark the order paid after the confirmations your risk allows. Monero outputs are spendable after 10 blocks; our article on how many confirmations Monero needs explains the numbers. You can check a hash on our explorer at any time.

Sending

MethodUse
transferSend to one or more destinations
transfer_splitSame, split into several transactions if needed
sweep_allSend the whole unlocked balance of an account to one address
sweep_singleSend one specific output
sweep_dustSpend outputs too small to be worth a normal transaction
relay_txBroadcast a transaction you created with do_not_relay
get_tx_keyThe transaction key, for payment proofs

Every send accepts a priority; get_default_fee_priority tells you what the wallet would use. Use do_not_relay: true with get_tx_metadata: true first if you want to inspect the fee before broadcasting. Our Monero transaction fee guide explains how the fee is set, and the sweep_all article covers consolidating outputs.

Proofs and signatures

MethodUse
get_tx_proof / check_tx_proofProve or verify a payment to an address
check_tx_keyVerify a payment with the transaction key
get_reserve_proof / check_reserve_proofProve you hold at least a given balance
sign / verifySign a message with an address

See how to check a Monero transaction and how to sign a message with Monero.

Cold signing and multisig

export_outputs, import_outputs, export_key_images, import_key_images, sign_transfer, describe_transfer and submit_transfer support a watch-only online wallet with an offline signer. The prepare_multisig / make_multisig / exchange_multisig_keys family handles multisig; see our Monero multisig guide.

Common problems

SymptomWhat is going on
The RPC URL does not answer right after startThe wallet is still syncing. The reference suggests syncing the wallet once in the GUI or CLI first
401 UnauthorizedWrong credentials, or the client is not using digest auth
"Must specify --wallet-file ..."None of the three wallet options given
Balance higher than expected on a view-only walletIt cannot see spends without key images; import them or use the full wallet
transfer fails with "not enough unlocked money"Funds received less than 10 blocks ago are still locked

The reference also suggests keeping two wallet files for the same keys, one for manual use and one for the RPC, so a long resync in one does not block the other.

Security checklist

  • Bind to 127.0.0.1 and reach it from your app on the same host or over a private network.
  • Always use --rpc-login or the generated login file; never --disable-rpc-login in production.
  • Use a view-only wallet and --restricted-rpc wherever spending is not needed.
  • Keep only working funds in a hot wallet and sweep the rest to cold storage; see our guide to Monero cold storage.
  • Run your own node with --trusted-daemon, or treat the remote node as untrusted.

A minimal payment flow

The same five calls cover most checkouts:

  1. Create an address for the order. {"jsonrpc":"2.0","id":"0","method":"create_address","params":{"account_index":0,"label":"order-1042"}} The answer contains the new address and its address_index. Store both with the order.
  2. Show it to the buyer, with the amount. make_uri builds a monero: payment URI that wallets can scan as a QR code.
  3. Watch for the payment. {"jsonrpc":"2.0","id":"0","method":"get_transfers","params":{"in":true,"pool":true,"account_index":0,"subaddr_indices":[1042]}} Pool entries mean "seen, not yet in a block". Entries under in carry a height and confirmations.
  4. Decide when it is paid. Compare the summed amount with the order total, in atomic units, and wait for the number of confirmations your risk allows.
  5. Move funds out of the hot wallet on a schedule with transfer or sweep_all to an address whose spend key is not on the server.

Two details avoid support tickets. Buyers sometimes pay in two transactions, so sum all incoming transfers to the subaddress rather than reading only the first. And exchanges sometimes pay from a batch, so the sending address tells you nothing; the subaddress is what identifies the order.

Keeping it running

monero-wallet-rpc refreshes on its own, but a few settings make it calmer in production:

  • Run it under systemd with --detach and --pidfile, or in the foreground with --non-interactive in a container.
  • Call store from time to time, and always stop it with stop_wallet so the cache is saved; a killed process may have to rescan.
  • Keep --max-log-files and --max-log-file-size sensible, or hand rotation to logrotate.
  • Pin a --daemon-address you control. Since 0.18.5.0 the set_daemon method also accepts allowed TLS fingerprints correctly, if you switch nodes at runtime.

Testing on stagenet first

Run the whole flow once on stagenet before touching real money: start monerod --stagenet (RPC on port 38081), start the wallet RPC with --stagenet --daemon-address 127.0.0.1:38081, fund it from a faucet, and walk through create, watch, confirm and sweep. Mistakes cost nothing there, and every method behaves the same as on mainnet. Our stagenet guide lists faucets and nodes.

Our recommendation

For developers following Monero releases and security notices, these Telegram channels are worth following:

FAQ

What port does monero-wallet-rpc use?

None by default. You must set one with --rpc-bind-port.

What is the monero-wallet-rpc login file?

If you set neither --rpc-login nor --disable-rpc-login, the wallet creates random credentials and writes them to monero-wallet-rpc.<port>.login.

Can monero-wallet-rpc run without spending rights?

Yes. Use a view-only wallet, and add --restricted-rpc to limit the API to view commands.

Does monero-wallet-rpc need its own node?

It needs a node, local or remote. For a business, run your own and start the wallet with --trusted-daemon.

How do I get notified of incoming payments?

Use --tx-notify to run a script for each new incoming transaction, or poll get_transfers.

Are amounts in XMR?

No, in atomic units. 1 XMR is 1,000,000,000,000 atomic units (piconero).