> ## Documentation Index
> Fetch the complete documentation index at: https://second.tech/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up an Ark server with Docker Compose

Docker Compose runs `captaind` alongside PostgreSQL, Bitcoin Core, and optionally Core Lightning with [Boltz's hold plugin](https://github.com/BoltzExchange/hold) on **regtest**. All dependencies are included and configured automatically.

<Note>
  This path runs on **regtest**, a local-only test network. If you'd prefer to run on signet with each component installed individually, see the [manual setup guide](/ark-server/manual-setup) instead.
</Note>

The Compose file handles boot-time dependencies and initializations using `depends_on` and health checks.

## Start the server

<Steps>
  <Step title="Clone the repository">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    git clone https://gitlab.com/ark-bitcoin/bark
    cd bark
    ```
  </Step>

  <Step title="Start all services">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    docker compose -f contrib/docker/docker-compose.yml up
    ```
  </Step>

  <Step title="Verify services are running">
    Once everything is up, you can run commands against the containers:

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    # bark
    docker compose -f contrib/docker/docker-compose.yml run --rm bark bark ark-info

    # bitcoin-cli
    docker compose -f contrib/docker/docker-compose.yml run --rm bitcoind \
      bitcoin-cli -regtest -rpcuser=second -rpcpassword=ark \
      -rpcconnect=bitcoind getblockchaininfo

    # captaind
    docker compose -f contrib/docker/docker-compose.yml run --rm captaind \
      captaind --config /root/captaind/captaind.toml get-mnemonic

    # Core Lightning
    docker compose -f contrib/docker/docker-compose.yml exec cln \
      lightning-cli --regtest getinfo
    ```
  </Step>
</Steps>

<Accordion title="Shared volumes">
  * `captaind` — persistent data for `captaind`
  * `postgres` — PostgreSQL database files
  * `bark` — data for `bark`
  * `bitcoind` — Bitcoin Core blockchain and wallet data
  * `cln` — Core Lightning node data
</Accordion>

## Fund the server

Generate some regtest blocks and send funds to the server:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Get the server's funding address
export CAPTAIND_ADDRESS=$(docker compose -f contrib/docker/docker-compose.yml run --rm captaind \
  captaind --config /root/captaind/captaind.toml rpc wallet | jq -r '.rounds.address')

# Generate blocks
docker compose -f contrib/docker/docker-compose.yml run --rm bitcoind \
  bitcoin-cli -regtest -rpcuser=second -rpcpassword=ark \
  -rpcconnect=bitcoind -generate 106

# Send funds to the server
docker compose -f contrib/docker/docker-compose.yml run --rm bitcoind \
  bitcoin-cli -regtest -rpcuser=second -rpcpassword=ark \
  -rpcconnect=bitcoind sendtoaddress $CAPTAIND_ADDRESS 1
```
