Sign inSign up

depach/litecoind

By depach

•Updated almost 7 years ago

Litecoin core compiled from source on Ubuntu Bionic

Image
0

271

depach/litecoind repository overview

⁠litecoind

Docker hub: depach/litecoind⁠

Docker image of Litecoin core litecoin built from sources on ubuntu

forked from jamesob/docker-bitcoind⁠ - many thanks!

⁠Quick start

Requires that Docker be installed⁠ on the host machine.

# Create some directory where your bitcoin data will be stored.
$ mkdir /home/youruser/litecoin_data

$ docker run --name litecoind -d \
   --env 'LTC_RPCUSER=foo' \
   --env 'LTC_RPCPASSWORD=password' \
   --env 'LTC_TXINDEX=1' \
   --volume /home/youruser/litecoin_data:/root/.litecoin \
   -p 127.0.0.1:9432:9432 \
   --publish 9432:9432 \
   depach/litecoind

$ docker logs -f litecoind
[ ... ]

⁠Configuration

A custom litecoin.conf file can be placed in the mounted data directory. Otherwise, a default litecoin.conf file will be automatically generated based on environment variables passed to the container:

namedefault
LTC_RPCUSERbtc
LTC_RPCPASSWORDchangemeplz
LTC_RPCPORT9432
LTC_RPCALLOWIP172.0.0.0/8
LTC_RPCCLIENTTIMEOUT30
LTC_DISABLEWALLET1
LTC_TXINDEX0
LTC_TESTNET0
LTC_DBCACHE0
LTC_ZMQPUBHASHTXtcp://0.0.0.0:28333
LTC_ZMQPUBHASHBLOCKtcp://0.0.0.0:28333
LTC_ZMQPUBRAWTXtcp://0.0.0.0:28333
LTC_ZMQPUBRAWBLOCKtcp://0.0.0.0:28333

⁠Daemonizing

The smart thing to do if you're daemonizing is to use Docker's builtin restart policies⁠, but if you're insistent on using systemd, you could do something like

$ cat /etc/systemd/system/litecoind.service

# litecoind.service #######################################################################
[Unit]
Description=Litecoind
After=docker.service
Requires=docker.service

[Service]
ExecStartPre=-/usr/bin/docker kill litecoind
ExecStartPre=-/usr/bin/docker rm litecoind
ExecStartPre=/usr/bin/docker pull depach/litecoind
ExecStart=/usr/bin/docker run \
    --name litecoind \
    -p 9432:9432 \
    -p 127.0.0.1:9432:9432 \
    -v /data/litecoind:/root/.litecoin \
    depach/litecoind
ExecStop=/usr/bin/docker stop litecoind

to ensure that litecoind continues to run.

⁠Alternatives

  • docker-bitcoind⁠: sort of the basis for this repo, but configuration is a bit more confusing.

Tag summary

Content type

Image

Digest

Size

573.2 MB

Last updated

almost 7 years ago

docker pull depach/litecoind