Remote Deploy

Services with remote configured in muster.json deploy via SSH. Remote deploys pipe the hook script to the target via ssh user@host "bash -s". Credentials and K8s env vars are exported on the remote side.

Configuration

Define remote deploy targets per-service in muster.json:

json
{
  "services": {
    "api": {
      "remote": {
        "enabled": true,
        "host": "prod.example.com",
        "user": "deploy",
        "port": 22,
        "project_dir": "/opt/app"
      }
    }
  }
}

Remote fields

NameDescription
enabledreq
booleanEnable remote deployment for this service.
hostreq
stringHostname or IP of the target machine.
userreq
stringSSH user on the target machine.
port
numberSSH port on the target machine. Default: 22
project_dirreq
stringAbsolute path to the project directory on the remote host.

SSH password collection

SSH passwords for password-authenticated hosts are collected up front (before the deploy loop) to avoid repeated prompting during multi-service deploys.

Git pull before deploy

Per-service git_pull config runs git pull before the deploy hook. For remote deploys, the git pull runs via SSH on the target machine.

json
{
  "services": {
    "api": {
      "git_pull": {
        "enabled": true,
        "remote": "origin",
        "branch": "main"
      }
    }
  }
}

If git pull fails, an interactive menu offers: Retry, Skip, or Abort.

CLI setup

Configure remote deploy targets non-interactively with the --remote flag:

bash
muster setup --remote [email protected]:2222:/opt/app

Multi-machine deployment

For multi-machine deployment, see Fleet — multi-machine deployment with SSH and cloud transport, groups, and parallel/rolling/sequential strategies.

Tip
Fleet extends remote deploy to multiple targets with advanced strategies. Use the single-machine remote config above for simple cases. For fleets that span networks and firewalls, see Fleet Cloud for the cloud relay transport.