Primary Command
lightfold deploy
Full deployment orchestration (recommended for most users).
--target- Deploy to named target--builder- Force builder choice (native,nixpacks,dockerfile)--force- Rerun all steps regardless of state--dry-run- Preview execution plan without running
- Detects framework
- Creates infrastructure (if needed)
- Configures server (if needed)
- Deploys code changes
Advanced Commands
lightfold create
Create infrastructure only.
--target- Target name (required)--provider- Provider choice (digitalocean,vultr,hetzner,byos)--region- Cloud provider region (for auto-provision)--size- Server size (for auto-provision)--ip- Server IP (for BYOS)--user- SSH username (for BYOS)--ssh-key- SSH key path (for BYOS)
lightfold configure
Configure server only.
--target- Target name--force- Reconfigure even if already configured
- Installs runtime dependencies
- Sets up systemd services
- Configures nginx
- Creates deployment directory structure
lightfold push
Deploy code changes only.
--target- Target name--force- Deploy even if commit unchanged
- Checks git commit changes
- Creates timestamped release
- Uploads and builds code
- Blue/green deployment with health checks
Management Commands
lightfold status
View deployment status and server health.
--target- Target name--json- Output in JSON format
lightfold logs
View application logs.
--target- Target name--tail- Stream logs in real-time--lines- Number of lines to show (default: 100)
lightfold rollback
Rollback to previous release.
--target- Target name--force- Skip confirmation prompt
lightfold sync
Sync local state/config with actual server state (drift recovery).
--target- Target name
- Local state files corrupted or deleted
- Server IP changed
- Recovering from bad state
- After manual server changes
lightfold ssh
SSH into deployment target.
--target- Target name (required)
lightfold destroy
Destroy VM and remove local configuration.
--target- Target name (required)
Configuration Commands
lightfold config
Manage targets and API tokens.
lightfold domain
Manage custom domains and SSL.
--domain- Domain name (for add command)--target- Target name
Utility Commands
lightfold detect
Detect framework only (no deployment).
--json- Output in JSON format
lightfold keygen
Generate SSH keypair.
Invocation Patterns
All commands support three invocation patterns:-
Current directory (default):
-
Specific path:
-
Named target: