githubEdit

Troubleshooting Guide

This guide helps diagnose and resolve common issues with spuff.

Quick Diagnostics

# Check spuff version
spuff --version

# Check current status
spuff status

# Check with debug logging
RUST_LOG=debug spuff status

# Check local state
sqlite3 ~/.spuff/state.db "SELECT * FROM instances;"

SSH Issues

"Permission denied (publickey)"

Symptoms:

Causes & Solutions:

  1. SSH key not in agent

  2. Wrong key configured

  3. Key not uploaded to provider

    • Go to DigitalOcean dashboard

    • Settings > Security > SSH Keys

    • Add your public key: cat ~/.ssh/id_ed25519.pub

  4. Key permissions wrong

"Connection refused" on port 22

Symptoms:

Causes & Solutions:

  1. VM still booting

    • Wait a few more seconds

    • SSH service starts after cloud-init user creation

  2. Firewall blocking

    • Check provider firewall/security groups

    • Ensure port 22 is open

  3. Instance not running

"Host key verification failed"

Symptoms:

Cause: Previous VM had same IP, different host key.

Solution:

SSH key requires passphrase

Symptoms:

Solution:


VM Creation Issues

"API token not configured"

Symptoms:

Solution:

"Invalid region"

Symptoms:

Solution:

"Quota exceeded"

Symptoms:

Solutions:

  1. Destroy existing instances: spuff down --force

  2. Request quota increase from provider

  3. Check for orphaned instances in provider dashboard

"SSH key not found"

Symptoms:

Cause: Public key not registered with cloud provider.

Solution:

  1. Copy public key: cat ~/.ssh/id_ed25519.pub

  2. Add to provider:

    • DigitalOcean: Settings > Security > SSH Keys > Add SSH Key


Cloud-Init Issues

Bootstrap never completes

Symptoms:

  • spuff agent status shows bootstrap_status: running forever

  • Can SSH in but tools not installed

Diagnosis:

Common causes:

  1. Network timeout downloading packages

  2. Package repository issues

  3. Script syntax error

Docker not installed

Symptoms:

Diagnosis:

Shell aliases not working

Symptoms:

Cause: .bashrc or .profile not properly configured.

Solution:


Agent Issues

"Agent not responding"

Symptoms:

Diagnosis:

Solutions:

  1. Agent not running

  2. Agent crashed

  3. Binary not found

"Unauthorized" from agent

Symptoms:

Cause: Token mismatch between CLI and agent.

Solution:


State Issues

"No active instance"

Symptoms:

Cause: Local state doesn't know about running instance.

Diagnosis:

Solutions:

  1. Instance exists but not in state

    • Manually add to state, or

    • Destroy via provider dashboard and recreate

  2. Instance was deleted externally

State out of sync

Symptoms:

  • spuff status shows instance that doesn't exist

  • spuff down fails with "not found"

Solution:


TUI Issues

"Device not configured" error

Symptoms:

Cause: Terminal not properly initialized after subprocess.

Solutions:

  1. Reset terminal

  2. Run with text output

  3. Check TTY

TUI garbled display

Symptoms:

  • Random characters

  • Broken layout

Solutions:


Network Issues

Timeout waiting for instance

Symptoms:

Causes:

  1. Provider having issues

  2. Region overloaded

  3. Network issues

Solutions:

  1. Try different region: spuff up --region fra1

  2. Check provider status page

  3. Retry after a few minutes

Can't reach provider API

Symptoms:

Solutions:

  1. Check internet connection

  2. Check if provider API is up

  3. Check firewall/proxy settings


Configuration Issues

"Config file not found"

Symptoms:

Solution:

"Invalid config"

Symptoms:

Solution:


Getting Help

If this guide doesn't solve your issue:

  1. Enable debug logging

  2. Collect information

    • spuff version

    • OS and version

    • Full error message

    • Debug logs

  3. Open an issue

    • https://github.com/avelino/spuff/issues

    • Include collected information

    • Redact any tokens/secrets!


Common Commands Reference

Last updated

Was this helpful?