{
  "manifest_version": "1.0.0",
  "template": {
    "id": "84d8fec1-d872-4977-b347-d91f57461742",
    "slug": "kali-linux-web-terminal-for-pentesting-a",
    "name": "Kali Linux (Web Terminal for Pentesting & CTF)",
    "description": "Kali Linux in your browser: nmap, sqlmap, nikto, gobuster, ffuf & hydra",
    "url": "https://railway.com/deploy/kali-linux-web-terminal-for-pentesting-a",
    "upstream": {
      "image": "kalilinux/kali-rolling:latest"
    }
  },
  "services": [
    {
      "name": "Kali Linux",
      "source": {
        "image": "kalilinux/kali-rolling:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/root",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Kali Linux",
      "description": "Port the web terminal listens on",
      "secret": false,
      "strategy": "default",
      "default": "7681"
    },
    {
      "key": "PASSWORD",
      "service": "Kali Linux",
      "description": "Login password for the web terminal (generated - copy it from here)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "USERNAME",
      "service": "Kali Linux",
      "description": "Login username for the web terminal",
      "secret": false,
      "strategy": "default",
      "default": "kali"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "kali-linux-web-terminal-for-pentesting-a"
      }
    },
    "cli": "railway deploy --template kali-linux-web-terminal-for-pentesting-a",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "84d8fec1-d872-4977-b347-d91f57461742",
            "serializedConfig": {
              "services": {
                "45399461-7147-43f0-a2c5-cffb38cc82ae": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/kali-linux.svg",
                  "name": "Kali Linux",
                  "build": {},
                  "deploy": {
                    "startCommand": "bash -c 'set +e\nexport DEBIAN_FRONTEND=noninteractive\nBIN=/root/.local/bin; mkdir -p \"$BIN\" /root/workspace\nexport PATH=\"$BIN:$PATH\"\nif [ ! -x \"$BIN/ttyd\" ]; then\n  echo \"[boot] fetching web terminal...\"\n  (command -v curl >/dev/null 2>&1 || (apt-get update -qq && apt-get install -y -qq curl ca-certificates)) >/dev/null 2>&1\n  ARCH=$(uname -m); case \"$ARCH\" in aarch64|arm64) TA=aarch64;; *) TA=x86_64;; esac\n  curl -fsSL -o \"$BIN/ttyd\" \"https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.$TA\" && chmod +x \"$BIN/ttyd\" || echo \"[boot] ttyd download failed\"\nfi\nif [ ! -f /root/.tools-installed ]; then\n  echo \"[boot] installing tools (first boot only, may take a few minutes)...\"\n  (apt-get update -qq && apt-get install -y -qq curl wget git vim nano tmux jq unzip ca-certificates python3 python3-pip nmap sqlmap nikto whatweb dnsutils whois netcat-traditional gobuster ffuf hydra wordlists) >/tmp/apt.log 2>&1 && touch /root/.tools-installed || { echo \"[boot] some packages failed; see /tmp/apt.log\"; tail -n 5 /tmp/apt.log; }\nfi\nif [ -n \"$EXTRA_PACKAGES\" ] && [ ! -f /root/.extra-installed ]; then\n  echo \"[boot] installing EXTRA_PACKAGES...\"\n  apt-get install -y -qq $EXTRA_PACKAGES >/tmp/extra.log 2>&1 && touch /root/.extra-installed || { echo \"[boot] extra packages failed; see /tmp/extra.log\"; tail -n 5 /tmp/extra.log; }\nfi\ntouch /root/.bashrc\ngrep -q \"railway-box\" /root/.bashrc || cat >> /root/.bashrc <<\"BASHRC\"\n# railway-box\nexport PATH=\"/root/.local/bin:$PATH\"\nexport PS1=\"\\[\\e[1;31m\\]kali@railway\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[0m\\]# \"\ncd /root/workspace\necho \"Kali Linux | nmap, sqlmap, nikto, gobuster, ffuf, hydra, whatweb ready\"\nBASHRC\nif [ ! -x \"$BIN/ttyd\" ]; then echo \"[boot] FATAL: web terminal binary missing; idling so you can inspect logs\"; sleep infinity; fi\necho \"[boot] terminal ready on port $PORT\"\nexec \"$BIN/ttyd\" -p \"$PORT\" -W -c \"$USERNAME:$PASSWORD\" -t fontSize=14 -t titleFixed=\"Kali Linux\" bash -l'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "image": "kalilinux/kali-rolling:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the web terminal listens on",
                      "defaultValue": "7681"
                    },
                    "PASSWORD": {
                      "isOptional": false,
                      "description": "Login password for the web terminal (generated - copy it from here)",
                      "defaultValue": "{{PASSWORD}}"
                    },
                    "USERNAME": {
                      "isOptional": false,
                      "description": "Login username for the web terminal",
                      "defaultValue": "kali"
                    },
                    "EXTRA_PACKAGES": {
                      "isOptional": true,
                      "description": "Optional: space-separated apt packages/metapackages to install on boot (e.g. kali-tools-web metasploit-framework)",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:7681": {}
                    }
                  },
                  "volumeMounts": {
                    "4f2790e2-537a-4b2b-830e-11a8d3ea2508": {
                      "mountPath": "/root"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-17T22:14:38.342Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-17T19:53:55.992Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_3464bdb2b9384bc18fcd",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 20,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "Kali Linux"
  }
}
