Remote Targets

Keel supports multiple Docker targets — local or remote via SSH tunnel.

Config

{
  "targets": {
    "local": { "host": "127.0.0.1" },
    "ec2": {
      "host": "1.2.3.4",
      "ssh_user": "ubuntu",
      "ssh_key": "~/.ssh/id_ed25519",
      "ssh_jump": "ec2-user@bastion.example.com",
      "external_ip": "1.2.3.4",
      "port_bind": "0.0.0.0",
      "description": "AWS EC2 Ubuntu"
    }
  },
  "default": "local"
}

Fields

FieldDescription
hostIP address or hostname
ssh_userSSH user for remote targets (omit for local)
ssh_keyPath to SSH private key (supports ~/)
ssh_jumpBastion/jump host for multi-hop SSH
external_ipExternal IP used by keel hosts setup
port_bindBind interface for ports — 127.0.0.1 (default) or 0.0.0.0
descriptionHuman-readable target label
defaultRoot-level field — default target name

Switching targets

keel target ec2      # switch to remote
keel start           # commands now execute on ec2 via SSH
keel target local    # switch back

For remote targets, an SSH tunnel is opened automatically, forwarding the remote Docker socket to a local Unix socket (/tmp/keel-docker-<target>.sock). The tunnel is monitored with automatic reconnection and exponential backoff — a live status dot in the topbar shows the connection state via SSE.