This guide covers configuration options for data volume encryption with cryptpilot-crypt.
The default configuration directory is /etc/cryptpilot/volumes/:
- Each
.tomlfile defines one encrypted volume - File names can be arbitrary (e.g.,
data0.toml,backup.toml) - Files must have
.tomlextension
In cryptpilot-crypt, a "volume" refers to any Linux block device (e.g., /dev/nvme1n1p1) that needs encryption. cryptpilot-crypt can initialize and manage encrypted volumes for storing confidential data.
Main operations:
- Initialize (
init): Format the device as an encrypted LUKS2 volume (erases existing data) - Open (
open): Decrypt the volume and create/dev/mapper/<volume-name>device mapper - Close (
close): Lock the volume and remove device mapper
Place volume configuration files in /etc/cryptpilot/volumes/:
Example: /etc/cryptpilot/volumes/data0.toml
Reference template: otp.toml.template
# The name of the resulting volume with decrypted data
volume = "data0"
# The path to the underlying encrypted device
dev = "/dev/nvme1n1p1"
# Whether to auto-open during boot (default: false)
auto_open = true
# File system to create during initialization
# Allowed values: "swap", "ext4", "xfs", "vfat"
# Skipped if device already has data
makefs = "ext4"
# Enable data integrity protection (default: false)
integrity = true
# Key provider configuration
[encrypt.otp]Field descriptions:
volume(required): Volume name used in/dev/mapper/<volume>dev(required): Path to the underlying block deviceauto_open(optional, default:false): Auto-decrypt during boot via systemdmakefs(optional): File system type to create during initialization- Supported:
"swap","ext4","xfs","vfat" - Skipped if device already contains data
- Supported:
integrity(optional, default:false): Enable dm-integrity for data authentication- Verifies data on every read
- Prevents tampering (but not replay attacks)
encrypt(required): Key provider configuration (see Key Providers)
To automatically decrypt and open volumes during system startup:
- Set
auto_open = truein volume configuration - Enable the systemd service:
systemctl enable --now cryptpilot.serviceThe service will automatically open all volumes with auto_open = true.
See Systemd Service for detailed information about the auto-open service.
volume = "swap0"
dev = "/dev/nvme1n1p1"
auto_open = true
makefs = "swap"
[encrypt.otp]Then add to /etc/fstab:
/dev/mapper/swap0 none swap defaults 0 0
volume = "data0"
dev = "/dev/nvme1n1p2"
auto_open = true
makefs = "ext4"
integrity = true
[encrypt.kbs]
url = "https://kbs.example.com"
resource_path = "/secrets/data0-key"Then add to /etc/fstab:
/dev/mapper/data0 /mnt/data0 ext4 defaults 0 2
volume = "backup"
dev = "/dev/nvme1n1p3"
auto_open = false # Manual open only
makefs = "xfs"
[encrypt.kms]
kms_instance_id = "kst-****"
client_key_id = "LTAI****"
client_key_password_from_kms = "alias/ClientKey_****"Open manually when needed:
cryptpilot-crypt open backup
mount /dev/mapper/backup /mnt/backupCheck configuration validity:
cryptpilot-crypt config check --keep-checkingOptions:
--keep-checking: Continue checking all volumes even if errors found--skip-check-passphrase: Skip passphrase validation (faster, less thorough)
- Key Providers - Detailed key provider configuration
- Systemd Service - Auto-open volumes at boot
- Development Guide - Build and test instructions
- Main README - Quick start and usage examples