Eternal AI
  • The AI layer for the new internet
  • eternals
    • What are Eternals?
    • Specification
    • Proof-of-Compute
  • The new internet, AI-powered
    • Bitcoin, AI-powered
      • Eternals on Bitcoin
      • BitAI Virtual Machine
      • Run a BitAI node
    • Ethereum, AI-powered
    • Solana, AI-powered
  • smart contracts, ai-powered
    • How to use onchain LLM
    • Onchain AI composability - AI Powered Wallet
    • Onchain AI Composability - AI Powered Gaming With Chess
  • neurons
    • What are Neurons?
    • Neuron Device
    • Virtual Neurons
      • Solo Neuron
      • Neuron as a Service
      • Pooled Neuron
  • AI CHAINS
    • What are AI chains?
    • Bittensor and existing concepts
    • Base layer: Bitcoin vs Bittensor
    • AI chains: Bitcoin L2s vs Subnets
    • Apps: Smart contracts vs APIs
  • EAI
    • Utilities
    • Tokenomics
  • fully onchain ai models
    • Architecture
    • Deploy your first fully onchain AI
      • Set up your development environment
      • Create a self-custody wallet
      • Train an AI model in Keras
      • Transform the Keras model to Eternal
      • Send, receive, and trade Eternals
    • Progress
    • Misc
      • Transforming an AI Model into an Eternal
      • Standardized data formats
      • Specification
        • Layers
        • Models
  • Decentralized Inference API
    • API
      • API Key
      • Completions
      • Chat completion
      • Create a dagent
      • Get deposit address
      • Get dagent info
      • Agent Completion
    • Onchain Models
    • Tutorials
      • Build unstoppable Eliza agents
      • Build unstoppable Rig agents
      • Build unstoppable ZerePy agents
      • Decentralized ChatGPT
      • Don't Trust, Verify
      • Adjust your dagent personality
      • Launch on Twitter
      • Chain of thought
      • Build a dagent as a service with EternalAI API
    • Open Source
      • Architecture
      • Installation
Powered by GitBook
On this page
  • Quick setup
  • Manual setup
  • Install Bitcoin Core
  • Install BitAI
  • Add BitAI to MetaMask
  • Setup BitAI Explorer
  • Setup your EAI wallets
  1. The new internet, AI-powered
  2. Bitcoin, AI-powered

Run a BitAI node

PreviousBitAI Virtual MachineNextEthereum, AI-powered

Last updated 6 months ago

An BitAI node is similar to the Ordinals indexer. Anyone can run one, even on an old laptop. This guide will show you how to run one.

Quick setup

To set up an BitAI node on a VPS or your local machine, run the following commands:

curl -s https://raw.githubusercontent.com/TrustlessComputer/trustless-node-easy/BitAI/setup-mainnet.sh -o setup-trustless.sh
chmod +x setup-trustless.sh
sh ./setup-trustless.sh

Manual setup

Install Bitcoin Core

provides both a Bitcoin full node and a wallet. Working with BitAI requires a Bitcoin full node with RPC enabled.

After installing Bitcoin Core, run bitcoind with -server=1 :

./bitcoind -server=1

It may take some time for your Bitcoin full node to be fully synced.

Install BitAI

Download BitAI pre-built binaries at this .

After downloading the binary, run chmod +x <filename> to allow executable permission. On MacOS, you may also have to go to Privacy & Security to allow the file to run.

Start your BitAI node:

./bitai -c <btc-node-cookie-file-path> -i <your-bitai-address> # specify your BitAI native address

Add these parameters if you set up your Bitcoin full node with a username and password.

./bitai -u <btc-node-username> -p <btc-node-password> -i <your-bitai-address>

Since BitAI reuses EVM, your BitAI native address is similar to an Ethereum address. You can create a new BitAI address with any EVM-compatible wallet. We recommend MetaMask.

Add BitAI to MetaMask

In MetaMask, click on Networks -> Add Network -> Add a network manually. Use the following settings to point MetaMask to the BitAI running on your machine.

  • Name: BitAI

  • URL: http://localhost:10002

  • ChainID: 22213

  • Symbol: EAI

EAI is the native cryptocurrency of Eternal AI. Like ETH, you can use EAI to pay transaction fees, deploy smart contracts, and spend it in dapps.

Setup BitAI Explorer

Launch BitAI Explorer:

docker compose -f docker/docker-compose-blockscout.yml up

Open this URL on your browser:

http://0.0.0.0:4000

Setup your EAI wallets

BitAI uses two wallets: a Bitcoin wallet and a native EAI wallet. You need funds in both wallets to operate your BitAI node.

Bitcoin wallet

A Bitcoin Core wallet named tc is automatically created by BitAI. Because BitAI uses Bitcoin Core to manage private keys, sign transactions, and broadcast transactions to the Bitcoin network, your tc wallet will need some sats.

Get a new address from your tc wallet and send it some funds:

./bitcoin-cli -rpcwallet=tc -getnewaddress

You can check the balance with:

./bitcoin-cli -rpcwallet=tc getbalances

Native wallet

Since BitAI reuses EVM, your native address is similar to an Ethereum address. You can create a new native address with any EVM-compatible wallet. We recommend MetaMask.

You will need some EAI, the cryptocurrency of Eternal AI. Like ETH, you can use EAI to deploy smart contracts, pay transaction fees, and spend in dapps.

The native address is the same as the one you use to run your BitAI.

./bitai -i <your-bitai-address>

You can check your EAI balance on MetaMask.

BitAI reuses for blockchain exploration data such as blocks, transactions, and addresses.

Bitcoin Core
download page
Blockscout