Complete reference for all Katana commands.
These options work with any command:
| Option | Description |
|---|---|
-c, --config <path> |
Path to custom configuration file |
-h, --help |
Display help for command |
-V, --version |
Display version number |
Install a target or tool module.
katana install dvwa
katana install juiceshopOptions:
--skip-dns- Skip the DNS update reminder
Notes:
- Creates and starts Docker containers for the target
- Registers proxy routes for hostname-based access
- After installing, run
sudo katana dns syncto update/etc/hosts
Remove an installed target or tool.
katana remove dvwaNotes:
- Stops and removes Docker containers
- Removes proxy route registrations
- Does not automatically update DNS (run
sudo katana dns syncafterward)
Start a stopped target.
katana start dvwaNotes:
- Only works on installed targets that are currently stopped
- Use
katana statusto see current state
Stop a running target.
katana stop dvwaNotes:
- Containers remain installed, just stopped
- Use
katana startto restart
Show system status overview.
katana statusOutput includes:
- Lock state
- Installation type and domain
- Number of installed/running targets
- List of targets with their status (running/stopped)
- Configuration file locations
View logs from a target's containers.
# Show last 100 lines
katana logs dvwa
# Follow log output (like tail -f)
katana logs -f dvwa
# Show last 50 lines
katana logs -t 50 dvwaOptions:
-f, --follow- Follow log output in real-time-t, --tail <lines>- Number of lines to show (default: 100)
List available modules.
# List all modules
katana list
# List only targets
katana list targets
# List only tools
katana list tools
# Show only installed modules
katana list --installedOptions:
--installed- Show only installed modules
Output shows:
- Module name
- Description
- Installation status (
[installed]marker)
Lock the system to prevent modifications.
katana lockNotes:
- Prevents
installandremoveoperations - Useful for classroom environments where instructors set up labs
- Use
katana unlockto re-enable modifications
Unlock the system to allow modifications.
katana unlockRun health checks on the system.
katana doctor
# Output as JSON (for scripting)
katana doctor --jsonOptions:
--json- Output results as JSON
Checks performed:
- Docker daemon running
- User has Docker permissions
- Docker network exists
- OpenSSL available
- Certificates initialized
- Certificates valid (with expiration warning)
- Port 443 capability
- DNS entries in sync
- State file valid
Exit codes:
0- All checks passed1- One or more checks failed
Remove orphaned resources and fix inconsistencies.
# Show what would be cleaned up
katana cleanup --dry-run
# Run cleanup
katana cleanup
# Also prune unused Docker images
katana cleanup --pruneOptions:
--dry-run- Show what would be done without making changes--prune- Also prune unused Docker images
Actions performed:
- Remove orphaned containers (from deleted targets)
- Report DNS sync status
- Optionally prune unused Docker images
Start the reverse proxy server.
katana proxy startNotes:
- Runs in foreground (use Ctrl+C to stop)
- Listens on ports 443 (HTTPS) and 80 (HTTP redirect)
- Serves the web dashboard at
https://katana.<domain> - Proxies requests to target containers based on hostname
For background operation, use a process manager like systemd. See Deployment Guide.
Show proxy configuration and registered routes.
katana proxy statusOutput includes:
- HTTPS and HTTP ports
- Dashboard URL
- Docker network name
- List of configured routes (hostname → container mapping)
Synchronize /etc/hosts with target hostnames.
# Sync hostnames for installed targets only
sudo katana dns sync
# Sync hostnames for ALL available targets
sudo katana dns sync --allOptions:
--all- Sync all available targets, not just installed ones
Requires: sudo (writes to /etc/hosts)
Notes:
- Adds entries with
# katana-managedmarker - Preserves non-Katana entries
- Idempotent (safe to run multiple times)
- For remote installations, use wildcard DNS instead
List DNS entries from /etc/hosts.
# Show Katana-managed entries only
katana dns list
# Show all entries
katana dns list --allOptions:
--all- Show all entries, not just Katana-managed
Initialize the Certificate Authority and generate server certificates.
katana cert initNotes:
- Creates a self-signed CA (valid 10 years)
- Generates wildcard server certificate (valid 1 year)
- Certificates stored in
~/.local/share/katana/certs/ - If CA already exists, keeps CA and regenerates server certificate
Renew the server certificate (keeps existing CA).
katana cert renewNotes:
- Keeps the existing CA (no need to re-import in browsers)
- Generates new server certificate (valid 1 year)
- Use when certificate is expiring
Export the CA certificate for browser import.
# Export to current directory
katana cert export
# Export to specific path
katana cert export /tmp/katana-ca.crtArguments:
[path]- Destination path (default:./ca.crt)
Notes:
- Creates a copy of the CA certificate
- Import this file into your browser to trust Katana's HTTPS certificates
Show certificate status and expiration.
katana cert statusOutput includes:
- CA initialization status
- Server certificate validity
- Days until expiration
- Certificate file location
Configure the system for proxy operation.
sudo katana setup-proxyRequires: sudo
Actions performed:
- Sets
cap_net_bind_servicecapability on the binary - This allows binding to ports 443 and 80 without running as root
Notes:
- Only needs to be run once after installation
- Must be re-run if the binary is replaced (e.g., after updates)
katana cert init # Generate certificates
sudo katana setup-proxy # Enable port 443 binding
sudo katana dns sync --all # Add all hostnames to /etc/hostskatana install dvwa # Install the target
katana proxy start # Start the proxy (foreground)
# Visit https://dvwa.samurai.wtf in browser# Install desired targets
katana install dvwa
katana install juiceshop
katana install webgoat
# Lock system to prevent student modifications
katana lock
# Start proxy
katana proxy startkatana doctor # Run all health checks
katana status # Quick status overview
katana proxy status # Show proxy routeskatana cleanup --dry-run # See what would be cleaned
katana cleanup --prune # Clean up and prune images
katana cert renew # Renew expiring certificate