Configuration Reference
This document describes all configuration options available in spuff's config.yaml file.
File Location
The configuration file is located at:
~/.spuff/config.yamlTo create or edit the configuration:
spuff init # Interactive setup (creates config.yaml)
spuff config show # Display current configuration
spuff config edit # Open in $EDITOR
spuff config set <key> <value> # Set individual valuesComplete Example
# Cloud provider configuration
provider: digitalocean
region: nyc1
size: s-2vcpu-4gb
# VM lifecycle
idle_timeout: 2h
environment: devbox
# SSH configuration
ssh_key_path: ~/.ssh/id_ed25519
ssh_user: dev
# Optional: Dotfiles repository
dotfiles: https://github.com/yourusername/dotfiles
# Optional: Tailscale VPN
tailscale_enabled: false
tailscale_authkey: tskey-auth-xxxxx
# Optional: Agent authentication
agent_token: your-secret-tokenConfiguration Options
provider
Type: string Required: Yes Default: digitalocean
The cloud provider to use for creating VMs.
Supported values:
digitalocean
Stable
DigitalOcean Droplets
hetzner
Planned
Hetzner Cloud
aws
Planned
Amazon EC2
region
Type: string Required: Yes Default: nyc1
The geographic region where your VM will be created. Lower latency = faster connection.
DigitalOcean regions:
nyc1, nyc3
New York, USA
sfo3
San Francisco, USA
ams3
Amsterdam, Netherlands
sgp1
Singapore
lon1
London, UK
fra1
Frankfurt, Germany
tor1
Toronto, Canada
blr1
Bangalore, India
syd1
Sydney, Australia
Tip: Choose the region closest to you for best performance.
Override at runtime:
size
Type: string Required: Yes Default: s-2vcpu-4gb
The VM size/type determining CPU, memory, and cost.
DigitalOcean sizes:
s-1vcpu-1gb
1
1 GB
25 GB
$0.009
s-1vcpu-2gb
1
2 GB
50 GB
$0.018
s-2vcpu-2gb
2
2 GB
60 GB
$0.027
s-2vcpu-4gb
2
4 GB
80 GB
$0.036
s-4vcpu-8gb
4
8 GB
160 GB
$0.071
s-8vcpu-16gb
8
16 GB
320 GB
$0.143
Recommended:
Light development:
s-2vcpu-4gb(default)Heavy builds/Claude Code:
s-4vcpu-8gbCI/testing:
s-1vcpu-2gb
Override at runtime:
idle_timeout
Type: string (duration) Required: Yes Default: 2h
Time of inactivity after which the VM will be automatically destroyed. This prevents forgotten instances and surprise bills.
Duration formats:
Nh
2h
N hours
Nm
30m
N minutes
Ns
3600s
N seconds
N
7200
N seconds (raw)
Examples:
How it works:
The
spuff-agentrunning on the VM monitors activityActivity includes: SSH sessions, CPU usage, network traffic
When no activity for the configured duration, the VM self-destructs
Snapshots can be created automatically before destruction
environment
Type: string Required: Yes Default: devbox
The base environment type that determines what tools are pre-installed.
Supported values:
devbox
Modern shell (zsh), Docker, Git, development tools
nix
Nix package manager environment (planned)
minimal
Bare minimum (planned)
ssh_key_path
Type: string (file path) Required: Yes Default: ~/.ssh/id_ed25519
Path to your SSH private key file. This key is used to:
Authenticate with the cloud provider (public key registered)
Connect to the VM via SSH
Forward your SSH agent for git operations
Supported key types:
id_ed25519(recommended)id_rsaid_ecdsa
Notes:
The path supports
~expansionThe corresponding
.pubfile must existThe public key is registered with your cloud provider
Examples:
ssh_user
Type: string Required: No Default: dev
The SSH username for connecting to the VM. This user is created with passwordless sudo access.
Notes:
Default is
dev(non-root for security)User is created with
sudoanddockergroupsRoot SSH login is disabled by default
Password authentication is disabled (SSH key only)
dotfiles
Type: string (URL) or null Required: No Default: null (not set)
URL to a git repository containing your dotfiles. When set, spuff will clone and apply your dotfiles on VM creation.
Supported formats:
How it works:
Repository is cloned to
~/dotfilesIf
install.shexists, it's executedIf
Makefileexists withinstalltarget,make installis runOtherwise, symlinks are created for common dotfiles
Tip: Keep your dotfiles repo lightweight for faster VM startup.
tailscale_enabled
Type: boolean Required: No Default: false
Enable Tailscale VPN integration. When enabled, your VM joins your Tailscale network for secure private access.
Benefits:
Access VM via private Tailscale IP (no public exposure)
Persistent hostname across VM recreations
Secure mesh networking
Access from anywhere without port forwarding
tailscale_authkey
Type: string or null Required: No (required if tailscale_enabled: true) Default: null (not set)
Your Tailscale authentication key for automatic VM enrollment.
Getting an auth key:
Go to Tailscale Admin Console
Click "Generate auth key"
Settings:
Reusable: Yes (for multiple VMs)
Ephemeral: Yes (auto-removes when VM destroyed)
Pre-authorized: Optional
Copy the key (starts with
tskey-auth-)
Alternative: Use environment variable
agent_token
Type: string or null Required: No Default: null (auto-generated)
Authentication token for the spuff-agent API running on the VM. Protects the agent's HTTP endpoints from unauthorized access.
How it works:
If set, all agent API requests require
X-Spuff-TokenheaderThe CLI automatically includes this token in requests
If not set, a random token is generated during VM creation
Alternative: Use environment variable
Security note: The agent token protects endpoints that expose system metrics and can execute commands. Always use a strong, unique token.
Environment Variables
API tokens and secrets can be provided via environment variables instead of (or in addition to) the config file:
SPUFF_API_TOKEN
Cloud provider API token
Highest
DIGITALOCEAN_TOKEN
DigitalOcean API token
Provider-specific
HETZNER_TOKEN
Hetzner API token
Provider-specific
AWS_ACCESS_KEY_ID
AWS access key
Provider-specific
SPUFF_AGENT_TOKEN
Agent authentication token
Override config
TS_AUTHKEY
Tailscale auth key
Override config
Priority: Environment variables take precedence over config file values.
Example setup:
CLI Commands
View Configuration
Output:
Set Individual Values
Available keys:
providerregionsizeidle_timeout(oridle-timeout)environmentdotfilesssh_key(orssh-key)ssh_user(orssh-user)tailscale
Edit in Editor
Opens the config file in your $EDITOR (defaults to vim).
Runtime Overrides
Many configuration values can be overridden at runtime:
File Permissions
The config file is created with restricted permissions (0600) to protect sensitive data like tokens. If you edit the file manually, ensure proper permissions:
Example Configurations
Minimal (default)
Power User
CI/Testing
Troubleshooting
Config not found
Solution: Run spuff init to create the configuration file.
Invalid config
Solution: Add the missing field or run spuff init to regenerate.
Token not found
Solution: Either:
Add
api_tokento config.yaml (not recommended)Set environment variable:
export DIGITALOCEAN_TOKEN="..."Set generic variable:
export SPUFF_API_TOKEN="..."
SSH key not found
Solution:
Generate a key:
ssh-keygen -t ed25519Or update
ssh_key_pathto point to existing key
Last updated
Was this helpful?