Litecoin core

Comment

Author: Admin | 2025-04-28

Uphold/litecoin-coreA Litecoin Core docker image. Tags0.21.2.2, 0.21, latest (0.21/Dockerfile)0.18.1, 0.18 (0.18/Dockerfile)0.17.1, 0.17 (0.17/Dockerfile)0.16.3, 0.16 (0.16/Dockerfile)0.15.1, 0.15 (0.15/Dockerfile)0.14.2, 0.14 (0.14/Dockerfile)Picking the right taguphold/litecoin-core:latest: points to the latest stable release available of Litecoin Core. Use this only if you know what you're doing as upgrading Litecoin Core blindly is a risky procedure.uphold/litecoin-core:: based on a slim Debian image, points to a specific version branch or release of Litecoin Core. Uses the pre-compiled binaries which are fully tested by the Litecoin Core team.What is Litecoin Core?Litecoin Core is the Litecoin reference client and contains all the protocol rules required for the Litecoin network to function. This client is used by mining pools, merchants and services all over the world for its rock solid stability, feature set and security. Learn more about Litecoin Core.UsageHow to use this imageThis image contains the main binaries from the Litecoin Core project - litecoind, litecoin-cli and litecoin-tx. It behaves like a binary, so you can pass any arguments to the image and they will be forwarded to the litecoind binary:❯ docker run --rm uphold/litecoin-core \ -printtoconsole \ -regtest=1 \ -rpcallowip=172.17.0.0/16 \ -rpcauth='foo:1e72f95158becf7170f3bac8d9224$957a46166672d61d3218c167a223ed5290389e9990cc57397d24c979b4853f8e'By default, litecoind will run as user litecoin for security reasons and with its default data dir (~/.litecoin). If you'd like to customize where litecoind stores its data, you must use the LITECOIN_DATA environment variable. The directory will be automatically created with the correct permissions for the litecoin user and litecoind automatically configured to use it.❯ docker run -e LITECOIN_DATA=/var/lib/litecoind --rm uphold/litecoin-core \ -printtoconsole \ -regtest=1You can also mount a directory in a volume under /home/litecoin/.litecoin in case you want to access it on the host:❯ docker run -v ${PWD}/data:/home/litecoin/.litecoin --rm uphold/litecoin-core \ -printtoconsole \ -regtest=1You can optionally create a service using docker-compose:litecoin-core: image: uphold/litecoin-core command: -printtoconsole -regtest=1Using RPC to interact with the daemonThere are two communications methods to interact with a running Litecoin Core daemon.The first one is using a cookie-based local authentication. It doesn't require any special authentication information as running a process locally under the same user that was used to launch the Litecoin Core daemon allows it to read the cookie file previously generated by the daemon for clients. The downside of this method is that it requires local machine access.The second option is making a remote procedure call using a username and password combination. This has the advantage of not requiring local machine access, but in order to keep your credentials safe you should use the newer rpcauth authentication mechanism.Using cookie-based local authenticationStart by launch the Litecoin Core daemon:❯ docker run --rm --name litecoin-server -it uphold/litecoin-core \ -printtoconsole \ -regtest=1Then, inside the running litecoin-server container, locally execute the query to the daemon using litecoin-cli:❯ docker exec --user litecoin litecoin-server litecoin-cli -regtest getmininginfo{ "blocks": 0, "currentblocksize": 0, "currentblockweight": 0, "currentblocktx": 0, "difficulty": 4.656542373906925e-10, "errors": "", "networkhashps": 0, "pooledtx": 0, "chain": "regtest"}In the background, litecoin-cli read the information automatically from /home/litecoin/.litecoin/regtest/.cookie. In production, the path would not contain the regtest part.Using rpcauth for remote authenticationBefore setting up remote authentication, you will need to generate

Add Comment