⚡ Need to set up your Fly.io environment first? Use our automated setup script:
./scripts/vm-setup.sh --app-name my-sindri-dev. See the Quick Start Guide for details.
This guide covers the common setup steps for connecting any IDE to your Fly.io-hosted Sindri development environment. For IDE-specific instructions, see:
- VS Code Setup - Visual Studio Code with Remote-SSH
- IntelliJ Setup - JetBrains IDEs with Gateway
Before setting up any IDE connection, ensure you have:
- ✅ Your Fly.io Sindri development environment deployed
- ✅ SSH key pair created and configured with Fly.io
- ✅ VM is running (check with
flyctl status -a your-app-name)
If you haven't set up your Fly.io environment yet:
# Clone the repository
git clone https://github.com/pacphi/sindri.git
cd sindri
# Run automated setup
./scripts/vm-setup.sh --app-name my-sindri-dev --region sjcThe script will handle all the Fly.io configuration and provide connection details.
Create or edit your SSH config file at ~/.ssh/config:
# Replace 'my-sindri-dev' with your actual app name
Host sindri-dev
HostName my-sindri-dev.fly.dev
Port 10022
User developer
IdentityFile ~/.ssh/id_rsa
ServerAliveInterval 60
ServerAliveCountMax 3
StrictHostKeyChecking accept-new
LogLevel ERROR
Compression yes
# Optional: Add a shorter alias
Host dev
HostName my-sindri-dev.fly.dev
Port 10022
User developer
IdentityFile ~/.ssh/id_rsa
ServerAliveInterval 60
ServerAliveCountMax 3Before connecting any IDE, test the SSH connection:
ssh sindri-devYou should connect successfully and see the welcome message from your VM.
Important: On your first connection to the VM, run the configuration script:
-
Connect to your VM (SSH directly or through IDE terminal)
-
Run the configuration script:
/workspace/scripts/vm-configure.sh
-
Follow the prompts to:
- Install Node.js, Claude Code, and Claude Flow
- Configure Git settings (name and email)
- Set up workspace directory structure
- Optionally install additional development tools
- Optionally create project templates
-
Wait for completion - this only needs to be done once per VM
After configuration, your workspace will be organized as:
/workspace/
├── projects/
│ ├── active/ # Current projects
│ └── archive/ # Completed projects
├── scripts/ # Utility scripts
├── templates/ # Project templates
└── .config/ # Configuration files
For comprehensive troubleshooting including SSH issues, VM management, and performance optimization, see our dedicated Troubleshooting Guide.
Quick Debug Commands:
# Test connection with verbose output
ssh -vvv developer@your-app-name.fly.dev -p 10022
# If host key verification fails after VM recreation:
ssh-keygen -R "[your-app-name.fly.dev]:10022"Common Solutions:
- Check if VM is running:
flyctl status -a your-app-name - Start VM if stopped:
flyctl machine start <machine-id> -a your-app-name - Verify SSH key permissions:
chmod 600 ~/.ssh/id_rsa
VM Not Responding:
# Check VM status
flyctl status -a your-app-name
# Restart VM if needed
flyctl machine restart <machine-id> -a your-app-name
# Check VM logs
flyctl logs -a your-app-nameWork in the persistent /workspace directory:
# Navigate to active projects
cd /workspace/projects/active
# Create new project
mkdir my-project
cd my-project
# Initialize based on project type
npm init -y # Node.js
python3 -m venv venv # Python
mvn archetype:generate # Java/Maven-
Run Claude Code from Terminal:
cd /workspace/projects/active/your-project claude -
Create Project-Specific CLAUDE.md:
# Create a basic CLAUDE.md for your project cat > CLAUDE.md << 'EOF' # [PROJECT_NAME] ## Project Overview [Brief description] ## Development Commands [Add common commands] ## Architecture Notes [Add architectural decisions] EOF # Edit the file to add project-specific context
-
Use Claude Flow for Multi-Agent Development:
npx claude-flow@alpha init --force npx claude-flow@alpha swarm "your development task"
Configure Git on the remote VM:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"Optional SSH Agent Forwarding:
Add to your SSH config for seamless Git operations:
Host sindri-dev
ForwardAgent yes
# ... other settingsThe environment provides helpful utilities you can use in any IDE terminal:
Source the common library for colored output and utilities:
# Source the common library for colored output
source /workspace/.system/lib/common.sh
# Use print functions in your terminal
print_success "Build completed!"
print_error "Tests failed"
print_warning "Low disk space"
print_status "Running deployment..."Common Functions:
# Check if a command exists
if command_exists docker; then
echo "Docker is available"
fi
# Create directories with proper ownership
create_directory "/workspace/my-project"
# Run commands with retry logic
retry_with_backoff 3 2 "npm install"Workspace Functions:
# Source workspace utilities
source /workspace/.system/lib/workspace.sh
# Create a new project
setup_workspace_structure
create_project_templatesGit Utilities:
# Source Git utilities
source /workspace/.system/lib/git.sh
# Setup Git aliases and hooks
setup_git_aliases
setup_git_hooksQuick Commands:
# System status
/workspace/scripts/system-status.sh
# Backup workspace
/workspace/scripts/backup.sh
# Create new project (language-specific)
/workspace/scripts/new-project.sh my-app nodeSSH Performance Settings:
# Add to ~/.ssh/config for better performance
Host sindri-dev
TCPKeepAlive yes
ServerAliveInterval 30
ServerAliveCountMax 6
Compression yes
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
ControlPersist 600Monitor VM resources and performance:
# Check system resources
htop
df -h /workspace
free -h
# Check network latency
ping your-app-name.fly.devExclude Large Directories:
Configure your IDE to exclude these directories from indexing/watching:
node_modules/.git/objects/dist/orbuild/__pycache__/.venv/orvenv/target/(Java)
-
SSH Key Management:
- Use strong passphrases for SSH keys
- Rotate keys regularly
- Never share private keys
-
Environment Variables for Secrets:
# Set secrets in Fly.io (not in code) flyctl secrets set API_KEY=your_secret -a your-app-name
-
Regular Security Updates:
# Update system packages periodically sudo apt update && sudo apt upgrade
# Create named session
tmux new-session -s dev
# Detach: Ctrl+B, then D
# Reattach: tmux attach -t dev
# List sessions
tmux list-sessions- All work in
/workspacesurvives VM restarts - Use Git commits frequently
- Run backup script periodically:
/workspace/scripts/backup.sh
After completing this common setup:
-
Choose your IDE:
- VS Code Setup - For VS Code with Remote-SSH
- IntelliJ Setup - For JetBrains IDEs with Gateway
-
Explore Advanced Features:
- Customization Guide - Advanced configuration options
- Cost Management - Optimize your Fly.io costs
-
Get Help:
- Troubleshooting Guide - Solutions to common issues
- Command Reference - Complete command documentation