Digital Life as Code (DLaC) - Rise from the ashes in under 10 minutes
"If my machine dies, I'm back to 100% productivity in under 10 minutes"
Just want to install FeNix? Run this ONE command:
curl -s https://raw.githubusercontent.com/nixfred/fenix.v1/main/bootstrap.sh | bashThat's it! The installer will guide you through everything else. β¨
After installation:
source ~/.bashrc # Activate FeNix
j proj # Jump to projects
neo # System info
edc # Container managementFor work machines (no system changes):
curl -s https://raw.githubusercontent.com/nixfred/fenix.v1/main/bootstrap.sh | bash -s -- --work-machineFor public repositories only (no SSH key setup):
curl -s https://raw.githubusercontent.com/nixfred/fenix.v1/main/bootstrap.sh | bash -s -- --public-onlyTHIS IS YOUR COMPLETE RUNBOOK - Everything you need to deploy, manage, and maintain the FeNix system. No external docs needed!
FeNix is your complete digital life as code. It's a Git-based Infrastructure-as-Code solution that can resurrect your entire development environment on any Linux machine in under 10 minutes. Unlike simple dotfile managers, FeNix manages your complete digital workspace including shell configurations, container environments, SSH keys, and multi-host synchronization.
Core Promise: "If my machine dies, I'm back to 100% productivity in under 10 minutes"
- π Dynamic Shell Environment - Portable configs that adapt to any system
- π³ Container Orchestration - Full Docker development environments
- π Multi-Host Synchronization - Seamless sync between multiple machines
- π‘οΈ Security Monitoring - SSH intrusion detection, system health tracking
- π§ͺ Chaos-Tested - Validated across 6 Linux distributions, 2 architectures
- β‘ Lightning Fast - Complete environment restoration in <10 minutes
curl -s https://raw.githubusercontent.com/nixfred/fenix.v1/main/bootstrap.sh | bashAdd FeNix environment to multiple machines, each keeps its identity
# On your laptop:
curl -s https://nixfred.dev/fenix | bash
# On your server:
curl -s https://nixfred.dev/fenix | bash
# Result: Same environment, different identities
laptop$ hostname # β laptop
server$ hostname # β server
both$ j proj # β jumps to projects (works everywhere!)Replace a machine completely - transfer your digital identity
# Migration from old-pi5 to new-pi5:
curl -s https://nixfred.dev/fenix | bash --migrate-from old-pi5
# Result: New machine becomes identical to old machine
new-pi5$ hostname # β pi5 (same as old machine)
new-pi5$ ssh ron # β works (same SSH keys)
new-pi5$ docker ps # β same containers restoredFeNix Repositories:
βββ fenix/ # π Master system (this repo)
βββ fenix-dotfiles/ # π Public shell configs
βββ fenix-private/ # π SSH keys & secrets
Local Structure:
~/.fenix/
βββ public/ # Public configurations
βββ private/ # Private configurations
βββ backups/ # System backups
βββ containers/ # Docker environments
No more hardcoded paths! FeNix automatically discovers:
- Tool locations (
edc, utilities) across/usr/local/bin,~/bin,~/.local/bin - Project directories (adapts to
~/projects,~/Projects,~/workspace,~/docker) - Container configurations (handles moves and renames gracefully)
- Auto-Discovery: Detects pi5 β ron hosts and configures sync
- Bidirectional Sync: Real-time file synchronization between machines
- Container Deployment: Orchestrates Docker environments across hosts
- SSH Tunneling: Smart SSH connections (
ppcommand auto-routes)
Built-in system health dashboard:
****************************************************
* Host: pi5 *
* Docker: 3 running / 8 total *
* Timeshift: 12 snapshots, 45GB free *
* Git Branch: fenix-dev *
* SSH Fails: None *
****************************************************
Revolutionary validation approach:
- Multi-Distro: Ubuntu, Debian, Fedora, Arch, Alpine, CentOS
- Cross-Architecture: ARM64 (Raspberry Pi) + x86_64 (laptops/servers)
- Chaos Engineering: Network failures, disk full, broken dependencies
- Performance Benchmarks: Target <10 minutes full deployment
Perfect for Raspberry Pi clusters and multi-host development:
# Deploy same environment to entire cluster:
for host in pi5 ron pi-cluster-1 pi-cluster-2; do
ssh $host "curl -s https://nixfred.dev/fenix | bash"
doneConsistent environments across all developers:
# Team onboarding - one command:
curl -s https://company.com/fenix-team-config | bashBusiness continuity for development workflows:
# Machine dies at 2 AM:
curl -s https://nixfred.dev/fenix | bash --migrate-from backup-config
# Back to productivity in 8 minutesReproducible computational environments:
# Students get identical research environment:
curl -s https://university.edu/research-fenix | bash| Feature | FeNix | Thoughtbot Laptop | Mathias Dotfiles | Holman Dotfiles |
|---|---|---|---|---|
| Multi-Host Sync | β | β | β | β |
| Container Orchestration | β | β | β | β |
| Cross-Architecture | β | β | β | β |
| Migration Mode | β | β | β | β |
| Chaos Testing | β | β | β | β |
| Dynamic Detection | β | β | β | β |
| Health Monitoring | β | β | β | β |
| Deployment Time | <10 min | ~30 min | ~20 min | ~15 min |
# Environment management
sb # Reload shell configuration
j proj # Jump to projects (auto-detected)
pp # Smart SSH (pi5 β ron, others β pi5)
# Container operations
edc # Interactive container menu (use 'c' to cancel)
edc 2 # Direct access to container #2
edc --help # Show edc help and usage
# System information
neo # System health check and info banner# Test FeNix on pristine container:
docker run -it ubuntu:22.04 /bin/bash
curl -s https://raw.githubusercontent.com/nixfred/fenix/main/bootstrap.sh | bash
# Chaos engineering:
./testing/chaos-engineering.sh --scenario network_failure- SSH Key Management: Secure backup and restoration of SSH keys
- Multi-Factor Backup: Git repos + Timeshift + encrypted archives
- Intrusion Detection: SSH failure monitoring and alerting
- Container Isolation: Development environments in isolated containers
- β Dynamic shell environment with path detection
- β Multi-host synchronization (pi5 β ron)
- β Container orchestration and management
- β FeNix Testing Labs validation
- π Machine learning for usage pattern optimization
- π Auto-configuration based on detected hardware/OS
- π Predictive resource management
- π Smart conflict resolution for multi-host sync
Multi-Host Infrastructure
- β Seamless pi5 β ron synchronization
- β Smart SSH routing with pp command
- β Cross-architecture support (ARM64 + x86_64)
Container Management
- β Ubuntu container start/destroy commands
- β Interactive container access with edc
- β Container-safe bootstrap (works inside containers)
Dynamic Configuration
- β Self-adapting .bashrc with intelligent path detection
- β 40+ development tools in container environments
- β Enhanced shell with productivity aliases and functions
System Integration
- β System health monitoring and dashboard
- β Timeshift snapshot management
- β SSH security monitoring
- β Git-based configuration management
- Simplicity: One command should do everything
- Reliability: Must work 99.9% of the time
- Portability: Any Linux, any architecture
- Speed: <10 minutes for complete restoration
- Security: Defense in depth, no secret leakage
- Test First: Use FeNix Testing Labs before deploying
- Document Changes: Update CLAUDE.md files for AI assistants
- Maintain Portability: No hardcoded paths, dynamic detection only
- Security Review: Ensure no secrets in public repos
- Multi-Host Validation: Test on both ARM64 and x86_64
- Fork the repository and create feature branches
- All changes must pass the FeNix Testing Lab validation
- Update documentation for any new features
- Follow the existing code style and conventions
- Add tests for new functionality
FeNix represents the evolution from configuration management to complete Digital Life as Code (DLaC). Every component is designed for:
- π― Ultimate Reliability - Battle-tested across distributions and architectures
- π Maximum Portability - Works anywhere Linux runs
- β‘ Rapid Recovery - Minutes, not hours, to full productivity
- π Security First - Multi-layered backup and intrusion detection
- π§ Intelligence - Learns and adapts to your usage patterns
Rise from the ashes, stronger than before. π₯
MIT License - see LICENSE for details.
Inspired by the mythological Phoenix and the principle that great systems should be able to resurrect themselves from nothing but their own descriptions.
Special thanks to the open-source community for the tools that make FeNix possible.
π Main Workstation (ron)
- Your primary machine where you do most work
- Always has hostname "ron"
- Other machines connect TO this one
- Stores master copies of projects and data
- Runs primary containers and services
π₯οΈ Remote Environment (pi5, laptop, work-desktop)
- Satellite machines for remote work
- Keep their original hostnames
- Synchronized environment that connects back to ron
- Lightweight setup, syncs data from main workstation
GitHub Repositories:
βββ nixfred/fenix # π PUBLIC - Master system, bootstrap scripts
βββ nixfred/fenix-dotfiles # π PUBLIC - Shell configs, aliases, functions
βββ nixfred/fenix-private # π PRIVATE - SSH keys, secrets, host configs
Local Structure:
~/.fenix/
βββ public/ # Public configurations
βββ private/ # Private configurations (SSH keys, secrets)
βββ dotfiles/ # Shell environment files
βββ backups/ # System backups
IMPORTANT: FeNix uses the SAME SSH keys on ALL machines for seamless operation.
- Seamless Connection: Any machine can SSH to any other machine
- Git Access: Same GitHub/GitLab access from all machines
- Container Deployment: Deploy containers across hosts without re-authentication
- Simplified Management: One key pair to manage instead of multiple
~/.ssh/
βββ id_rsa # SAME private key on all machines
βββ id_rsa.pub # SAME public key on all machines
βββ config # SSH client configuration
βββ known_hosts # Trusted hosts (grows as you connect)- Private repo only: SSH keys never stored in public repositories
- Proper permissions: 600 for private keys, 644 for public keys
- Backup strategy: Keys stored in encrypted private Git repository
- Key rotation: Change keys periodically, update all machines via FeNix
# On any fresh Linux machine:
curl -s https://raw.githubusercontent.com/nixfred/fenix/main/bootstrap.sh | bash
# Follow the prompts:
# 1) Choose machine type (main workstation or remote environment)
# 2) Configure SSH keys
# 3) Let FeNix install everything# Reload shell configuration
sb
# Jump to projects (auto-detected directory)
j proj
# SSH to other host (smart routing)
pp
# Container access
edc # Interactive menu
edc 2 # Direct access to container #2
# Sync operations
# fenix sync # Sync changes across hosts
# fenix backup # Create system backup
neo # System health checkBefore running anything, decide:
- Main Workstation Replacement? β Will this become the new "ron"?
- Remote Environment? β Will this be a satellite machine?
# On the new machine:
curl -s https://raw.githubusercontent.com/nixfred/fenix/main/bootstrap.sh | bashFor Remote Environment (pi5-style):
# Bootstrap will ask:
"What type of machine is this? [1-3]: "
# Choose: 2) Remote Environment (pi5-style) - Synchronized work environment
# Results:
β
Keeps current hostname (laptop, pi-work, etc.)
β
Installs same SSH keys for seamless connection
β
Gets "gohome" alias to connect back to ron
β
Syncs environment but maintains separate identity
β
Lightweight configuration focused on connecting back to mainFor Main Workstation Replacement:
# Bootstrap will ask:
"What type of machine is this? [1-3]: "
# Choose: 1) Main Workstation (ron replacement) - Full digital life transfer
# Results:
β
Changes hostname to "ron" (after reboot)
β
Installs complete SSH key set with full permissions
β
Gets management aliases (checkremotes, deployeverywhere)
β
Becomes the center that other machines connect to
β
Restores complete container environments and data# Reload shell to activate new configuration
source ~/.bashrc
# Test the installation
j proj # Should jump to projects directory
edc # Should show container menu (if Docker available)
pp # Should connect to appropriate host
# For remote environments, test connection to main:
gohome # Should SSH to ron# Test SSH connections between machines
ssh ron # From remote to main
ssh pi5 # From main to remote (if pi5 exists)
ssh laptop # To any other configured machine
# If SSH fails, check:
ssh-keygen -l -f ~/.ssh/id_rsa # Verify key is installed
cat ~/.ssh/id_rsa.pub # Check public key content- Main workstation (ron) hardware fails
- Upgrading to new primary machine
- Consolidating workstations
# On the NEW machine that will become ron:
curl -s https://raw.githubusercontent.com/nixfred/fenix/main/bootstrap.sh | bash# During bootstrap, choose:
"What type of machine is this? [1-3]: "
# Answer: 1) Main Workstation (ron replacement) - Full digital life transferThe bootstrap will automatically:
β
Change hostname to "ron" (requires reboot to take effect)
β
Install complete SSH keys with full permissions
β
Restore all dotfiles and configurations
β
Set up container environments
β
Configure as primary machine for remote connections
β
Install management aliases and functions# Reboot to activate hostname change
sudo reboot
# After reboot, verify:
hostname # Should show "ron"
ssh pi5 # Should connect to remote machines
docker ps # Should show restored containers
j proj # Should jump to projects directory# On each remote machine (pi5, laptop, etc.), update known_hosts:
ssh-keygen -R ron # Remove old ron key
ssh ron # Connect and accept new host key
# Or simply:
ssh-keyscan ron >> ~/.ssh/known_hosts# On old ron machine (if accessible):
# 1. Final data sync to new ron
rsync -av ~/projects/ new-ron:~/projects/
# 2. Final backup
fenix backup
# 3. Secure wipe (optional)
sudo shred -vfz -n 3 ~/.ssh/id_rsa# Keys are managed through FeNix private repository
# During bootstrap, you'll choose:
# Option 1: Generate new keys
# - FeNix creates new SSH key pair
# - You add public key to GitHub/GitLab
# - Private key stored in fenix-private repo
# Option 2: Import existing keys
# - Paste your existing private key
# - Paste your existing public key
# - FeNix installs them everywhere
# Option 3: GitHub import
# - Import public key from GitHub profile
# - You provide private key manually# FeNix automatically:
1. Stores keys in ~/.ssh/ with correct permissions
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
2. Updates SSH config for multi-host access
3. Adds known hosts for trusted connections
4. Tests GitHub/GitLab connectivity
5. Enables seamless machine-to-machine SSH# Backup verification
ls -la ~/.ssh/ # Check permissions
ssh-keygen -l -f ~/.ssh/id_rsa # Verify key fingerprint
ssh -T git@github.com # Test GitHub access
# Key rotation (annually recommended)
ssh-keygen -t rsa -b 4096 -C "your-email@domain.com"
# Then update fenix-private repo and redeploy to all machines# Interactive container menu
edc
# Direct container access
edc 1 # Connect to first container
edc 2 # Connect to second container
# Container status across hosts
fenix container-status # Check containers on all hosts
# Deploy containers everywhere
fenix deploy-containers # Deploy to main + all remotes# From main workstation (ron):
docker-compose up -d # Start containers locally
ssh pi5 "cd ~/projects && docker-compose up -d" # Start on remote
# Or use FeNix automation:
deployeverywhere # Alias that deploys to all configured hosts# From main workstation:
synctoremotes # Push projects to all remote machines
# From remote environment:
syncfromhome # Pull latest projects from ron# Create system backup
fenix backup # Creates timestamped backup
# System health check
fenix status # Shows system health across all hosts
neo # Detailed system information banner# Your configurations are in Git - sync anytime:
cd ~/.fenix/dotfiles
git pull origin main # Get latest configs
cd ~/.fenix/private
git pull origin main # Get latest private configs
# Push your changes:
bashup # Pushes dotfiles to GitHub automatically# Test FeNix on pristine container before deploying:
docker run -it ubuntu:22.04 /bin/bash
# Inside container:
curl -s https://raw.githubusercontent.com/nixfred/fenix/main/bootstrap.sh | bash# Check all components after installation:
which edc # Should find edc command
j proj && pwd # Should jump to projects directory
ssh -T git@github.com # Should authenticate with GitHub
docker ps # Should show containers (if Docker installed)# Target metrics for FeNix installation:
# - Fresh machine to full productivity: <10 minutes
# - Bootstrap Phase 1 (public setup): <3 minutes
# - SSH key configuration: <2 minutes
# - Private configuration install: <3 minutes
# - Container environment setup: <2 minutesSSH Connection Fails
# Check SSH key installation
ls -la ~/.ssh/id_rsa # Should exist with 600 permissions
ssh-keygen -l -f ~/.ssh/id_rsa # Check key fingerprint
# Test GitHub connection
ssh -T git@github.com # Should show authentication success
# Regenerate known_hosts
rm ~/.ssh/known_hosts
ssh ron # Reconnect and accept host keyBootstrap Fails
# Check internet connectivity
ping google.com
# Check GitHub access
curl -I https://github.com
# Check repository access
git clone https://github.com/nixfred/fenix.git /tmp/test-cloneHostname Change Doesn't Work
# Manually change hostname (requires sudo)
sudo hostnamectl set-hostname ron
sudo sed -i 's/old-hostname/ron/g' /etc/hosts
sudo rebootDynamic Path Detection Fails
# Check if paths exist
ls -la /usr/local/bin/edc # Check edc location
ls -la ~/projects # Check projects directory
# Manually set paths
export PATH="$PATH:$HOME/bin"
source ~/.bashrc# Edit machine-specific configs in private repo:
cd ~/.fenix/private
# For main workstation additions:
vim configs/main/.bashrc_main
# For remote environment additions:
vim configs/remote/.bashrc_remote
# Push changes:
git add . && git commit -m "Update machine configs" && git push# Check status of all machines from ron:
checkremotes # Shows uptime and containers on all remotes
# Deploy same container to all hosts:
deployeverywhere # Runs docker-compose on all configured machines
# Sync data to all remotes:
synctoremotes # Pushes ~/projects to all remote machines# Add custom aliases (survives FeNix updates):
echo 'alias myalias="command"' >> ~/.bash_aliases_local
# Add custom functions:
vim ~/.functions_local
# These files are preserved during FeNix updates- Single key pair: Same keys on all machines for seamless operation
- Private storage: Keys only in encrypted private Git repository
- Proper permissions: Automatic permission setting (600/644)
- Regular rotation: Change keys annually, update via FeNix
- Public repos: Only sanitized configurations, no secrets
- Private repos: SSH keys, API keys, passwords - proper access control
- Git encryption: All data encrypted in transit via HTTPS/SSH
- VPN recommended: Use Tailscale or similar for secure remote access
- SSH hardening: Disable password auth, use key-based only
- Firewall: Configure appropriate firewall rules on main workstation
# Weekly:
fenix status # Check system health
bashup # Sync any configuration changes
# Monthly:
fenix backup # Create full system backup
sudo apt update && sudo apt upgrade # Update system packages
# Annually:
# Rotate SSH keys via FeNix bootstrap
# Review and clean up old containers
# Update container base images# Update FeNix master system:
cd ~/.fenix/public
git pull origin main
# Update your configurations:
cd ~/.fenix/dotfiles
git pull origin main
# Update private configurations:
cd ~/.fenix/private
git pull origin main
# Reinstall if major updates:
curl -s https://raw.githubusercontent.com/nixfred/fenix/main/bootstrap.sh | bash- This Complete Runbook: Right here in this README
- Local CLAUDE.md:
/home/pi/fenix/CLAUDE.md(AI assistant instructions) - GitHub Issues: https://github.com/nixfred/fenix/issues
# System health check
fenix status
# Configuration verification
source ~/.bashrc && echo "Shell config OK"
# SSH connectivity test
ssh -T git@github.com
# Container status
docker ps --format "table {{.Names}}\t{{.Status}}"# Emergency: Restore from backup
fenix restore
# Emergency: Fresh FeNix installation
curl -s https://raw.githubusercontent.com/nixfred/fenix/main/bootstrap.sh | bash
# Emergency: Manual SSH key restoration
# (Keep a copy of your private key in secure location outside of FeNix)- Same SSH keys everywhere - This is what makes FeNix seamless
- Ron is always the center - Main workstation, others connect to it
- Git is your backup - Everything important is in Git repositories
- Test before deploying - Use containers to validate changes
- One command resurrection - Complete environment in <10 minutes
FeNix Philosophy: Your entire digital life should be reproducible from a single command. No exceptions, no manual steps, no "I forgot how to set that up."
π₯ Rise from the ashes, stronger than before. π₯