kylemanna / docker-bitcoind Goto Github PK
View Code? Open in Web Editor NEWπ° Bitcoind Docker image that runs the Bitcoin node in a container for easy deployment
Home Page: https://hub.docker.com/r/kylemanna/bitcoind/
License: MIT License
π° Bitcoind Docker image that runs the Bitcoin node in a container for easy deployment
Home Page: https://hub.docker.com/r/kylemanna/bitcoind/
License: MIT License
I have a local test net that I've created using this:
https://github.com/freewil/bitcoin-testnet-box
having just created some toy example blocks and transactions, can I somehow prescribe that my local testnet is the one used?
How can i konw that had dig bitcoin by dockerοΌ
Hey 0.16.2 being affected by a critical bug:
https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.16.3.md#denial-of-service-vulnerability
version 0.16.3 is available :
https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin
Could you re launch an image build on the docker store ?
Thanks.
I see logs like:
Initialization completed successfully
+ [ 0 -eq 0 ]
+ set -- -rpcbind=:8332 -rpcallowip=0.0.0.0/0
+ exec bitcoind -rpcbind=:8332 -rpcallowip=0.0.0.0/0
Then the container exits immediately. Same using "docker run" or docker-compose.
My config is:
daemon=1
regtest=1
listen=0
fallbackfee=0.0002
rpcuser=theuser
rpcpassword=thepass
# accept JSON-RPC commands
server=1
# prune=5500
txindex=1
[regtest]
rpcport=8332
0.20.1 was released in August https://bitcoincore.org/en/2020/08/01/release-0.20.1/ but it looks like this docker image is still running 0.18.0
Thanks!
Need to determine a simple way to clean-up bootstrap.dat.old
without other simultaneous running processes in the container (cron, init, process manager, etc).
One thought is to leverage btc_oneshot
to check for the file, and delete it if it's older then say, 14 days. This would happen automatically by the upstart.init file on reboot/restart and is probably what the user wants.
If the file is less than 14 days old, it's nice to keep it around so that it could be relocated and used for seeding as mentioned in issue #9.
Long term a solution is needed to determine how to expire the torrent file when new torrent files are created and old ones are abandoned. First thought is to store metadata about the torrent file in the Docker image and then the Docker image as it will be periodically updated.
Could btc_bootstrap exit if the bootstrap is already downloaded and has valid checksum?
I cannot access rpc services after upgrade anymore. This is how I configured bitcoind:
d3-btc-node0:
image: kylemanna/bitcoind:latest
container_name: d3-btc-node0
ports:
- 8332:8332
- 8333:8333
- 18333:18333
- 18444:18444
entrypoint:
- bitcoind
- --rpcuser=test
- --rpcpassword=test
- --regtest=1
- --server=1
- --rpcallowip=::/0
- --rpcport=8332
Whenever I call bitcoin-cli --regtest generate 1
it answers with
error: couldn't connect to server: EOF reached (code 1)
(make sure server is running and you are connecting to the correct RPC port)
Before upgrade everything was ok. What is wrong?
talisker:~ jordan$ docker run -v /Users/jordan/blockchains/bitcoin:/bitcoin --name=bitcoind-node3 -p 8333:8333 -p 127.0.0.1:8332:8332 kylemanna/bitcoind
+ btc_init
+ '[' '!' -e /bitcoin/.bitcoin/bitcoin.conf ']'
+ mkdir -p /bitcoin/.bitcoin
+ echo 'Creating bitcoin.conf'
+ cat
Creating bitcoin.conf
+ cat /bitcoin/.bitcoin/bitcoin.conf
disablewallet=1
printtoconsole=1
rpcuser=bitcoinrpc
rpcpassword=dd if=/dev/urandom bs=33 count=1 status=none | base64
Initialization completed successfully
+ echo 'Initialization completed successfully'
+ '[' 0 -gt 0 ']'
+ args=("-rpcallowip=::/0")
+ exec bitcoind -rpcallowip=::/0
2016-08-17 10:51:57
2016-08-17 10:51:57 Bitcoin version v0.12.1.0-g9779e1e (Mon, 11 Apr 2016 13:01:43 +0200)
2016-08-17 10:51:57 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2016-08-17 10:51:57 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
2016-08-17 10:51:57 Default data directory /bitcoin/.bitcoin
2016-08-17 10:51:57 Using data directory /bitcoin/.bitcoin
2016-08-17 10:51:57 Using config file /bitcoin/.bitcoin/bitcoin.conf
2016-08-17 10:51:57 Using at most 125 connections (1048576 file descriptors available)
2016-08-17 10:51:57 Using 8 threads for script verification
2016-08-17 10:51:57 scheduler thread start
2016-08-17 10:51:57 Binding RPC on address 0.0.0.0 port 8332 failed.
2016-08-17 10:51:57 HTTP: creating work queue of depth 16
2016-08-17 10:51:57 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.
2016-08-17 10:51:57 HTTP: starting 4 worker threads
2016-08-17 10:51:57 Bound to [::]:8333
2016-08-17 10:51:57 Bound to 0.0.0.0:8333
2016-08-17 10:51:57 Cache configuration:
2016-08-17 10:51:57 * Using 2.0MiB for block index database
2016-08-17 10:51:57 * Using 32.5MiB for chain state database
2016-08-17 10:51:57 * Using 65.5MiB for in-memory UTXO set
2016-08-17 10:51:57 init message: Loading block index...
2016-08-17 10:51:57 Opening LevelDB in /bitcoin/.bitcoin/blocks/index
2016-08-17 10:51:57 IO error: /bitcoin/.bitcoin/blocks/index: Invalid argument
2016-08-17 10:51:57 : Error opening block database.
Do you want to rebuild the block database now?
2016-08-17 10:51:57 Aborted block database rebuild. Exiting.
2016-08-17 10:51:57 Shutdown: In progress...
2016-08-17 10:51:57 scheduler thread interrupt
: Error opening block database.
Do you want to rebuild the block database now?
2016-08-17 10:51:57 StopNode()
2016-08-17 10:51:57 Shutdown: done
talisker:~ jordan$
It does seem to do some stuff though..
talisker:blockchains jordan$
talisker:blockchains jordan$ pwd
/Users/jordan/blockchains
talisker:blockchains jordan$
talisker:blockchains jordan$ tree -a bitcoin/
bitcoin/
βββ .bitcoin
βββ .lock
βββ bitcoin.conf
βββ blocks
βΒ Β βββ index
βΒ Β βββ 000003.log
βΒ Β βββ CURRENT
βΒ Β βββ LOCK
βΒ Β βββ LOG
βΒ Β βββ MANIFEST-000001
βββ debug.log
3 directories, 8 files
talisker:blockchains jordan$
I can confirm that using a docker volume (as per the instructions) does work. Wonder why it flips out with external volumes? I have plenty of disk, cpu, mem availible.
Need to create a systemd service file that does the same as the upstart.init
file. Service file is easy, testing is hard because it's time consuming.
Sorry , my english is not very well , buy i has a problem hope you can help me
I user command bitcoin-cli getnewaddress and bitcoin-cli getblance
return:
error code: -32601
error message:
Method not found
i remark the disablewallet=1 and "docker exec {CONTAINER ID} bitcoind -conf=/bitcoin/.bitcoin/bitcoin.conf -rescan"
but it still the same, is it still disable wallet?
what can I do ? what command can show wallet status ? can you help me
Data is not stored into /bitcoin
. I ssh into the container and it is empty even while is downloading the blockchain.
After doing "quick start" I waited for a few days. CPU was 100% and 41gb of data was downloaded.
Buy I still can't connect with bitcoin-cli.
docker run --volumes-from=bitcoind-data --rm -it kylemanna/bitcoind bitcoin-cli getinfo
gives me error: couldn't connect to server
Usually I get whit when blockchain was not fully loaded.
Right now CPU load is 1-2%
docker logs -f bitcoind-node
showing some old blocks
4cbedb5749b972cf1191508a43fb7f06f789a71b70709cc height=25194 log2_work=46.620872 tx=25355 date=2009-10-18 00:08:20 progress=0.000132 cache=6.0MiB(23623tx) UpdateTip: new best=00000000fef8903bda5d6bcc6ff1c396b93730c425ee637e14f9d98eea6ac086 height=25195 log2_work=46.620929 tx=25356 date=2009-10-18 00:19:24 progress=0.000132 cache=6.0MiB(23624tx) UpdateTip: new best=000000006f9cd96b8bec9b08d4891bb9d0d3723a3967e19e4943e498dec99784 height=25196 log2_work=46.620986 tx=25357 date=2009-10-18 00:58:37 progress=0.000132 cache=6.0MiB(23625tx) UpdateTip: new best=00000000b0f920c91fd933436084ec4eea4072210d2d80cea71090e211baa081 height=25197 log2_work=46.621044 tx=25358 date=2009-10-18 01:00:40 progress=0.000132 cache=6.0MiB(23626tx) UpdateTip: new best=00000000e3fb23aa147bf48c22cdb1e2fc2b00522be508e89e9ec6f364a78f0e height=25198 log2_work=46.621101 tx=25359 date=2009-10-18 01:12:44 progress=0.000132 cache=6.0MiB(23627tx)
System: Debian
3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux
Hosted on Digital Ocean plan ($ 40 / mo)
Docker version 1.8.1, build d12ea79
Can somebody explain what happening?
Do I need to wait more?
except these kind of message
2016-08-30 00:30:12 ProcessMessages: advertizing address ......:8333 2016-08-30 00:30:12 receive version message: /Satoshi:0.12.1/: version 70012, blocks=427441, us=81.247.172.246:48208, peer=10 2016-08-30 00:30:12 AdvertizeLocal: advertizing address ....:8333 2016-08-30 00:34:45 socket send error No route to host (113) 2016-08-30 00:34:46 ProcessMessages: advertizing address .....:8333 2016-08-30 00:34:46 receive version message: /Satoshi:0.12.1/: version 70012, blocks=427441, us=81.247.172.246:42590, peer=11 2016-08-30 00:34:46 AdvertizeLocal: advertizing address 81.247.172.246:8333 2016-08-30 00:38:04 UpdateTip: new best=000000000000000001b9bcbbfffd677ef19ed159c74c16579dcb4f657782cd95 height=427442 log2_work=85.199677 tx=152629851 date=2016-08-30 00:37:36 progress=1.000000 cache=5.7MiB(6903tx) 2016-08-30 00:38:04 UpdateTip: 5 of last 100 blocks have unexpected version
Idon't have much...
does the port forwarding be a problem?
I have setup using docker & everything working.
How can I run this behind a TOR?
I have also setup EZNODE docker container which runs a TOR, BTC RPC Explorer
It would be nice to connect to the TOR created by that.
Any advice on this?
Hey,
I noticed that Matt Corello published latest bitcoin packages:
https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin
Could you launch an image rebuild on the Docker store ?? so that we can all pull that good stuff.
Thanks.
It appears that when I use my own config file, environment variables set in the docker-compose.yaml are not respected. I'd like to keep most of my config in a file for version control, but I'd also like to have sensitive things like RPCUSER and RPCPASSWORD as environment variables, out of plain-text version control. Is there a way to achieve this?
What launch options are needed to make this a testnet node?
Is it possible to connect with testnet with this image?
Or do we need 18333
etc?
docker run -v bitcoind-data:/bitcoin --name=bitcoind-node -d -p 8333:8333 -p 127.0.0.1:8332:8332 kylemanna/bitcoind -testnet
bitcoin-cli getinfo
{
"version": 140200,
"protocolversion": 70015,
"blocks": 32,
"timeoffset": 0,
"connections": 3,
"proxy": "",
"difficulty": 1,
"testnet": false,
"paytxfee": 0.00000000,
"relayfee": 0.00001000,
"errors": ""
}
When I try:
docker run -v bitcoind-data:/bitcoin --name=bitcoind-node -d \
-p 18333:18333 \
-p 127.0.0.1:18332:18332 \
kylemanna/bitcoind -testnet
error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)
Hey,
I noticed that Matt Corallo published latest bitcoin packages for ubuntu.
Could you launch an image rebuild on the Docker store ?
Thanks.
i get this error when running bitcoin docker on dev mode
2021-01-08 10:34:20 Bitcoin Core version v0.16.0.0-g4b4d7eb255 (release build)
2021-01-08 10:34:20 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2021-01-08 10:34:20 Assuming ancestors of block 0000000000000000005214481d2d96f898e3d5416e43359c145944a909d242e0 have valid signatures.
2021-01-08 10:34:20 Setting nMinimumChainWork=000000000000000000000000000000000000000000f91c579d57cad4bc5278cc
2021-01-08 10:34:20 Using the 'sse4' SHA256 implementation
2021-01-08 10:34:20 ERROR: Error while attempting to lock directory /bitcoin/.bitcoin: No such file or directory
2021-01-08 10:34:20 Error: Cannot obtain a lock on data directory /bitcoin/.bitcoin. Bitcoin Core is probably already running.
Error: Cannot obtain a lock on data directory /bitcoin/.bitcoin. Bitcoin Core is probably already running.
From the last 2 upgrades, whenever I upgrade the node it takes 3-4 days to boot to the last synced block.
For ex. After upgrade, if I query latest block it starts from 1 and take days to reach the last synced block saved in mapped data folder.
Is there any configuration changes I have to do or any system requirement is changed?
Earlier using the same the system config it used to take max 10-15 mins to boot and start syncing to the mainnet.
Thanks
-- Synology Docker
For whatever reason after creating / launching the container user bitcoin is always 1000:1000 instead of what I've specified in environment.
I can confirm that ENV variables are being passed to the shell. It's messing up permissions on my host OS. Other images using ENV variables switch the UID/GID correctly.
Is there a way to work around this?
root@kylemanna-bitcoind1:~# echo $USER_ID
1034
root@kylemanna-bitcoind1:~# echo $GROUP_ID
65537
root@kylemanna-bitcoind1:~# grep bitcoin /etc/passwd /etc/group
/etc/passwd:bitcoin:x:1000:1000::/bitcoin:/bin/bash
/etc/group:bitcoin:x:1000:
The kylemanna/bitcoin image has everything in it act as a bittorrent seed node. Need to find time to write it up.
Thoughts:
If i run according to your config.md
docker run -v bitcoind-data:/bitcoin --name=bitcoind-node -d \ -p 8333:8333 \ -p 127.0.0.1:8332:8332 \ -e DISABLEWALLET=1 \ -e PRINTTOCONSOLE=1 \ -e RPCUSER=rpcuser \ -e RPCPASSWORD=rpcpass \ kylemanna/bitcoind
or with
docker run -v bitcoind-data:/bitcoin --name=bitcoind-node -d -p 8333:8333 -p 127.0.0.1:8332:8332 -v /etc/bitcoind/bitcoin.conf kylemanna/bitcoind
/etc/bitcoind/bitcoin.conf content being
rpcuser=rpcuser
rpcpassword=rpcpass
rpcport=8332
server=1
rpcbind=127.0.0.1
i never succeed to connect with RPC
curl --user rpcuser --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
always get a timeout
went inside the container
docker exec -it bitcoind-node bash
and found
cat /bitcoin/.bitcoin/bitcoin.conf
disablewallet=1
printtoconsole=1
rpcuser=bitcoinrpc
rpcpassword=QvZjzT9o4ZkpgIMK4CyQDrRzGat1Bn57mKnJarne+0k8
Then i tried also
curl --user bitcoinrpc --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
I am a bit lost, did you try to use another rpc password already?
thanks and regards
Hot off the press: https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin
Add the ability to bootstrap the bitcoind-data volume using the BitTorrent network. The BitTorrent is much better suited to distributed 20GB+ of block chain data.
Initial concern is that downloading the bootstrap data feeding it to bitcoind will exceed the 30GB partition size on the cheap VPS (read: DigitalOcean 30 GB droplet).
Support Ubuntu 16.04 with systemd init script.
2017-01-03 - Bitcoin Core version 0.13.2 released
Thanks
Add documentation to use docker volume create --name bitcoind-data
instead.
Considering migrating to Alpine Linux so that the image is much smaller and leaner.
The Bitcoin package is native to Alpine Linux and won't require the PPA to get up to date.
Does anyone have any thoughts?
Hi Kyle, great resource here tyvm for releasing it!
Any chance of a new build using core 0.15.0.1?
https://github.com/bitcoin/bitcoin/commits/22.x
not that it blocks anyone from working with bitcoin but an update for the docker to v22 would be nice
Hi,
it appears that it has taken already much more than 40GB for my volume and I just created yesterday... any ideas about how much it will take?
Would be easier to maintain going forward.
is there a way to limit upload traffic on this image?
If not where could I modify the config for that?
Repro steps:
Expected: documentation page
Observed: https://hub.docker.com/r/kylemanna/docs, URL is open that returns error 404.
The path for the data volume has changed from "/bitcoin" to "/bitcoin/.bitcoin" in the ":latest" image. If you specify a volume for "/bitcoin" and not for "/bitcoin/.bitcoin", then docker mounts the subfolder to a default docker volume, and not the volume which is specified. This caused some issues on my machine, since the drive holding the docker volumes is only a small SSD, and not my big NAS drive. The docker commands in the documentation should be adjusted accordingly.
Does this support GPUs? 'NVIDIA GPU Reservation' ?
Version 0.18.0 is available on ~7 weeks now:
https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin
Could you launch an image build on the docker store ?
Thanks.
With the installation commands, I receive an out of disk space error. However, I have plenty of disk space on my system. Attempting to restart the download of the blockchain results in an error.
When specifying that I would like to reserve 200g in the volume with:
docker volume create --opt o=size=200g --name=bitcoind-data
and then attempted to start the container using the volume:
docker run --volume bitcoind-data:/bitcoin --volume-driver local --name=bitcoind-node -d -p 8333:8333 -p 127.0.0.1:8332:8332 kylemanna/bitcoind
results in the error:
docker: Error response from daemon: missing device in volume options.
Failed to connect to 127.0.0.1 port 8332: Connection refused
this happened when I update bitcoin core from version 15.0 to 19.1.
With 15.0 all was working fine, what is the difference in RPC methods in bitcoind from 19.1 ???
After the latest update, I'm getting this error Error parsing command line arguments: Invalid parameter -d
. Worked fine with the previous ":latest".
used commands:
docker volume create --name=bitcoind-data
docker run -v bitcoind-data:/bitcoin --name=bitcoind-node -d -p 8333:8333 -p 127.0.0.1:8332:8332 kylemanna/bitcoind
bitcoin-cli works fine:
docker exec -it bitcoind-node bitcoin-cli getblockchaininfo
but curl couldn't get response:
Ξ» curl -v localhost:8332
- Rebuilt URL to: localhost:8332/
- Trying ::1...
- Trying 127.0.0.1...
- connect to ::1 port 8332 failed: Connection refused
- connect to 127.0.0.1 port 8332 failed: Connection refused
- Failed to connect to localhost port 8332: Connection refused
- Closing connection 0
curl: (7) Failed to connect to localhost port 8332: Connection refused
this is the same
curl -v -u bitcoinrpc:PWgnaXeUDG3PBpr/6uE/ZuKMO7/pkgAQqGBY8bqYhmxj http://127.0.0.1:8332
any ideas why?
Binding RPC on address ::1 port 8332 failed.
How about respecting environment variables like
docker run bitcoind -e RPC-PASSWORD:xxx
If you agree on usefulness I might write a pr.
HI - have you successfully built images for arm processors (raspberry pi) ? I have this working well on intel cpu but trying to get it working for the raspberry pi. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.