Closed PLK2 closed 2 years ago
I removed the previous monerod docker install and ran this command again:
docker run -d --restart unless-stopped --name="monerod" -p 18080:18080 -p 18089:18089 -v bitmonero:/home/monero sethsimmons/simple-monerod:latest --rpc-restricted-bind-ip=0.0.0.0 --rpc-restricted-bind-port=18089 --no-igd --no-zmq --enable-dns-blocklist
Except I replaced "/home/monero" with the path to my external drive. However, it still didn't work...
Hey there, sorry for the delays!
The part you need to change to move it is replacing bitmonero
with the location you want to store the blockchain files, i.e. /data/monero
or whatever you have set for the location you want to store it in.
There isn't really a simple way to move the files themselves, but if you want to explore that you'll need to setup the destination, remove the old container (docker rm --force monerod
) and then use something like rsync -av /var/lib/docker/volumes/bitmonero /data/monero
and then start the container with the new info.
No worries--thanks for the reply!
To be clear, would it be bitmonero:/externaldrive/wherever
or /externaldrive/wherever:/home/monero
?
Yup! Just make sure that new location has the proper permissions (normally the user you're running as, with uid/gid of 1000:1000
).
So either of those would work? Or one or the other?
bitmonero:/externaldrive/wherever
vs.
/externaldrive/wherever:/home/monero
Oops, sorry, misread your question -- you need to specify the external drive, so /externaldrive/wherever:/home/monero
is the right choice.
The bitmonero
option will default to Docker's normal volume storage, which is usually /var/lib/docker/volumes
. You could also change that default instead if you prefer, but that would mean all Docker containers would use your external drive for storage.
If you want to change the global Docker default see here: https://stackoverflow.com/questions/36014554/how-to-change-the-default-location-for-docker-create-volume-command
Thanks!
I followed the instructions here: https://sethforprivacy.com/guides/run-a-monero-node/
But that put the volume (blockchain data etc) on my microSD card. How do I get docker to move that to my external hard drive instead?
Thanks!