Setting up a Badem Node via Docker
The easiest way to set up a Badem node is to use Docker. It does the installation automatically.
sudo apt install -y docker.io
sudo docker run --restart=unless-stopped -d -p 2224:2224/udp -p 2224:2224 -p [::1]:2225:2225 -v ~:/root bademcurrency/badem
That's it! You can use an open port check tool to check whether if your node is working and public. Port number is 2224.
-
sudo docker ps
to find the CONTAINER ID. -
sudo docker stop CONTAINER_ID
(based on the screenshot, it'ssudo docker stop d528b03de0c5
) - That's it.
sudo docker start CONTAINER_ID
to start it again.
Use this RPC command to check the current block count: curl -d '{ "action": "block_count" }' [::1]:2225
Many commands can be used with RPC protocol. Initially RPC is disabled - let's enable it first.
-
Stop the node with the 'How to stop node' instructions above.
-
Edit "Badem/config.json" with a text editor. (e.g
nano Badem/config.json
).
"rpc_enable": "false" -> "rpc_enable": "true"
"enable_control": "false" -> "enable_control": "true" Both of them must be true.
"address": "::1" -> "address": "::ffff:0.0.0.0" -
Start the node again, and use the following commands to create a wallet and add an account:
curl -d '{ "action" : "wallet_create" }' [::1]:2225
Output is your "wallet ID", you can use to reference this wallet in other API commands.
curl -d '{ "action": "account_create", "wallet": "000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F" }' [::1]:2225
Put your own wallet ID. Output is your Badem address. -
VERY IMPORTANT: Backup your wallet seed with
sudo docker exec CONTAINER_ID ./badem_node --wallet_decrypt_unsafe --wallet=000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F
Put your own wallet ID. Output is your wallet seed, which is your "key". It's strongly recommended to store it in a safe place.