BitBuilder Cloud CLI (bbctl) uses a set of configuration files to store settings, provider information, and credentials. This guide explains how to configure and customize your bbctl environment.
bbctl uses the following configuration files, located in the ~/.bbctl/ directory:
| File | Purpose |
|---|---|
settings.toml |
Global settings and defaults |
providers.toml |
Provider configurations |
credentials.toml |
Authentication credentials (API keys, tokens, etc.) |
The settings.toml file contains global configuration for bbctl behavior:
# Default provider to use when not specified
default_provider = "vyos-router"
# Default region to use when not specified
default_region = "nyc"
# Enable or disable telemetry (default: false)
telemetry_enabled = false
# Enable or disable auto-update (default: true)
auto_update_enabled = true
# Enable or disable terminal colors (default: true)
colors_enabled = true
# Default instance sizing when not specified
default_cpu = 2
default_memory_gb = 4
default_disk_gb = 80
# Logging level (trace, debug, info, warn, error)
log_level = "info"You can modify settings using the config command:
# Set default provider
bbctl config set default_provider vyos-router
# Change log level
bbctl config set log_level debugThe providers.toml file defines infrastructure providers and regions:
# Provider configurations
[providers]
[providers.vyos-router]
provider_type = "VyOS"
name = "vyos-router"
host = "192.168.1.1"
params = { network_type = "routed" }
[providers.proxmox-host]
provider_type = "Proxmox"
name = "proxmox-host"
host = "192.168.1.2"
params = { node = "pve" }
# Region configurations
[regions]
[regions.nyc]
id = "nyc"
name = "New York"
provider = "VyOS"
location = "US East"
available = true
limits = { max_instances = 10, max_cpu_per_instance = 8 }
[regions.sfo]
id = "sfo"
name = "San Francisco"
provider = "Proxmox"
location = "US West"
available = true
limits = { max_instances = 5, max_cpu_per_instance = 4 }Provider configuration can be managed using CLI commands:
# Add a new VyOS provider
bbctl providers add vyos-router2 --type vyos --host 192.168.1.3 --username vyos
# Add a new Proxmox provider
bbctl providers add proxmox-host2 --type proxmox --host 192.168.1.4
# Remove a provider
bbctl providers remove vyos-router2The credentials.toml file stores authentication information for providers:
[credentials]
[credentials.vyos-router]
username = "vyos"
api_key = "YOUR_API_KEY"
ssh_port = 22
api_port = 443
[credentials.proxmox-host]
use_token_auth = true
token_auth = { token_id = "USER@pam!TOKEN", token_secret = "YOUR_TOKEN_SECRET" }
verify_ssl = false- Use API tokens instead of passwords when possible
- Ensure proper file permissions (600) on credentials.toml
- Consider using environment variables for sensitive credentials
Network configuration is stored within the provider settings:
[networks.app-network]
id = "net-01234567"
name = "app-network"
cidr = "192.168.1.0/24"
network_type = "Routed"
provider = "VyOS"
region = "nyc"
gateway = "192.168.1.1"
dns_servers = ["1.1.1.1", "8.8.8.8"]For secure encrypted networks using WireGuard:
[networks.secure-net]
id = "net-89abcdef"
name = "secure-net"
cidr = "10.10.0.0/24"
network_type = "VPN"
provider = "VyOS"
region = "nyc"
config = { wireguard_enabled = "true", persistent_keepalive = "25" }You can override configuration using environment variables:
| Variable | Description |
|---|---|
BBCTL_LOG_LEVEL |
Override log level |
BBCTL_CONFIG_DIR |
Use custom config directory |
BBCTL_DEFAULT_PROVIDER |
Override default provider |
BBCTL_DEFAULT_REGION |
Override default region |
Example:
export BBCTL_LOG_LEVEL=debug
export BBCTL_DEFAULT_PROVIDER=vyos-router
bbctl instances list # Will use debug logging and vyos-router as defaultConfigure resource limits by tenant:
[tenants.eng-team]
max_instances = 20
max_volumes = 40
max_networks = 5
max_cpu_total = 64
max_memory_total_gb = 256
regions = ["nyc", "sfo"]Define templates for quick provisioning:
[templates.web-server]
cpu = 2
memory_gb = 4
disk_gb = 80
image = "debian-11"
networks = ["app-network"]
[templates.db-server]
cpu = 4
memory_gb = 16
disk_gb = 200
volumes = [
{ name = "data", size_gb = 100, type = "ssd" },
{ name = "backup", size_gb = 200, type = "hdd" },
]Usage:
bbctl instances create web1 --template web-serverConfigure the API server component:
[api]
enabled = true
listen = "127.0.0.1"
port = 8080
auth_token = "YOUR_API_TOKEN"
cors_origins = ["http://localhost:3000"]Configure SSH keys for instance access:
[ssh]
default_key = "~/.ssh/id_ed25519"
additional_keys = ["~/.ssh/id_rsa", "~/.ssh/custom_key"]- Connection Problems: Check host, port, and credentials
- Permission Errors: Verify API key permissions and SSH key access
- File Format Errors: Validate TOML syntax in configuration files
# Show current configuration
bbctl config show
# Show redacted credentials
bbctl config show --section credentials --redact
# Validate configuration
bbctl config validateIf you need to reset your configuration:
# Reset specific section
bbctl config reset --section credentials
# Reset all configuration
bbctl config reset --all- Organize by Environment: Use naming conventions like
prod-,staging-prefixes - Document Custom Settings: Add comments to configuration files
- Version Control: Consider storing non-sensitive configuration in version control
- Regular Backups: Back up your configuration directory regularly
- Security: Never expose credentials in scripts or version control
- User Guide - Comprehensive usage instructions
- Command Reference - Detailed command documentation
- API Documentation - API schema and integration details