├── LICENSE ├── Dockerfile └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Bastian Bleker 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Usage: docker run --restart=always -v /var/data/blockchain-xmr:/root/.bitmonero -p 18080:18080 -p 18081:18081 --name=monerod -td kannix/monero-full-node 2 | FROM ubuntu:18.04 AS build 3 | 4 | ENV MONERO_VERSION=0.17.2.3 MONERO_SHA256=8069012ad5e7b35f79e35e6ca71c2424efc54b61f6f93238b182981ba83f2311 5 | 6 | 7 | RUN apt-get update && apt-get install -y curl bzip2 8 | 9 | WORKDIR /root 10 | 11 | RUN curl https://dlsrc.getmonero.org/cli/monero-linux-x64-v$MONERO_VERSION.tar.bz2 -O &&\ 12 | echo "$MONERO_SHA256 monero-linux-x64-v$MONERO_VERSION.tar.bz2" | sha256sum -c - &&\ 13 | tar -xvf monero-linux-x64-v$MONERO_VERSION.tar.bz2 &&\ 14 | rm monero-linux-x64-v$MONERO_VERSION.tar.bz2 &&\ 15 | cp ./monero-x86_64-linux-gnu-v$MONERO_VERSION/monerod . &&\ 16 | rm -r monero-* 17 | 18 | FROM ubuntu:18.04 19 | 20 | RUN useradd -ms /bin/bash monero && mkdir -p /home/monero/.bitmonero && chown -R monero:monero /home/monero/.bitmonero 21 | USER monero 22 | WORKDIR /home/monero 23 | 24 | COPY --chown=monero:monero --from=build /root/monerod /home/monero/monerod 25 | 26 | # blockchain location 27 | VOLUME /home/monero/.bitmonero 28 | 29 | EXPOSE 18080 18081 30 | 31 | 32 | ENTRYPOINT ["./monerod"] 33 | CMD ["--non-interactive", "--restricted-rpc", "--rpc-bind-ip=0.0.0.0", "--confirm-external-bind", "--enable-dns-blocklist", "--out-peers=16"] 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # monero-full-node 2 | 3 | docker image to run a monero full network node 4 | 5 | # October 2018: Breaking Change 6 | **warning** 7 | for improved security the new images will run the monero daemon under it's own user and not as root anymore! 8 | If you simply upgrade without following the next steps you will run into this error: 9 | `WARN blockchain.db.lmdb src/blockchain_db/lmdb/db_lmdb.cpp:75 Failed to open lmdb environment: Permission denied` 10 | 11 | this can be fixed with the following steps 12 | 13 | * stop and remove the current container: `docker stop monerod && docker rm monerod` 14 | * change the owner of the volume to monero user `docker run -v xmrchain:/home/monero/.bitmonero -t --rm --name=monerod -u root --entrypoint=/bin/chown kannix/monero-full-node -R monero:monero .bitmonero` 15 | * start the container `docker run -tid --restart=always -v xmrchain:/home/monero/.bitmonero -p 18080:18080 -p 18081:18081 --name=monerod kannix/monero-full-node` 16 | 17 | **Hint:** keep in mind that you have to adapt your volume bindings to your own configuration e.g. if you followed the older version of this readme you have to use: `-v /var/data/blockchain-xmr:/home/monero/.bitmonero` instead of `-v xmrchain:/home/monero/.bitmonero` 18 | 19 | # Usage 20 | 21 | `docker run -tid --restart=always -v xmrchain:/home/monero/.bitmonero -p 18080:18080 -p 18081:18081 --name=monerod kannix/monero-full-node` 22 | 23 | ## Updates 24 | Manual Way 25 | ``` 26 | docker stop monerod 27 | docker rm monerod 28 | docker pull kannix/monero-full-node 29 | ``` 30 | Then launch using the "how to use" command above 31 | 32 | Automatic way 33 | https://github.com/v2tec/watchtower 34 | 35 | # Donations 36 | 37 | I am supporting this image in my spare time and would be very happy about some donations to keep this going. You can support me by sending some XMR to: `47VCQgBjmLd1oMGKGcbVbzM1ND1qUWzs7Nonxip9cuNraJwVxDWQb1nU5tPfgYx4xLftnPiR1zPcgZBi4Mmoj3at39C7qp9` 38 | --------------------------------------------------------------------------------