Overview
Thecloudstic init command bootstraps a new Cloudstic repository by creating encryption key slots and writing the repository configuration marker. This command must be run before your first backup.
Basic Usage
Encryption Modes
Password-Based Encryption (Recommended)
Platform Key Encryption
For automated workflows or platform-managed keys:With Recovery Key
Generate a 24-word BIP39 recovery phrase during initialization:Unencrypted Repository (Not Recommended)
Command Flags
Generate a 24-word BIP39 recovery key during initialization. The recovery phrase is displayed once and allows you to recover your repository if you lose your password or platform key.
Create an unencrypted repository. Not recommended unless you have a specific reason (e.g., data is pre-encrypted, testing, or compliance requirements).
Global Flags (All Commands)
Storage backend type. Options:
local, b2, s3, sftp.Local/SFTP directory path or B2/S3 bucket name where the repository will be created.
Key prefix for B2/S3 objects. Useful for organizing multiple repositories in the same bucket.
Platform key as 64 hexadecimal characters (32 bytes). Used for platform-managed encryption in automated environments.
Repository password for password-based encryption. If not provided and running interactively, you will be prompted.
AWS KMS key ARN for envelope encryption. Requires AWS credentials with KMS decrypt permissions.
Log detailed operations.
Suppress progress output (keeps final summary).
Log every store request with network call details, timing, and sizes.
S3-Specific Flags
S3-compatible endpoint URL (for MinIO, Cloudflare R2, DigitalOcean Spaces, etc.).
S3 region.
S3 access key ID.
S3 secret access key.
SFTP-Specific Flags
SFTP server hostname.
SFTP server port.
SFTP username.
SFTP password.
Path to SSH private key file for SFTP authentication.
Backblaze B2 Flags
B2 requires
B2_KEY_ID and B2_APP_KEY environment variables.Examples
Local Repository with Password
S3 Repository with Recovery Key
MinIO/S3-Compatible Storage
SFTP Repository
Backblaze B2
Behavior
Encryption Key Slots
When you initialize an encrypted repository, Cloudstic:- Generates a random 32-byte master key
- Wraps the master key with your password or platform key using strong KDF (scrypt for passwords)
- Stores the encrypted key slot(s) under
keys/in the repository - Derives an HMAC dedup key from the master key for content-addressing without exposing plaintext hashes
Adopting Existing Key Slots
If key slots already exist in the store (e.g., from a previous partial init),cloudstic init will verify you can unlock them with the provided credentials:
Repository Already Initialized
Runninginit on an already initialized repository exits immediately:
Troubleshooting
Error: encryption is required by default
Error: encryption password cannot be empty
-encryption-password flag.
Error: passwords do not match
Invalid —encryption-key
-encryption-key must be exactly 64 hexadecimal characters (0-9, a-f). Generate with:
Related Commands
- cloudstic backup — Create your first backup after initializing
- cloudstic key add-recovery — Add a recovery key to an existing repository
- cloudstic key passwd — Change the repository password
- cloudstic check — Verify repository integrity