-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docker compose for one step setup with testnet #1000
base: master
Are you sure you want to change the base?
Conversation
README.md
Outdated
@@ -28,25 +27,26 @@ If you can't use our guide, please ask about what you don't understand or consid | |||
Note that this implementation of Electrum server is optimized for **personal/small-scale (family/friends) usage**. | |||
It's a bad idea to run it publicly as it'd expose you to DoS and maybe also other attacks. | |||
If you want to run a public server you may be interested in the [Blockstream fork of electrs](https://github.com/Blockstream/electrs) | |||
which is better optimized for public usage at the cost of consuming *significantly* more resources. | |||
which is better optimized for public usage at the cost of consuming _significantly_ more resources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are those changes required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, no, that's just my editor's auto-format plugin changed it while save the file. I'll remove this change, soon.
-zmqpubrawtx=tcp://0.0.0.0:28335 -zmqpubhashblock=tcp://0.0.0.0:28336 | ||
-txindex=1 -rpcbind=0.0.0.0 -rpcallowip=0.0.0.0/0 | ||
-rpcport=18332 -rest -listen=1 -listenonion=0 | ||
-rpcauth=alice:128f22494cc2208ea8376a3d0b45a131$9cc0187c0e49f35454a3ed1250e40ecaef420cfcd294d3ac22496adbe64f04b9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to not use a constant rpcauth
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using this constant rpcauth
just for easy use. Others may delete it and generate their own rpcauth
via rpcauth.py, put it to ./bitcoind/bitcoin.conf
and change the line auth = "alice:alice"
in conf.toml
to their own config.
Also, if you want to using cookie file to auth, there's a way to do it:
- you can remove the
rpcauth
config - append one line in
docker-compose.yml
in[electrs] > volumes
section:- ./cookie:/electrs/.cookie
- adjust the
conf.toml
file, i.e. comment out therpcauth
line, un-commentcookie_file
and set it's value to/electrs/.cookie
- start with
docker compose up -d
, this command will only start bitcoind, but not electrs - copy the bitcoind's cookie file's content to
./cookie
file:cat ./bitcoind/testnet3/.cookie > cookie
- rebuild electrs with
docker compose up -d --build --no-deps electrs
But i thought it's kind complicate, most people just want one-click to use it.
It's not easy to setup using rpcauth to connect to bitcoin core, so i just make it much easier for testnet setup. Hope that helps those who want to deploy an testnet with electrs quickly, just one command (
docker compose up -d
)