{
  "slug": "railway-service-source-connect-and-disconnect-existing-service-sources-e09f519ce3da",
  "title": "railway service source connect and disconnect existing service sources",
  "tools": [
    "railway"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-04T11:29:04.000Z",
  "announced_at": "2026-06-04T11:29:04.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When you need to change an existing service’s source, use `railway service source connect` with either a GitHub repo or Docker image, or use `railway service source disconnect` to remove its current source.",
    "examples": [
      "railway service source connect --repo <owner>/<repo> --branch <branch> --service <service>",
      "railway service source connect --image <image> --service <service>",
      "railway service source disconnect --service <service>"
    ],
    "gotchas": [
      "Version: v4.67.0",
      "--service <SERVICE> / -s (required): Service name or ID.",
      "--repo <REPO> (required): GitHub repository in `owner/repo` format; pass this or `--image`, which are mutually exclusive.",
      "--image <IMAGE> (required): Docker image to connect; pass this or `--repo`, which are mutually exclusive.",
      "--branch <BRANCH>: Branch to deploy from when connecting a GitHub repository.",
      "--environment <ENVIRONMENT> / -e: Environment to use.",
      "--project <PROJECT_ID> / -p: Project ID to use.",
      "--json: Output in JSON format.",
      "The new Docker-image handling applies to the existing-service source connection path."
    ]
  },
  "why_it_matters": "Connect or disconnect an existing Railway service to a GitHub repository or Docker image from the CLI.",
  "sources": [
    "https://github.com/railwayapp/cli/releases/tag/v4.67.0",
    "https://github.com/railwayapp/cli/pull/934",
    "https://docs.railway.com/cli/service"
  ],
  "rank": 0.98049,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-2fd37be349c70dce-0:gate",
    "evidence_hash": "7a7e6de4dc6f41c7d0e26f83675dc6a7d23be32834e513fc651ea36cd02989cb"
  },
  "review": {
    "draft_hash": "adf241ab37fbac0d2bc5992d62c9aca21e72f266b283aa5c8e91305d8c8638ba",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.80 (>= 0.6 needed)."
  }
}
