Giter Site home page Giter Site logo

osminogin / docker-electrum-daemon Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 32.0 42 KB

Electrum client running as a daemon in docker container

Home Page: https://hub.docker.com/r/osminogin/electrum-daemon/

License: MIT License

Shell 19.56% Makefile 21.86% Dockerfile 58.58%
docker bitcoin bitcoin-wallet electrum-client daemon jsonrpc docker-container

docker-electrum-daemon's Introduction

docker-electrum-daemon

License: MIT

Electrum client running as a daemon in docker container with JSON-RPC enabled.

Electrum client is light bitcoin wallet software operates through supernodes (Electrum server instances actually).

Don't confuse with Electrum server that use bitcoind and full blockchain data.

Star this project on Docker Hub ๐ŸŒŸ https://hub.docker.com/r/osminogin/electrum-daemon/

Ports

  • 7000 - JSON-RPC port.

Volumes

  • /data - user data folder (on host it usually has a path /home/user/.electrum).

Getting started

docker

Running with Docker:

docker run --rm --name electrum \
    --env TESTNET=false \
    --publish 127.0.0.1:7000:7000 \
    --volume /srv/electrum:/data \
    osminogin/electrum-daemon
docker exec -it electrum-daemon electrum create
docker exec -it electrum-daemon electrum daemon load_wallet
docker exec -it electrum-daemon electrum daemon status
{
    "auto_connect": true,
    "blockchain_height": 505136,
    "connected": true,
    "fee_per_kb": 427171,
    "path": "/home/electrum/.electrum",
    "server": "us01.hamster.science",
    "server_height": 505136,
    "spv_nodes": 10,
    "version": "3.0.6",
    "wallets": {
        "/home/electrum/.electrum/wallets/default_wallet": true
    }
}

docker-compose

docker-compose.yml to see minimal working setup. When running in production, you can use this as a guide.

docker-compose up
docker-compose exec electrum electrum daemon status
docker-compose exec electrum electrum create
docker-compose exec electrum electrum daemon load_wallet
curl --data-binary '{"id":"1","method":"listaddresses"}' http://electrum:electrumz@localhost:7000

โ—Warningโ—

Always link electrum daemon to containers or bind to localhost directly and not expose 7000 port for security reasons.

API

License

See LICENSE

docker-electrum-daemon's People

Contributors

chris54721 avatar osminogin avatar ramontayag avatar slavikus avatar theborakompanioni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-electrum-daemon's Issues

No longer able to connect to the RPC

On commit #2, I was able to query electrum via RPC. Now, I can't. I'm not sure why and I'll give it a shot tomorrow. Might have something to do with the removal of socat (whose usage I'm not familiar with).

(make build) ==> chown: unknown user

Hi,

I have this error when i run 'make build':
`
chown: unknown user electrum
The command '/bin/sh -c mkdir -p /data ${ELECTRUM_HOME} && ln -sf /data ${ELECTRUM_HOME}/.electrum && chown ${ELECTRUM_USER} ${ELECTRUM_HOME}/.electrum /data' returned a non-zero code: 1
make: *** [Makefile:20 : docker_build] Erreur 1

If you have an idea !? :)
`

Wallet deleted when container restarted?

Hello,

I am new to docker, I set this image up like this in docker-compose.yml:

electrum:
    image: osminogin/electrum-daemon:3.3.8
    expose:
      - 7000
    env_file:
      - .electrum.dev
    volumes:
      - electrum-data:/data
volumes:
  electrum-data:

But when I run electrum create in the container, it creates the wallet in .electrum/wallets but when I restart its gone, how can I make it persist? From what i've seen there is no simple way to make the anonymous volume re-use the older ones

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.