Skip to content

Setting up a Badem Node via Docker

Yusuf Gürdoğan edited this page May 1, 2020 · 9 revisions

The easiest way to set up a Badem node is to use Docker. It does the installation automatically.

1. Installing Docker

sudo apt install -y docker.io

2. Pulling docker image and starting the node

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.

How to stop node:

  1. sudo docker ps to find the CONTAINER ID. Docker Container ID
  2. sudo docker stop CONTAINER_ID (based on the screenshot, it's sudo docker stop d528b03de0c5)
  3. That's it. sudo docker start CONTAINER_ID to start it again.

Best way to check if your node is working:

Use this RPC command to check the current block count: curl -d '{ "action": "block_count" }' [::1]:2225

Creating a wallet and adding accounts

Many commands can be used with RPC protocol. Initially RPC is disabled - let's enable it first.

  1. Stop the node with the 'How to stop node' instructions above.

  2. 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"

  3. 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.

  4. 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.