Sign inSign up

fiftysix/litecoin-core

By fiftysix

Updated 10 days ago

A fully functional Litecoin Core client. Simplifying the process of running a Litecoin node.

Image
0

1.5K

fiftysix/litecoin-core repository overview

Fiftysix Litecoin Core Docker Image

Maintainer: [email protected]

Overview

This Docker image provides a fully functional Litecoin Core client built using the Fiftysix base image. It is designed to simplify running a Litecoin node, offering secure and efficient participation in the Litecoin network. Perfect for developers, blockchain enthusiasts, and institutions. The code can be viewed on the Fiftysix Github.

Tags
  • latest: Points to the latest version of Litecoin Core.
  • <version>: Points to a specific version of Litecoin Core. For example, 0.21.3.
What is Litecoin Core?

Litecoin Core is the reference client that implements the Litecoin protocol for remote procedure call (RPC) use. It is a secure and reliable way to interact with the Litecoin network.

Usage
Basic Usage

To run a Litecoin Core node:

docker pull fiftysix/litecoin-core
docker run --name litecoin-core -d fiftysix/litecoin-core
Directory Structure

In this Docker image, the following directories are used:

  • Data Directory (/node/litecoin-core/data): This is where Litecoin Core stores the block data and other related files. Mounting this directory ensures blockchain data is persisted between container runs.
  • Config Directory (/node/litecoin-core/configs): This directory is used for storing configuration files for Litecoin Core. You can provide your custom configuration file by mounting it to this directory and specifying it with the -conf flag.
  • Scripts Directory (/node/litecoin-core/scripts): This directory contains any scripts that you may want to execute as part of the Litecoin Core startup or maintenance process. The entry point script (litecoin-core-entrypoint.sh) is located here.
Mounting Directories

You can mount host directories to the container’s data, config, and scripts directories to customize the behavior of the Litecoin Core node.

Mounting the Data Directory: To persist Litecoin Core data across container restarts, you can mount a host directory to the container's data directory:

docker run --name litecoin-core -v /path/to/local/data:/node/litecoin-core/data -d fiftysix/litecoin-core

This command mounts the /path/to/local/data directory on your host to /node/litecoin-core/data in the container, ensuring that blockchain data is preserved between container instances.

Mounting a Config File: To use a custom Litecoin Core configuration file, mount your configuration file to the container’s config directory and specify it using the -conf flag:

docker run --name litecoin-core -v /path/to/local/config.conf:/node/litecoin-core/configs/your-config.conf -d fiftysix/litecoin-core \
  -conf="/node/litecoin-core/configs/your-config.conf"

This command mounts your custom config.conf file to the container’s config directory and instructs Litecoin Core to use it.

Note, Litecoin Core flags can be added on top of a configuration file to overwrite the setting.

Mounting the Scripts Directory: If you have custom scripts you want to include, you can mount them to the scripts directory. For example, to replace the entrypoint script:

docker run --name litecoin-core -v /path/to/local/scripts:/node/litecoin-core/scripts -d fiftysix/litecoin-core

This command mounts your local scripts directory to /node/litecoin-core/scripts in the container, allowing you to customize the startup behavior.

Logging Litecoin Core
docker logs litecoin-core --tail 100
Using Litecoin RPC and REST Endpoints
RPC Endpoint

The Litecoin Core daemon (litecoind) provides an RPC interface that allows you to interact with the Litecoin network programmatically.

Start the Litecoin Core daemon:

docker run --name litecoin-core -d \
  -p 9332:9332 \
  -p 9333:9333 \
  fiftysix/litecoin-core \
  -rpcallowip=0.0.0.0/0 \
  -rpcbind=0.0.0.0 \
  -rpcuser='user' \
  -rpcpassword='your_password'

Example RPC Query:

curl --user user:your_password --data-binary '{"jsonrpc":"1.0","id":"curltest","method":"getnetworkinfo","params":[]}' \
  -H 'content-type:text/plain;' http://127.0.0.1:9332/
Docker Compose

Litecoin Core can also be run using Docker Compose. An example compose file can be found on the Fiftysix Github.

Ordinals

The Ordinals software ord can also be attached to Litecoin Core. Fiftysix also provides an ord-litecoin image compatible with Litecoin Core that can be found here.

An example compose file that utilizes both Litecoin Core and Ord can be found on the Fiftysix Github.

Support

For support, please contact [email protected].

About Fiftysix

Fiftysix is committed to making blockchain technology accessible, efficient, and reliable through robust decentralization. Learn more at fiftysix.xyz.

Tag summary

Content type

Image

Digest

sha256:5c1b8d712

Size

160 MB

Last updated

10 days ago

docker pull fiftysix/litecoin-core