config.toml) and supports environment variables for flexible setup across different networks and backends.
Configuration File
The configuration file is located at$DATADIR/config.toml (default: ~/.bark/config.toml).
File Structure
config.toml
Configuration Options
Required Options
server_address
The address of your Ark server.
- Type: String (URL)
- Required: Yes
- Example:
"https://ark.signet.2nd.dev"
Chain Source
You must configure eitheresplora_address or bitcoind_address.
Using Esplora
- Type: String (URL)
- Use case: Easiest setup, no local node required
- Networks: Mainnet, Signet, Mutinynet
Using Bitcoind
- Type: String (URL)
- Authentication: Cookie file or user/pass required
- Use case: Full node control, privacy
Optional Options
vtxo_refresh_expiry_threshold
The number of blocks before expiration to refresh VTXOs.
- Type: Integer (block height)
- Default: 144 (24h) for mainnet, 12 for testnets
- Example:
12
vtxo_exit_margin
An upper limit of the number of blocks needed to safely exit VTXOs.
- Type: Integer (block delta)
- Default:
12 - Example:
12
htlc_recv_claim_delta
The number of blocks to claim a HTLC-recv VTXO.
- Type: Integer (block delta)
- Default:
18 - Example:
18
fallback_fee_rate
A fallback fee rate to use (in sat/kWu) when fee estimation fails.
- Type: Integer (sat/kWu)
- Default: None for mainnet, 250 (1 sat/vB) for testnets
- Example:
250(1 sat/vB),500(2 sat/vB)
sat/vB * 250 = sat/kWu
round_tx_required_confirmations
The number of confirmations required before considering a round tx fully confirmed.
- Type: Integer (confirmations)
- Default: 6 for mainnet, 1 for testnets
- Example:
1
Network Defaults
Bark uses network-specific defaults:Mainnet
Testnets (Signet, Mutinynet, Regtest)
Configuration Priority
Configuration values are loaded in the following priority order (highest to lowest):- Environment variables with
BARK_prefix - Config file values (
config.toml) - Network defaults (mainnet vs testnet)
Environment Variables
Global Options
| Variable | Description | CLI Equivalent |
|---|---|---|
BARK_DATADIR | Set the datadir path | --datadir |
BARK_VERBOSE | Enable verbose logging | -v, --verbose |
BARK_QUIET | Disable all terminal logging | -q, --quiet |
Configuration Overrides
| Variable | Description | Config Field |
|---|---|---|
BARK_SERVER_ADDRESS | Ark server URL | server_address |
BARK_ESPLORA_ADDRESS | Esplora server URL | esplora_address |
BARK_BITCOIND_ADDRESS | Bitcoind RPC URL | bitcoind_address |
BARK_BITCOIND_COOKIEFILE | Bitcoind cookie path | bitcoind_cookiefile |
BARK_BITCOIND_USER | Bitcoind RPC user | bitcoind_user |
BARK_BITCOIND_PASS | Bitcoind RPC password | bitcoind_pass |
BARK_FALLBACK_FEE_RATE | Fallback fee rate | fallback_fee_rate |
barkd Daemon Options
| Variable | Description | CLI Equivalent |
|---|---|---|
BARKD_DATADIR | Set the datadir path | --datadir |
BARKD_PORT | Port to listen on | --port |
BARKD_HOST | Host to bind to | --host |
BARK_VERBOSE | Enable verbose logging | -v |
BARK_QUIET | Disable console output | -q |
Configuration Examples
Signet with Esplora
config.toml
Mainnet with Bitcoind
config.toml
Regtest with Bitcoind User/Pass
config.toml
Mutinynet
config.toml
Creating Configuration
Automatic Creation
When you create a wallet,bark automatically generates config.toml:
~/.bark/config.toml with your settings.
Manual Creation
You can create the config file manually before runningbark create:
Validation
View your configuration:Data Directory Structure
The datadir contains all wallet data:Permissions
Ensure proper file permissions:Multiple Wallets
Run multiple wallets using different datadirs:Updating Configuration
Modify Existing Config
Edit~/.bark/config.toml directly:
barkd).
Switch Chain Source
Change from Esplora to Bitcoind:Change Ark Server
Troubleshooting
Configuration Errors
If you see “error loading bark config file”:-
Check TOML syntax:
-
Validate URLs:
-
Test bitcoind connection:
Missing Chain Source
Error: “You need to provide a chain source using either —esplora or —bitcoind” Solution: Add one of:Bitcoind Authentication
Error: “When providing —bitcoind, you need to provide auth args as well” Solution: Add authentication:Network Mismatch
Error: “address is not valid for configured network” Solution: Ensure your wallet network matches the Ark server:- Signet wallet → Signet Ark server
- Mainnet wallet → Mainnet Ark server
- Regtest wallet → Regtest Ark server
Best Practices
- Backup config and mnemonic: Store securely offline
- Use environment variables for secrets: Don’t commit passwords to config files
- Set appropriate refresh thresholds: Balance between transaction frequency and VTXO freshness
- Use Esplora for simplicity: Unless you need full node privacy
- Test configuration changes: Use
bark configto verify before operations - Monitor logs: Check
debug.logfor connection issues - Keep fee rates current: Adjust
fallback_fee_ratebased on network conditions