{
  "manifest_version": "1.0.0",
  "template": {
    "id": "ff6e4472-1550-4511-b172-1a531f0bd101",
    "slug": "gregarious-laughter",
    "name": "gregarious-laughter",
    "description": "Kali Linux desktop in your browser, via KasmVNC.",
    "url": "https://railway.com/deploy/gregarious-laughter",
    "upstream": {
      "image": "caddy:2-alpine"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "proxy",
      "source": {
        "image": "caddy:2-alpine"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "kali",
      "source": {
        "image": "kasmweb/kali-rolling-desktop:1.19.0-rolling-weekly"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/kasm-user",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "proxy",
      "description": "Port the proxy listens on for web traffic, usually 8080.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "CADDYFILE",
      "service": "proxy",
      "description": "Caddy config that routes incoming web traffic to the Kali desktop.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "KASM_HOST",
      "service": "proxy",
      "description": "Address of the Kali desktop as host:port. The default points to the kali service on port 6901.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "kali",
      "description": "Port the Kali desktop web service listens on. Default 8080.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "VNC_PW",
      "service": "kali",
      "description": "Desktop login password (KasmVNC). Must be at least 6 characters. Generated automatically; change it in the service variables if you want your own.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "kali",
      "description": "User ID the container runs as. Keep the default of 0.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "gregarious-laughter"
      }
    },
    "cli": "railway deploy --template gregarious-laughter",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "ff6e4472-1550-4511-b172-1a531f0bd101",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "39dd239e-520a-4e1d-b382-c439cc2fbc24": {
                  "icon": "https://github.com/caddyserver.png?size=460",
                  "name": "proxy",
                  "deploy": {
                    "startCommand": "sh -c 'printf \"%s\" \"$CADDYFILE\" > /etc/caddy/Caddyfile && exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/proxy-healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2-alpine"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the proxy listens on for web traffic, usually 8080.",
                      "defaultValue": "{{PORT}}"
                    },
                    "CADDYFILE": {
                      "isOptional": false,
                      "description": "Caddy config that routes incoming web traffic to the Kali desktop.",
                      "defaultValue": "{{CADDYFILE}}"
                    },
                    "KASM_HOST": {
                      "isOptional": false,
                      "description": "Address of the Kali desktop as host:port. The default points to the kali service on port 6901.",
                      "defaultValue": "${{kali.RAILWAY_PRIVATE_DOMAIN}}:6901"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "9405ca01-b6ec-4c01-80a6-50d3f75f639f": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/kali-linux.svg",
                  "name": "kali",
                  "deploy": {
                    "startCommand": "bash -c 'set -eif [ ${#VNC_PW} -lt 6 ]; then echo \"FATAL: VNC_PW must be at least 6 characters (KasmVNC requirement). Set a longer password and redeploy.\" >&2; exit 1; fiecho \"kasm-user ALL=(ALL) NOPASSWD:ALL\" > /etc/sudoers.d/kasm-userchmod 0440 /etc/sudoers.d/kasm-userchown -R 1000:1000 /home/kasm-usersetcap -r /usr/lib/nmap/nmap 2>/dev/null || truecat > /usr/bin/nmap <<\"NMAPEOF\"#!/usr/bin/env shexec /usr/lib/nmap/nmap --unprivileged \"$@\"NMAPEOFchmod 755 /usr/bin/nmapXFCEDIR=/home/kasm-user/.config/xfce4/xfconf/xfce-perchannel-xmlif [ ! -f $XFCEDIR/xfce4-desktop.xml ]; then  mkdir -p $XFCEDIR  cat > $XFCEDIR/xfce4-desktop.xml <<\"XFCEEOF\"<?xml version=\"1.0\" encoding=\"UTF-8\"?><channel name=\"xfce4-desktop\" version=\"1.0\">  <property name=\"backdrop\" type=\"empty\">    <property name=\"screen0\" type=\"empty\">      <property name=\"monitorVNC-0\" type=\"empty\">        <property name=\"workspace0\" type=\"empty\">          <property name=\"last-image\" type=\"string\" value=\"/usr/share/backgrounds/kali/kali-cubes-16x9.jpg\"/>          <property name=\"image-style\" type=\"int\" value=\"5\"/>        </property>      </property>    </property>  </property></channel>XFCEEOF  chown -R 1000:1000 /home/kasm-user/.configfised -i \"s|function wait_for_network_devices() {|function wait_for_network_devices() { return 0;|\" /dockerstartup/vnc_startup.shgrep -q \"wait_for_network_devices() { return 0;\" /dockerstartup/vnc_startup.sh || { echo FATAL: Kasm startup changed, wait_for_network_devices patch no longer applies >&2; exit 1; }exec setpriv --reuid=1000 --regid=1000 --init-groups /dockerstartup/kasm_default_profile.sh /dockerstartup/vnc_startup.sh /dockerstartup/kasm_startup.sh --tail-log'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "kasmweb/kali-rolling-desktop:1.19.0-rolling-weekly",
                    "hasHiddenRegistryCredentials": true
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the Kali desktop web service listens on. Default 8080.",
                      "defaultValue": "8080"
                    },
                    "VNC_PW": {
                      "isOptional": false,
                      "description": "Desktop login password (KasmVNC). Must be at least 6 characters. Generated automatically; change it in the service variables if you want your own.",
                      "defaultValue": "{{VNC_PW}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "User ID the container runs as. Keep the default of 0.",
                      "defaultValue": "0"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "9405ca01-b6ec-4c01-80a6-50d3f75f639f": {
                      "mountPath": "/home/kasm-user",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "proxy",
      "method": "GET",
      "path": "/proxy-healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-20T16:14:54.346Z",
  "generator_version": "0.1.0"
}
