Site's logo

KL, MY

7:30:00 AM

A 3D Bitcoin illustration by Shubham Dhage on Unsplash

Setting Up a Local Bitcoin Dev Environment (Regtest, Fulcrum, Mempool, Ord)

Set up a fully local Bitcoin development environment using Docker, Bitcoin Core in regtest mode, Fulcrum Electrum server, Mempool block explorer, and optional ord for inscriptions.

November 20, 2025

8 min read

Testing Bitcoin applications directly on mainnet is impractical for most developers—it is expensive, slow, and risky. While Testnet and Signet are better alternatives, but you don’t control the blockchain state. On Testnet, faucet availability can be unreliable, and on Signet you cannot mine your own blocks.

That is why a self-contained blockchain environment is ideal for development. Bitcoin’s regtest (Regression Test) mode provides exactly this: instant blocks, unlimited coins, and full control.

To make the experience even better, we can add tools to visualize the chain and inspect transactions, creating a “mini Mainnet” without the pain.

In this guide, we will set up a hybrid environment:

  1. Bitcoin Core (Native Node)
  2. Fulcrum (Native Electrum Server)
  3. Mempool (Dockerized Block Explorer)
  4. Ord (Native Inscription Tool)

Setting up Bitcoin Core

First, go to the Bitcoin Core download page and install the latest stable release for your operating system.

You need to configure bitcoin.conf to enable regtest mode. The location of this file varies by OS, but you can create it manually and specify the path using the -datadir flag when starting the node.

Here is a minimal bitcoin.conf optimized for regtest:

# Specify data directory
#datadir=<dir>
datadir=D:\Program\Bitcoin\data
# Maintain a full transaction index, used by the getrawtransaction rpc
# call (default: 0)
txindex=1
# A fee rate (in BTC/kvB) that will be used when fee estimation has
# insufficient data. 0 to entirely disable the fallbackfee feature.
# (default: 0.00)
fallbackfee=0.000001
# Use the chain <chain> (default: main). Allowed values: main, test,
# testnet4, signet, regtest
chain=regtest
# Accept public REST requests (default: 0)
rest=1
# Allow JSON-RPC connections from specified source. Valid values for <ip>
# are a single IP (e.g. 1.2.3.4), a network/netmask (e.g.
# 1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24), all
# ipv4 (0.0.0.0/0), or all ipv6 (::/0). This option can be
# specified multiple times
#rpcallowip=<ip>
rpcallowip=0.0.0.0/0
rpcallowip=::/0
# Username and HMAC-SHA-256 hashed password for JSON-RPC connections. The
# field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A
# canonical python script is included in share/rpcauth. The client
# then connects normally using the
# rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This
# option can be specified multiple times
#rpcauth=<userpw>
rpcauth=mempool:3965cd21aa174f0d317f5b65757e9e2e$f4c38a2034cfc14498638db6aee7a005278b2f7f69f06275066b693eb2e319f4 # password is "mempool"
# Accept command line and JSON-RPC commands
server=1
# Options for regtest
[regtest]
rpcbind=127.0.0.1
rpcallowip=0.0.0.0
rpcallowip=127.0.0.1
rpcallowip=172.18.0.0/16

Note: You must adjust the datadir path to a valid directory on your machine where you want Bitcoin Core to store data.

Start Bitcoin Core

Run the following command in your terminal to start the node:

Terminal window
# You can run headless mode with `bitcoind` as well.
./bitcoin-qt -conf="D:\Program\Bitcoin\bitcoin.conf"

You may need to adjust the path to bitcoin-qt and bitcoin.conf based on your installation.

Setting up Fulcrum server

Next, we need an Electrum server to index our node and serve data to the Mempool explorer. We will use Fulcrum for its speed and compatibility.

  1. Download the zip file for your OS from the Fulcrum releases page.

  2. Extract the contents.

  3. Create a fulcrum.conf file with the following configuration:

    # *REQUIRED* This is your database directory. The mountpoint needs about 35GB
    # free space if synching to mainnet and 8GB free space if synching to testnet.
    # NOTE: Use native path separators: '/' on Unix, '\' on Windows.
    # datadir = /path/to/a/dir # Windows: datadir = D:\FulcrumData\mainnet
    datadir = D:\Program\Bitcoin\data\regtest
    # *REQUIRED* This is the bitcoind RPC socket you configured using rpcbind= and
    # rpcport= in your bitcoind .conf file.
    # bitcoind = 127.0.0.1:8332
    bitcoind = 127.0.0.1:18443
    # This is the bitcoind RPC username you specified in your bitcoind .conf file.
    # This corresponds to the rpcuser= from that file. If using the auto-generated
    # cookie file from bitcoind, specify rpccookie= instead (see below).
    # rpcuser = Bob_The_Banker
    rpcuser = mempool
    # This is the bitcoind RPC password you specified in your bitcoind .conf file.
    # This corresponds to the rpcpassword= from that file. If using the
    # auto-generated cookie file from bitcoind, specify rpccookie= instead (see
    # below).
    # rpcpassword = hunter1
    rpcpassword = mempool
    # *RECOMMENDED* - TCP bind - 'tcp' - DEFAULT: 0.0.0.0:50001, Specifies the IPv4
    # or IPv6 interface:port to bind to.
    #tcp = 0.0.0.0:50001
    tcp = 0.0.0.0:50001
    # *RECOMMENDED* - WS bind - 'ws' - DEFAULT: Nothing, Specifies the IPv4 or IPv6
    # interface:port to bind to for Web Socket support (ws://).
    #ws = 0.0.0.0:50003
    ws = 0.0.0.0:50003
    # Admin RPC bind - 'admin' - DEFAULT: None -- *REQUIRED* to use "FulcrumAdmin"
    #admin = 127.0.0.1:8000
    admin = 8000
    # HTTP stats bind - 'stats' - DEFAULT: None
    #stats = 127.0.0.1:8080
    stats = 8080
    # Peer discovery - 'peering' - DEFAULT: true - If false, do not contact peers to
    # discover other servers.
    #peering = true
    peering = false
    # Peering: announce self - 'announce' - DEFAULT: true if hostname and peering
    # are set, false otherwise. If true and the aforementioned conditions are met,
    # then your server will announce itself to peers
    #announce = true
    announce = false

