mirror of
https://github.com/monero-project/monero-docs.git
synced 2025-01-03 17:40:48 +00:00
Improve reference for select monerod options
This commit is contained in:
parent
f3938ec120
commit
0af8cbdaa8
2 changed files with 28 additions and 10 deletions
|
@ -8,11 +8,14 @@ title: monerod - Reference | Monero Documentation
|
||||||
|
|
||||||
`./monerod [options] [command]`
|
`./monerod [options] [command]`
|
||||||
|
|
||||||
Options affect how daemon should be working. Commands assume the daemon is already running. Commands give access to specific services provided by the daemon.
|
Options define how daemon should be working. Their names follow the `--option-name` pattern.
|
||||||
|
|
||||||
|
Commands give access to specific services provided by the daemon. Commands are executed against a running daemon.
|
||||||
|
Their names follow the `command_name` pattern.
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
Following option groups are only to make the reference easier to follow. The daemon itself does not group options in any way.
|
Following option groups are only to make this reference easier to follow. The daemon itself does not group options in any way.
|
||||||
|
|
||||||
#### Pick network
|
#### Pick network
|
||||||
|
|
||||||
|
@ -34,7 +37,7 @@ Following option groups are only to make the reference easier to follow. The dae
|
||||||
|
|
||||||
`monerod` defaults are adjusted for running it occasionally on the same computer as your Monero wallet.
|
`monerod` defaults are adjusted for running it occasionally on the same computer as your Monero wallet.
|
||||||
|
|
||||||
The following options will be helpful if you intend to have an always running node - most likely on a remote server or your own separate PC.
|
The following options will be helpful if you intend to have an always running node — most likely on a remote server or your own separate PC.
|
||||||
|
|
||||||
| Option | Description
|
| Option | Description
|
||||||
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------
|
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -43,6 +46,8 @@ The following options will be helpful if you intend to have an always running no
|
||||||
| `--pidfile` | Full path to the PID file. Works only with `--detach`. Example: <br />`./monerod --detach --pidfile=/run/monero/monerod.pid`
|
| `--pidfile` | Full path to the PID file. Works only with `--detach`. Example: <br />`./monerod --detach --pidfile=/run/monero/monerod.pid`
|
||||||
| `--detach` | Go to background (decouple from the terminal). This is useful for long-running / server scenarios. Typically, you will also want to manage `monerod` daemon with systemd or similar. By default `monerod` runs in a foreground.
|
| `--detach` | Go to background (decouple from the terminal). This is useful for long-running / server scenarios. Typically, you will also want to manage `monerod` daemon with systemd or similar. By default `monerod` runs in a foreground.
|
||||||
| `--non-interactive` | Do not require tty in a foreground mode. Helpful when running in a container. By default `monerod` runs in a foreground and opens stdin for reading. This breaks containerization because no tty getss assigned and `monerod` process crashes. You can make it run in a background with `--detach` but this is inconvenient in a containerized environment because the canonical usage is that the container waits on the main process to exist (forking makes things more complicated).
|
| `--non-interactive` | Do not require tty in a foreground mode. Helpful when running in a container. By default `monerod` runs in a foreground and opens stdin for reading. This breaks containerization because no tty getss assigned and `monerod` process crashes. You can make it run in a background with `--detach` but this is inconvenient in a containerized environment because the canonical usage is that the container waits on the main process to exist (forking makes things more complicated).
|
||||||
|
| `--no-igd` | Disable UPnP port mapping. Add this option to improve security if you are **not** behind a NAT (you can bind directly to public IP or you run through Tor).
|
||||||
|
|
||||||
|
|
||||||
#### P2P network
|
#### P2P network
|
||||||
|
|
||||||
|
@ -58,13 +63,15 @@ The node and peer words are used interchangeably.
|
||||||
| `--p2p-bind-ip` | Network interface to bind to for p2p network protocol. Default value `0.0.0.0` binds to all network interfaces. This is typically what you want. <br /><br />You must change this if you want to constrain binding, for example to configure connection through Tor via torsocks: <br />`DNS_PUBLIC=tcp://1.1.1.1 TORSOCKS_ALLOW_INBOUND=1 torsocks ./monerod --p2p-bind-ip 127.0.0.1 --no-igd --hide-my-port`
|
| `--p2p-bind-ip` | Network interface to bind to for p2p network protocol. Default value `0.0.0.0` binds to all network interfaces. This is typically what you want. <br /><br />You must change this if you want to constrain binding, for example to configure connection through Tor via torsocks: <br />`DNS_PUBLIC=tcp://1.1.1.1 TORSOCKS_ALLOW_INBOUND=1 torsocks ./monerod --p2p-bind-ip 127.0.0.1 --no-igd --hide-my-port`
|
||||||
| `--p2p-bind-port` | TCP port to listen for p2p network connections. Defaults to `18080` for mainnet, `28080` for testnet, and `38080` for stagenet. You normally wouldn't change that. This is helpful to run several nodes on your machine to simulate private Monero p2p network (likely using private Testnet). Example: <br/>`./monerod --p2p-bind-port=48080`
|
| `--p2p-bind-port` | TCP port to listen for p2p network connections. Defaults to `18080` for mainnet, `28080` for testnet, and `38080` for stagenet. You normally wouldn't change that. This is helpful to run several nodes on your machine to simulate private Monero p2p network (likely using private Testnet). Example: <br/>`./monerod --p2p-bind-port=48080`
|
||||||
| `--p2p-external-port` | TCP port to listen for p2p network connections on your router. Relevant if you are behind a NAT and still want to accept incoming connections. You must then set this to relevant port on your router. This is to let `monerod` know what to advertise on the network. Default is `0`.
|
| `--p2p-external-port` | TCP port to listen for p2p network connections on your router. Relevant if you are behind a NAT and still want to accept incoming connections. You must then set this to relevant port on your router. This is to let `monerod` know what to advertise on the network. Default is `0`.
|
||||||
| `--no-igd` | Disable UPnP port mapping. Add this option to improve security if you are **not** behind a NAT (you can bind directly to public IP or you run through Tor).
|
|
||||||
| `--hide-my-port` | `monerod` will still open and listen on the p2p port. However, it will not announce itself as a peerlist candidate. Technically, it will return port `0` in a response to p2p handshake (`node_data.my_port = 0` in `get_local_node_data` function). In effect nodes you connect to won't spread your IP to other nodes. To sum up, it is not really hiding, it is more like "do not advertise".
|
| `--hide-my-port` | `monerod` will still open and listen on the p2p port. However, it will not announce itself as a peerlist candidate. Technically, it will return port `0` in a response to p2p handshake (`node_data.my_port = 0` in `get_local_node_data` function). In effect nodes you connect to won't spread your IP to other nodes. To sum up, it is not really hiding, it is more like "do not advertise".
|
||||||
| `--add-priority-node` | Specify list of peers to connect to and attempt to keep the connection open. <br /><br />To add multiple nodes use the option several times. Example: <br />`./monerod --add-priority-node=178.128.192.138:18081 --add-priority-node=144.76.202.167:18081`
|
| `--seed-node` | Connect to a node to retrieve other nodes' addresses, and disconnect. If not specified, `monerod` will use hardcoded seed nodes on the first run, and peers cached on disk on subsequent runs.
|
||||||
| `--add-exclusive-node` | Specify list of peers to connect to only. If this option is given the options `--add-priority-node` and `--seed-node` are ignored. <br /><br />To add multiple nodes use the option several times. Example: <br />`./monerod --add-exclusive-node=178.128.192.138:18081 --add-exclusive-node=144.76.202.167:18081`
|
| `--add-peer` | Manually add node to local peerlist.
|
||||||
| `--seed-node` | Connect to a node to retrieve peer addresses, and disconnect. If not specified, `monerod` will use hardcoded seed nodes on the first run, and peers cached on disk on subsequent runs.
|
| `--add-priority-node` | Specify list of nodes to connect to and then attempt to keep the connection open. <br /><br />To add multiple nodes use the option several times. Example: <br />`./monerod --add-priority-node=178.128.192.138:18081 --add-priority-node=144.76.202.167:18081`
|
||||||
| `--add-peer` | Manually add peer to local peerlist.
|
| `--add-exclusive-node` | Specify list of nodes to connect to only. If this option is given the options `--add-priority-node` and `--seed-node` are ignored. <br /><br />To add multiple nodes use the option several times. Example: <br />`./monerod --add-exclusive-node=178.128.192.138:18081 --add-exclusive-node=144.76.202.167:18081`
|
||||||
|
| `--offline` | Do not listen for peers, nor connect to any. Useful for working with a stable local blockchain.
|
||||||
|
| `--allow-local-ip` | Allow local ip add to peer list, mostly in debug purposes. TODO: verify
|
||||||
|
| `--out-peers arg` (=-1)| Set max number of outgoing connections to other peers. TODO: verify
|
||||||
|
| `--in-peers arg` (=-1) | Set max number of incoming connections (peers actively connecting). TODO: verify
|
||||||
|
|
||||||
#### Help and Version
|
#### Help and Version
|
||||||
|
|
||||||
|
@ -74,6 +81,17 @@ The node and peer words are used interchangeably.
|
||||||
| `--version` | Shows `monerod` version to stdout. Example: <br />`Monero 'Lithium Luna' (v0.12.3.0-release)`
|
| `--version` | Shows `monerod` version to stdout. Example: <br />`Monero 'Lithium Luna' (v0.12.3.0-release)`
|
||||||
| `--os-version` | Shows build timestamp and target operating system. Example output:<br />`OS: Linux #1 SMP PREEMPT Fri Aug 24 12:48:58 UTC 2018 4.18.5-arch1-1-ARCH`.
|
| `--os-version` | Shows build timestamp and target operating system. Example output:<br />`OS: Linux #1 SMP PREEMPT Fri Aug 24 12:48:58 UTC 2018 4.18.5-arch1-1-ARCH`.
|
||||||
|
|
||||||
|
#### Legacy
|
||||||
|
|
||||||
|
These options should no longer be necessary. They are still present in `monerod` for backwards compatibility.
|
||||||
|
|
||||||
|
| Option | Description
|
||||||
|
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
| `--fluffy-blocks` | Relay compact blocks. Default. Compact block is just a header and a list of transaction IDs.
|
||||||
|
| `--no-fluffy-blocks`| Relay classic full blocks. Classic block contains all transactions.
|
||||||
|
| `--db-type` | Specify database type. The default and only available: `lmdb`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Reference
|
## Reference
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ On top of that, Monero nodes interact with each other in a peer-to-peer network.
|
||||||
|
|
||||||
[Download Monero](https://getmonero.org/downloads). Once unpacked you will see several executable files.
|
[Download Monero](https://getmonero.org/downloads). Once unpacked you will see several executable files.
|
||||||
|
|
||||||
Monero project nicely decouples node logic `monerod` from wallet logic `monero-wallet-*`.
|
Monero project nicely decouples network node logic from wallet logic.
|
||||||
Wallet logic is offered through three independent user interfaces - the GUI, the CLI, and the HTTP API.
|
Wallet logic is offered through three independent user interfaces - the GUI, the CLI, and the HTTP API.
|
||||||
|
|
||||||
![Monero Directory](/images/monero-dir.png "Monero Unpacked")
|
![Monero Directory](/images/monero-dir.png "Monero Unpacked")
|
||||||
|
|
Loading…
Reference in a new issue