Prerequisites
Before installing the dotfiles system, ensure your environment meets the following requirements:System Requirements
Operating System
- Ubuntu 20.04 LTS or later
- Debian-based distributions
- Windows Subsystem for Linux (WSL2)
User Permissions
- Non-root user account
- Sudo access for package installation
Required Accounts
You’ll need a Bitwarden account with:
- An active vault
- SSH private keys stored as Secure Notes (optional but recommended)
- AWS credentials stored in custom fields (if using AWS)
- Age encryption key stored as a Secure Note named
chezmoi-age-key(will be created automatically if missing)
Network Requirements
- Internet connection for downloading packages
- Access to GitHub for cloning your dotfiles repository
- Access to Bitwarden servers for authentication
Installation Methods
Method 1: Automated Bootstrap (Recommended)
The fastest way to get started is using the automated bootstrap script.Complete Bitwarden authentication
When prompted, enter your Bitwarden credentials:
- Email address
- Master password
- Two-factor authentication code (if enabled)
Method 2: Manual Installation
For more control over the installation process, you can install components manually.Install base dependencies
curl: Download files from URLsgit: Version control for dotfiles repositoryage: Modern file encryptiongnupg: GPG key managementsoftware-properties-common: Manage PPAssnapd: Snap package manager
Install chezmoi
Option A: Via Snap (Recommended)Option B: Via install scriptAdd to your PATH permanently:Verify installation:
Authenticate with Bitwarden
The
BW_SESSION environment variable keeps your vault unlocked for the current terminal session.Initialize chezmoi with your dotfiles
- Your Name: Full name for Git commits
- Machine type: personal, work, or hybrid
- Operating System: linux (default)
- Default Editor: code, vim, nano, etc.
- Personal Email: (if personal or hybrid machine)
- Work Email: (if work or hybrid machine)
Platform-Specific Instructions
Ubuntu / Debian
The standard installation process works on all Debian-based distributions. No special configuration needed.Windows Subsystem for Linux (WSL)
WSL-Specific Tips:
- GNOME desktop settings won’t apply in WSL (requires a desktop environment)
- Use the Windows version of VS Code with the WSL extension for best experience
- Git credentials can be shared with Windows using Git Credential Manager
Bootstrap Script Breakdown
Here’s what thebootstrap.sh script does step-by-step:
bootstrap.sh
Verification
After installation, verify all components are working correctly:Troubleshooting
Bootstrap script fails with 'command not found'
Bootstrap script fails with 'command not found'
Cause: Snap binaries not in PATH immediately after installation.Solution: Log out and log back in, or run:
Bitwarden login fails
Bitwarden login fails
Cause: Network issues or incorrect credentials.Solution:
- Check internet connection
- Verify email and master password
- If using self-hosted:
bw config server https://your-server.com - Check 2FA codes are current
Age key has wrong permissions
Age key has wrong permissions
Cause: File created with incorrect umask.Solution:
chezmoi init fails to decrypt files
chezmoi init fails to decrypt files
Cause: Wrong age key or missing key.Solution:
- Verify key file exists:
cat ~/.config/chezmoi/key.txt - Retrieve from Bitwarden:
bw get notes "chezmoi-age-key" - Check key matches the public key in
.chezmoi.toml.tmpl
Ansible playbook fails
Ansible playbook fails
Cause: Missing dependencies or permissions.Solution:
Next Steps
Configuration
Customize your dotfiles and add new packages
Secrets Management
Learn how to manage SSH keys and credentials
Testing
Run integration tests to verify your setup
Shell Aliases
Common workflows for managing your dotfiles