Run a Reddcoin Electrum server with one command
This repo packages the Reddcoin fork of ElectrumX into a Docker image for linux/amd64 and linux/arm64. It serves Electrum clients such as Redd-Electrum and needs a fully synced reddcoind node with RPC enabled — the reddcoincore/reddcoind image works well for this.
The work here is based on lukechilds/docker-electrumx.
NOTE: For an always up-to-date list see: https://hub.docker.com/r/reddcoincore/electrumx/tags
latest— most recent build frommasterv<version>(e.g.v1.20.1) — built from the matching tag of reddcoin-project/electrumx, with a matching GitHub Release
docker pull reddcoincore/electrumxdocker run -d \
--name reddcoin-electrumx \
-v /path/to/electrumx:/data \
-e COIN=Reddcoin \
-e DAEMON_URL=http://rpcuser:rpcpassword@reddcoind-host:45443 \
-p 50002:50002 \
reddcoincore/electrumxIMPORTANT: The image defaults to
COIN=Bitcoin(inherited from upstream). Always setCOIN=Reddcoin(orCOIN=ReddcoinTestnetwithNET=testnetfor testnet).
DAEMON_URL must point at the RPC interface of your reddcoind node (the default Reddcoin mainnet RPC port is 45443). Make sure reddcoind allows RPC connections from the ElectrumX container (rpcallowip).
On first start ElectrumX indexes the whole Reddcoin chain into /data, which takes a while. Clients can connect once it has caught up with the node.
Running reddcoind and ElectrumX side by side on a private network:
services:
reddcoin-server:
container_name: reddcoin-server
image: reddcoincore/reddcoind:v4.22.9
restart: on-failure
volumes:
- ./data/reddcoin:/home/reddcoind/.reddcoin
environment:
- RPC_SERVER=1
- RPC_USERNAME=rpcuser
- RPC_PASSWORD=change-me
- RPC_PORT=45443
- RPC_ALLOW_IP=172.28.0.0/16
stop_grace_period: 5m
networks:
- reddnet
reddcoin-electrumx:
container_name: reddcoin-electrumx
image: reddcoincore/electrumx:latest
restart: always
volumes:
- ./data/electrumx:/data
environment:
- COIN=Reddcoin
- DAEMON_URL=http://rpcuser:change-me@reddcoin-server:45443
- REPORT_SERVICES=ssl://electrum.example.com:50002,wss://electrum.example.com:50004
ports:
- "50002:50002"
- "50004:50004"
networks:
- reddnet
networks:
reddnet:
ipam:
config:
- subnet: 172.28.0.0/16Set REPORT_SERVICES to the public hostname of your server so it can be announced to peers and clients.
The image sets these defaults, all of which can be overridden with -e:
| Variable | Default |
|---|---|
COIN |
Bitcoin — set this to Reddcoin |
DB_DIRECTORY |
/data |
SERVICES |
tcp://:50001,ssl://:50002,wss://:50004,rpc://0.0.0.0:8000 |
SSL_CERTFILE |
/data/electrumx.crt |
SSL_KEYFILE |
/data/electrumx.key |
EVENT_LOOP_POLICY |
uvloop |
ALLOW_ROOT |
1 |
All ElectrumX environment variables are documented here: https://electrumx-spesmilo.readthedocs.io/en/latest/environment.html
If there's an SSL certificate/key (electrumx.crt/electrumx.key) in the /data volume it'll be used. If not, a self-signed one will be generated on first start.
| Port | Service | Notes |
|---|---|---|
50001 |
TCP (unencrypted) | Exposing it with -p 50001:50001 is strongly discouraged |
50002 |
SSL | The main port for Electrum clients |
50004 |
WebSocket (WSS) | For browser-based wallets |
8000 |
RPC | Only expose to localhost: -p 127.0.0.1:8000:8000 |
To use the RPC interface from inside the container there's no need to expose the port:
docker exec reddcoin-electrumx electrumx_rpc getinfoTo run a specific version, use its tag:
docker run \
-v /path/to/electrumx:/data \
-e COIN=Reddcoin \
-e DAEMON_URL=http://rpcuser:rpcpassword@reddcoind-host:45443 \
-p 50002:50002 \
reddcoincore/electrumx:v1.20.1docker build --build-arg VERSION=1.20.1 -t reddcoincore/electrumx:v1.20.1 .VERSION is a branch or tag of reddcoin-project/electrumx.
-
Bump
ARG VERSIONin theDockerfileand push tomaster— this builds and publisheslatest. -
Tag the commit with the same version and push the tag:
git tag -a v1.20.1 -m "ElectrumX 1.20.1" git push origin v1.20.1This checks the tag matches the
Dockerfile, publishesreddcoincore/electrumx:v1.20.1and creates the GitHub Release.
MIT © Luke Childs, Reddcoin Core Developers