Skip to main content

Installation

Bark provides multiple installation methods depending on your use case. Choose the option that best fits your needs.
Experimental Software: Bark is experimental and should not be used with real bitcoin. Use testnet or signet for testing only.

Prerequisites

Before installing Bark, ensure you have:
  • Rust toolchain (v1.74.0 or later) - Required for compilation
  • Git - For cloning the repository
  • Build essentials - Standard development tools (gcc, make, etc.)

Quick install (from source)

The fastest way to get started is to compile from source:
1

Install Rust

If you don’t have Rust installed, install it using rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
rustup toolchain install 1.82
2

Clone the repository

git clone https://gitlab.com/ark-bitcoin/bark.git
cd bark
3

Build the binaries

Build all binaries (bark, barkd, and captaind):
cargo build --release
The compiled binaries will be in target/release/:
  • bark - CLI wallet
  • barkd - REST daemon
  • captaind - Ark server
4

Install to system

Optionally install the binaries to your system:
cargo install --path bark-cli
This installs both bark and barkd to ~/.cargo/bin/.

Installation methods

The Nix package manager provides a development environment with all dependencies pre-configured:
# Clone the repository
git clone https://gitlab.com/ark-bitcoin/bark.git
cd bark

# Enter the development environment
nix develop
Alternatively, use direnv for automatic environment loading:
# Create .envrc file
echo "use flake" > .envrc
echo "watch_file nix/*.nix" >> .envrc

# Allow direnv
direnv allow
The Nix flake includes all build dependencies, bitcoind, lightningd, and PostgreSQL for testing.

Option 2: Manual dependency setup

If you prefer not to use Nix, install dependencies manually. The exact packages depend on your system.

Debian/Ubuntu

sudo apt install \
  ca-certificates \
  wget \
  curl \
  git \
  xz-utils \
  build-essential \
  cmake \
  clang

macOS

brew install cmake
xcode-select --install

Rust toolchain

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
rustup toolchain install 1.82

Option 3: Docker (for server deployment)

Run captaind in a Docker container:
FROM rust:1.82 as builder

WORKDIR /build
COPY . .
RUN cargo build --release --bin captaind

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates libpq5 && rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/target/release/captaind /usr/local/bin/

ENTRYPOINT ["captaind"]
Build and run:
docker build -t captaind .
docker run -v ./captaind.toml:/etc/captaind.toml captaind --config /etc/captaind.toml

Verify installation

After installation, verify that the binaries work:
bark --version
# Output: bark 0.1.0-beta.7

Component-specific installation

Installing only bark CLI

If you only need the CLI wallet:
cargo install --path bark-cli --bin bark

Installing only barkd daemon

If you only need the REST daemon:
cargo install --path bark-cli --bin barkd

Installing captaind server

For running an Ark server:
cargo install --path server --bin captaind

Using as a Rust dependency

Add Bark libraries to your Cargo.toml:
[dependencies]
# Core protocol primitives
ark-lib = "0.1.0-beta.7"

# Wallet functionality
bark-wallet = { version = "0.1.0-beta.7", features = ["onchain_bdk"] }

# Bitcoin extensions
bark-bitcoin-ext = "0.1.0-beta.7"

# REST server (optional)
bark-rest = "0.1.0-beta.7"
The onchain_bdk feature enables on-chain wallet functionality using BDK. Omit it if you only need off-chain Ark operations.

Additional tools for development

If you’re contributing to Bark or running tests, install these additional tools:

just command runner

cargo install just

PostgreSQL (for server testing)

sudo apt install postgresql postgresql-contrib

bitcoind and lightningd (for integration tests)

These are required for running integration tests:
# Set environment variables to point to your binaries
export BITCOIND_EXEC="/path/to/bitcoind"
export LIGHTNINGD_EXEC="/path/to/lightningd"
export HOLD_INVOICE_PLUGIN="/path/to/hold/plugin"
Or use the Nix flake which includes all test dependencies.

Network selection

Bark supports multiple Bitcoin networks. Choose the appropriate network for your use case:
NetworkPurposeFlag
SignetDefault test network, recommended for development--signet
RegtestLocal testing with full control--regtest
MutinynetAlternative signet--mutinynet
MainnetProduction (⚠️ experimental, not recommended)--mainnet
Do not use mainnet: Bark is experimental software. Using it on mainnet can result in loss of funds.

Next steps

Now that Bark is installed, continue to:

Quickstart guide

Make your first Ark transaction

CLI reference

Learn bark CLI commands

Configuration

Configure your wallet

Wallet integration

Integrate Bark into your app

Troubleshooting

Rust version too old

If you see compilation errors, ensure you’re using Rust 1.74.0 or later:
rustup update
rustc --version

Build fails on macOS

Make sure Xcode command-line tools are installed:
xcode-select --install

PostgreSQL not found (server builds)

Install PostgreSQL development libraries:
# Debian/Ubuntu
sudo apt install libpq-dev

# macOS
brew install postgresql
For more help, see the FAQ or ask in the community forum.

Build docs developers (and LLMs) love