User Configuration¶
This page documents every user-facing BorgBoi configuration field, its default, and its allowed values.
Where Configuration Comes From¶
BorgBoi loads configuration from:
- Defaults defined in code
~/.borgboi/config.yaml(orBORGBOI_HOME/.borgboi/config.yaml)BORGBOI_*environment variable overrides- CLI flags for
--offlineand--debug(for command execution)
TUI uses the same effective config
bb tui reads the same merged configuration as the CLI. The config sidebar renders the effective values, and the excludes editor resolves file locations from the active BorgBoi home directory (for example ~/.borgboi/excludes.txt and ~/.borgboi/{repo-name}_excludes.txt).
Config file location
BorgBoi resolves the home directory in this order:
BORGBOI_HOMESUDO_USERhome directory (when running undersudo)- Current user home (
Path.home())
Then it uses <resolved-home>/.borgboi/config.yaml.
Default config.yaml¶
aws:
dynamodb_repos_table: bb-repos
dynamodb_archives_table: bb-archives
s3_bucket: bb-backups
region: us-west-1
borg:
executable_path: borg
default_repo_path: ~/.borgboi/repositories
compression: zstd,6
checkpoint_interval: 900
storage_quota: 100G
additional_free_space: 2G
retention:
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
keep_yearly: 0
ui:
theme: catppuccin
show_progress: true
color_output: true
table_style: rounded
logging:
enabled: false
level: info
max_bytes: 10485760
backup_count: 5
telemetry:
enabled: false
service_name: borgboi
trace_endpoint: null
export_logs: false
logs_endpoint: null
capture_tui: true
offline: false
debug: false
Load Flow With Environment Variables¶
flowchart TD
A[Start get_config] --> B[Resolve home directory]
B --> C{BORGBOI_HOME set?}
C -- Yes --> D[Use BORGBOI_HOME]
C -- No --> E{SUDO_USER set and home exists?}
E -- Yes --> F[Use sudo user's home]
E -- No --> G[Use current user home]
D --> H[Compute config path]
F --> H
G --> H
H --> I{config.yaml exists?}
I -- No --> J[Write default config.yaml]
I -- Yes --> K[Read YAML data]
J --> K
K --> L[Apply BORGBOI_* overrides]
L --> M[Validate with Pydantic model]
M --> N[Optional warning checks]
N --> O[Return effective Config]
sequenceDiagram
participant CLI as CLI Command
participant CFG as get_config()
participant YAML as config.yaml
participant ENV as Environment
CLI->>CFG: load config
CFG->>YAML: read YAML (or create defaults)
YAML-->>CFG: raw config dict
loop for each known config path
CFG->>ENV: read mapped BORGBOI_* variable
alt env var is set
ENV-->>CFG: string value
CFG->>CFG: coerce bool/int when applicable
CFG->>CFG: overwrite matching config path
else env var not set
ENV-->>CFG: None
end
end
CFG-->>CLI: final merged config
Allowed Values By Field¶
Top-Level Fields¶
| Key | Type | Default | Allowed Values | Notes |
|---|---|---|---|---|
offline |
boolean | false |
true or false |
When true, skips AWS usage and uses local metadata storage. |
debug |
boolean | false |
true or false |
Enables debug mode in CLI context. |
logging Section¶
| Key | Type | Default | Allowed Values | Notes |
|---|---|---|---|---|
logging.enabled |
boolean | false |
true or false |
When true, writes local JSON logs to timestamped files like ~/.borgboi/logs/borgboi_2026-03-28T19_13_27.log. |
logging.level |
string | info |
debug, info, warning, error, critical |
Minimum file log level when top-level debug is false; values are case-insensitive. |
logging.max_bytes |
integer | 10485760 |
Integer >= 0 |
Maximum size in bytes of the active timestamped log file before rollover; 0 disables size-based rotation. |
logging.backup_count |
integer | 5 |
Integer >= 0 |
Number of historical timestamped log sessions to retain alongside the active file; size-based rollovers for pruned sessions are removed with them. |
Debug mode and logging
If top-level debug is enabled, BorgBoi promotes file logging to DEBUG regardless of logging.level.
aws Section¶
| Key | Type | Default | Allowed Values | Notes |
|---|---|---|---|---|
aws.dynamodb_repos_table |
string | bb-repos |
Any string | Should be a valid DynamoDB table name you can access. |
aws.dynamodb_archives_table |
string | bb-archives |
Any string | Should be a valid DynamoDB table name you can access. |
aws.s3_bucket |
string | bb-backups |
Any string | Should be a valid S3 bucket name you can access. |
aws.region |
string | us-west-1 |
Any string | Typically an AWS region like us-east-1, eu-west-1, etc. |
aws.profile |
string or null |
null |
Any string or null |
Optional AWS profile name. |
telemetry Section¶
| Key | Type | Default | Allowed Values | Notes |
|---|---|---|---|---|
telemetry.enabled |
boolean | false |
true or false |
Enables OpenTelemetry tracing for CLI and TUI execution paths. |
telemetry.service_name |
string | borgboi |
Any string | Default OpenTelemetry service.name when OTEL_SERVICE_NAME is not set. |
telemetry.trace_endpoint |
string or null |
null |
Any URL or null |
Optional override for the OTLP trace exporter endpoint. Set this when traces should go somewhere other than the default OTEL_EXPORTER_OTLP_ENDPOINT. |
telemetry.export_logs |
boolean | false |
true or false |
Adds an OTLP log export pipeline so application logs can be routed to Loki. |
telemetry.logs_endpoint |
string or null |
null |
Any URL or null |
Optional override for the OTLP log exporter endpoint. Set to Loki's native OTLP logs URL (e.g. http://loki:3100/otlp/v1/logs) to send logs directly to Loki while traces continue to use the default OTEL_EXPORTER_OTLP_ENDPOINT. |
telemetry.capture_tui |
boolean | true |
true or false |
When telemetry is enabled, traces the TUI session and background workers. |
borg Section¶
| Key | Type | Default | Allowed Values | Notes |
|---|---|---|---|---|
borg.executable_path |
string | borg |
Any string | Command/path used to invoke Borg. Must be executable and in PATH unless absolute path is provided. |
borg.default_repo_path |
path string | ~/.borgboi/repositories |
Any valid path | Base directory where repos are created by default. |
borg.compression |
string | zstd,6 |
none, lz4, zstd, zlib, lzma, optionally with level like algorithm,N |
Compression algorithm is validated against the listed algorithms. If level is provided, N should be an integer 0-22. |
borg.checkpoint_interval |
integer | 900 |
Any integer | Warning is emitted when value is negative. Units are seconds. |
borg.storage_quota |
string | 100G |
Any string | Recommended format is Borg size style like 500M, 100G, 2T; invalid-looking formats may trigger warnings. |
borg.additional_free_space |
string | 2G |
Any string | Free-space buffer passed to Borg operations that support it. |
borg.borg_passphrase |
string or null |
null |
Any string or null |
Default passphrase for existing repos when no higher-priority source is present. |
borg.borg_new_passphrase |
string or null |
null |
Any string or null |
Passphrase for new repo initialization when no higher-priority source is present. |
borg.retention subsection¶
| Key | Type | Default | Allowed Values | Notes |
|---|---|---|---|---|
borg.retention.keep_daily |
integer | 7 |
Integer >= 0 |
Number of daily archives to keep. |
borg.retention.keep_weekly |
integer | 4 |
Integer >= 0 |
Number of weekly archives to keep. |
borg.retention.keep_monthly |
integer | 6 |
Integer >= 0 |
Number of monthly archives to keep. |
borg.retention.keep_yearly |
integer | 0 |
Integer >= 0 |
Number of yearly archives to keep. |
Retention edge case
If all retention values are 0, BorgBoi warns that archives may accumulate indefinitely.
ui Section¶
| Key | Type | Default | Allowed Values | Notes |
|---|---|---|---|---|
ui.theme |
string | catppuccin |
Any string | Stored in config, but currently not strongly validated at load time. |
ui.show_progress |
boolean | true |
true or false |
Controls whether progress output is shown in relevant operations. |
ui.color_output |
boolean | true |
true or false |
Controls colorized CLI output behavior in supported contexts. |
ui.table_style |
string | rounded |
Any string | Stored in config; currently not strongly validated at load time. |
Environment Variables¶
Use BORGBOI_ variables to override config file values at runtime.
Home/Config Location¶
| Environment Variable | Purpose |
|---|---|
BORGBOI_HOME |
Overrides the home directory used to resolve .borgboi paths (including config.yaml). |
Field Override Variables¶
| Environment Variable | Config Path |
|---|---|
BORGBOI_OFFLINE |
offline |
BORGBOI_DEBUG |
debug |
BORGBOI_LOGGING__ENABLED |
logging.enabled |
BORGBOI_LOGGING__LEVEL |
logging.level |
BORGBOI_LOGGING__MAX_BYTES |
logging.max_bytes |
BORGBOI_LOGGING__BACKUP_COUNT |
logging.backup_count |
BORGBOI_TELEMETRY__ENABLED |
telemetry.enabled |
BORGBOI_TELEMETRY__SERVICE_NAME |
telemetry.service_name |
BORGBOI_TELEMETRY__TRACE_ENDPOINT |
telemetry.trace_endpoint |
BORGBOI_TELEMETRY__EXPORT_LOGS |
telemetry.export_logs |
BORGBOI_TELEMETRY__LOGS_ENDPOINT |
telemetry.logs_endpoint |
BORGBOI_TELEMETRY__CAPTURE_TUI |
telemetry.capture_tui |
BORGBOI_AWS__DYNAMODB_REPOS_TABLE |
aws.dynamodb_repos_table |
BORGBOI_AWS__DYNAMODB_ARCHIVES_TABLE |
aws.dynamodb_archives_table |
BORGBOI_AWS__S3_BUCKET |
aws.s3_bucket |
BORGBOI_AWS__REGION |
aws.region |
BORGBOI_AWS__PROFILE |
aws.profile |
BORGBOI_BORG__EXECUTABLE_PATH |
borg.executable_path |
BORGBOI_BORG__DEFAULT_REPO_PATH |
borg.default_repo_path |
BORGBOI_BORG__COMPRESSION |
borg.compression |
BORGBOI_BORG__CHECKPOINT_INTERVAL |
borg.checkpoint_interval |
BORGBOI_BORG__STORAGE_QUOTA |
borg.storage_quota |
BORGBOI_BORG__ADDITIONAL_FREE_SPACE |
borg.additional_free_space |
BORGBOI_BORG__BORG_PASSPHRASE |
borg.borg_passphrase |
BORGBOI_BORG__BORG_NEW_PASSPHRASE |
borg.borg_new_passphrase |
BORGBOI_BORG__RETENTION__KEEP_DAILY |
borg.retention.keep_daily |
BORGBOI_BORG__RETENTION__KEEP_WEEKLY |
borg.retention.keep_weekly |
BORGBOI_BORG__RETENTION__KEEP_MONTHLY |
borg.retention.keep_monthly |
BORGBOI_BORG__RETENTION__KEEP_YEARLY |
borg.retention.keep_yearly |
BORGBOI_UI__THEME |
ui.theme |
BORGBOI_UI__SHOW_PROGRESS |
ui.show_progress |
BORGBOI_UI__COLOR_OUTPUT |
ui.color_output |
BORGBOI_UI__TABLE_STYLE |
ui.table_style |
Environment Variable Coercion Rules¶
When overrides are read from environment variables:
- Boolean values are parsed from:
true,1,yes,false,0,no(case-insensitive). - Integer parsing is applied to:
borg.checkpoint_intervalborg.retention.keep_dailyborg.retention.keep_weeklyborg.retention.keep_monthlyborg.retention.keep_yearlylogging.max_byteslogging.backup_count- All other values remain strings.
Effective-Config Examples¶
# Override only offline mode and bucket for this shell
export BORGBOI_OFFLINE=1
export BORGBOI_AWS__S3_BUCKET=my-team-bucket
bb config show --format tree
# One-off command-level override (without exporting)
BORGBOI_BORG__COMPRESSION=zstd,9 bb backup daily --name my-docs-backup
Validation and Warnings¶
BorgBoi validates the final merged config and may warn (without failing) for:
- Missing Borg executable in
PATH - Invalid compression algorithm
- Negative retention values
- Negative checkpoint interval
- Missing required AWS fields while not in offline mode
Use this command to inspect the effective final values, including env-var sourced values: