latest
(Dockerfile)most_recent_tag
(Dockerfile)v0.13.0.4
(Dockerfile)
For running monerod
or monero-wallet-rpc
or monero-wallet-cli
in a docker container.
This daemon is built from source: monero project.
- Monero stable for
stagenet
/mainnet
: Use version tags likev0.13.0.3
. testnet
: Use themaster
tag.- Generally, it is recommended to use
master
branch when working ontestnet
. - Of course,
latest
can also be used withmainnet
andstagenet
.
- Generally, it is recommended to use
- The
latest
docker image is based onmaster
branch.
You can find the following information within the docker image:
/version.txt
contains output ofmonerod --version
/system.txt
contains output ofcat /etc/os-release
/dependencies.txt
contains output ofldd $(command -v monerod)
- docker container user running
monero
USER_ID
can be used to set the user who runsmonero
-e USER_ID=1000
- The container can also be started with
--user 1000
- No existing user is used then
- Running
monero
asroot
is not possible (USER_ID
defaults to 1000).
monerod
andmonero-wallet-rpc
--log-level=$LOG_LEVEL
(default:0
) (alsomonero-wallet-cli
)--confirm-external-bind
--rpc-bind-ip=$RPC_BIND_IP
(default:0.0.0.0
)--rpc-bind-port=$RPC_BIND_PORT
(default:28081
)
- only
monerod
--p2p-bind-ip=$P2P_BIND_IP
(default:0.0.0.0
)--p2p-bind-port=$P2P_BIND_PORT
(default:28080
)
- only
monero-wallet-rpc
andmonero-wallet-cli
--daemon-host=$DAEMON_HOST
(default:127.0.0.1
)--daemon-port=$DAEMON_PORT
(default:28081
)
- Adapt default configuration using environment variables:
-e LOG_LEVEL=3
-e RPC_BIND_IP=127.0.0.1
-e RPC_BIND_PORT=18081
-e P2P_BIND_IP=0.0.0.0
-e P2P_BIND_PORT=18080
-e DAEMON_HOST=localhost
(assuming daemon is running locally)-e DAEMON_PORT=18081
(assuming daemon listens on port18081
)
- The IPs, the daemon or RPC are binding to, need to be
0.0.0.0
instead of127.0.0.1
within a docker container. - The path
/monero
in the docker container is a volume and can be mapped to a path on the client.
Check the repository for docker-compose
templates. They show configuration examples of monerod
and monero-wallet-rpc
, respectively.
Without any additional command
docker run --rm -it xmrto/monero
monerod
starts with the above default configuration plus the following option:
--check-updates disabled
Any additional monerod
parameters can be passed as command:
docker run --rm -d -p 18081:18081 -v <path/to/and/including/.bitmonero>:/monero xmrto/monero --data-dir /monero --non-interactive
Run monerod
as different user (uid != 1000 && uid != 0
). This is useful if deployed to several systems (AWS ec2-user: uid=500
).
Abbreviated command:
docker run --rm -d -p 18081:18081 -e USER_ID=500 -v <host>:<container> xmrto/monero <options>
To secure monerod
rpc also pass the option --rpc-login user:password
. Any JSON RPC request should then be provided with user credentials like this:
curl -u user:password --digest http://localhost:18081
The path /monero
is supposed to be used as --data-dir
configuration for monerod
. Here the synchronized blockchain data is stored. So when mounted, /monero
should contain the files from within .bitmonero
.
When used as monero-wallet-rpc
the full command is necessary as command to docker run:
docker run --rm -d --net host -e DAEMON_HOST=node.xmr.to -e DAEMON_PORT=18081 -e RPC_BIND_PORT=18083 -v <path/to/and/including/wallet_folder>:/monero xmrto/monero monero-wallet-rpc --wallet-file wallet --password-file wallet.passwd --disable-rpc-login
Run monero-wallet-rpc
as different user (uid != 1000 && uid != 0
). This is useful if deployed to several systems (AWS ec2-user: uid=500
).
Abbreviated command:
docker run --rm -d --net host -e DAEMON_HOST=node.xmr.to -e DAEMON_PORT=18081 -e RPC_BIND_PORT=18083 -e USER_ID=500 -v <host>:<container> xmrto/monero monero-wallet-rpc <options>
monero-wallet-rpc
starts with the above default configuration plus additional options passed in the actual docker run command, like -e RPC_BIND_PORT=18083
.
To secure monero-wallet-rpc
replace --disable-rpc-login
by --rpc-login user:password
. Any JSON RPC request should then be provided with user credentials like this:
curl -u user:password --digest http://localhost:18083
The path /monero
is supposed to contain the actual wallet files. So when mounted, /monero
should contain the files from within e.g. ~/Monero/wallets/my_wallet/
.
When used as monero-wallet-cli
the full command is necessary as command to docker run:
docker run --rm -it -e DAEMON_HOST=node.xmr.to -e DAEMON_PORT=18081 -v <path/to/and/including/wallet_folder>:/monero --net host xmrto/monero monero-wallet-cli --wallet-file wallet --password-file wallet.passwd
Attaching to the container then allows you to use monero-wallet-cli
commands.
Run monero-wallet-cli
as different user (uid != 1000 && uid != 0
). This is useful if deployed to several systems (AWS ec2-user: uid=500
).
Abbreviated command:
docker run --rm -it --net host -e DAEMON_HOST=node.xmr.to -e DAEMON_PORT=18081 -e USER_ID=500 -v <host>:<container> xmrto/monero monero-wallet-cli <options>
The path /monero
is supposed to contain the actual wallet files. So when mounted, /monero
should contain the files from within e.g. ~/Monero/wallets/my_wallet/
.