Critical Note: The datadir in Fulcrum points to the same root as Bitcoin Core, but notice that we append \regtest. Bitcoin Core automatically creates this subdirectory when running in regtest mode. You can learn more about this behaviour in the Bitcoin Core documentation.

Start Fulcrum

Navigate to the folder containing the executable and run:

Terminal window
./Fulcrum.exe ./fulcrum-config.conf

You should see Fulcrum starting up a server and connecting to your Bitcoin Core node. It will begin indexing the blockchain data.

Troubleshooting Sync

You may need to mine at least one block in your regtest node to allow Fulcrum to sync properly. The Fulcrum server will not listen to the TCP or websocket port you specified until bitcoind is NOT in IBD. You can do this by using the following command in the Bitcoin Core console:

Terminal window
generatetoaddress 1 <your-regtest-address>

This mines one block and send the coinbase reward to the specified address.

Setting up Mempool (Docker)

Now for the visual interface. We will use Docker to run the Mempool explorer, as it is significantly easier than building the frontend and backend manually.

Prerequisites: Ensure Docker is installed and running.

You can download the pre-configured compose.yml file from my repository:

GitHub AlstonChan/bitcoin-development-environment-setup

Launching the Explorer

After you have acquired the compose.yml file, ensure that:

  1. You have Bitcoin Core running in regtest mode.
  2. You have Fulcrum server running and fully synced.

By running the following command in the terminal where the compose.yml file is located:

Terminal window
docker compose up -d

You can now access your local Mempool explorer at http://localhost:8089.

Bonus: Setting up ord for inscriptions

If you want to experiment with Bitcoin Ordinals and Inscriptions, you can add the ord tool to your stack.

  1. Download the latest binary from the ord releases page.

  2. Extract it and create an ord.yaml configuration file:

    bitcoin_data_dir: D:\Program\Bitcoin\data\regtest
    bitcoin_rpc_url: 127.0.0.1:18443
    bitcoin_rpc_password: mempool
    bitcoin_rpc_username: mempool
    chain: regtest
    data_dir: D:\Program\Bitcoin\data\regtest\ord
    index_addresses: true
    index_cache_size: 1000000000
    index_runes: true
    index_sats: true
    index_transactions: true
    integration_test: true
    no_index_inscriptions: false

You may want to adjust the bitcoin_data_dir and data_dir paths to point to appropriate directories on your system.

Start Ord Server

Run the server with the following command:

Terminal window
./ord.exe --config "./ord.yaml" server --http-port 8088

Make sure to adjust the path to ord.exe and ord.yaml based on your setup.

You can now access the Ord interface at http://localhost:8088.

Summary: The Startup Sequence

Since this environment relies on a “hybrid” setup (native executables + Docker), you generally cannot start everything at once. Because of the dependencies—Mempool needs Fulcrum, and Fulcrum needs Bitcoin Core—you should follow this specific order when rebooting your environment:

  1. Start Bitcoin Core (bitcoin-qt)

    • Wait until: The GUI opens or the logs show the RPC server is listening.
  2. Start Fulcrum (Fulcrum.exe)

    • Wait until: You see the log message switch to height <X> indicating it has synced with Core or Starting listener service for TcpSrv 0.0.0.0:50001 ... indicating it is ready to accept connections.
  3. Start Mempool (docker compose up)

    • Wait until: You can load http://localhost:8089 in your browser. If the dashboard is stuck on “Connecting…”, it usually means Fulcrum isn’t ready yet.
  4. Start Ord (ord.exe)

    • Note: You can run this anytime after Bitcoin Core is live, as it does not depend on Fulcrum or Mempool.

With this sequence, your local “mini-mainnet” will run smoothly. You now have a robust, cost-free environment to build, break, and test your Bitcoin applications.

Happy coding!