{
  "manifest_version": "1.0.0",
  "template": {
    "id": "48b6d7a6-f4f5-4ecd-a25b-fefb22ef379d",
    "slug": "vllm-or-just-updated-openai-compatible-l",
    "name": "vLLM | (Just Updated) OpenAI-Compatible LLM API, CPU, Key Login On From Boot",
    "description": "vLLM OpenAI-compatible API on CPU. API key on from boot, cache on a volume.",
    "url": "https://railway.com/deploy/vllm-or-just-updated-openai-compatible-l",
    "upstream": {
      "image": "vllm/vllm-openai-cpu:v0.32.0@sha256:ffaba3989b9b96d95a576143c872a4110ce9800f5199b6a36eb27bdff1cbbe05"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "vllm",
      "source": {
        "image": "vllm/vllm-openai-cpu:v0.32.0@sha256:ffaba3989b9b96d95a576143c872a4110ce9800f5199b6a36eb27bdff1cbbe05"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "VLLM_API_KEY",
      "service": "vllm",
      "description": "Provide a value for VLLM_API_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "VLLM_PUBLIC_URL",
      "service": "vllm",
      "description": "Provide a value for VLLM_PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "VLLM_PRIVATE_URL",
      "service": "vllm",
      "description": "Provide a value for VLLM_PRIVATE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "vllm-or-just-updated-openai-compatible-l"
      }
    },
    "cli": "railway deploy --template vllm-or-just-updated-openai-compatible-l",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "48b6d7a6-f4f5-4ecd-a25b-fefb22ef379d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "ce2badff-f9a2-45e1-9c15-1df70c12a86f": {
                  "icon": null,
                  "name": "vllm",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'D=/data; export HF_HOME=$D/huggingface; mkdir -p $HF_HOME\nQ=$(cut -d\" \" -f1 /sys/fs/cgroup/cpu.max 2>/dev/null); P=$(cut -d\" \" -f2 /sys/fs/cgroup/cpu.max 2>/dev/null)\ncase \"$Q\" in \"\"|max) N=$(nproc);; *) N=$(( (Q+P-1)/P ));; esac\nMAX=$(cat /sys/fs/cgroup/memory.max 2>/dev/null)\ncase \"$MAX\" in \"\"|max) MB=8192;; *) MB=$((MAX/1048576));; esac\nKVMB=${VLLM_KV_CACHE_MB:-$((MB/16))}; [ \"$KVMB\" -lt 256 ] && KVMB=256\nexport OMP_NUM_THREADS=$N MKL_NUM_THREADS=$N VLLM_CPU_OMP_THREADS_BIND=nobind VLLM_ENABLE_V1_MULTIPROCESSING=0\nMODEL=${VLLM_MODEL:-Qwen/Qwen2.5-0.5B-Instruct}\nPORTN=${PORT:-8080}\necho \"[railway] vllm uid=$(id -u) vcpu=$N mem_mb=$MB kv_mb=$KVMB model=$MODEL data_owner=$(stat -c %u:%g $D) shm=$(df -m /dev/shm | tail -1 | tr -s \" \" | cut -d\" \" -f2)MB cpu_flags=$(grep -o -w -E \"avx512_bf16|avx512f|amx_bf16\" /proc/cpuinfo | sort -u | tr \"\\n\" \",\")\"\nBODY=$(printf \"{\\\"model\\\":\\\"%s\\\",\\\"messages\\\":[{\\\"role\\\":\\\"user\\\",\\\"content\\\":\\\"Say hi.\\\"}],\\\"max_tokens\\\":8}\" \"$MODEL\")\n( until curl -fs http://127.0.0.1:$PORTN/health >/dev/null 2>&1; do sleep 5; done; echo \"[railway] vllm healthy, warming up\"; curl -s -m 900 -o /dev/null -w \"[railway] warmup chat status=%{http_code} time=%{time_total}s\\n\" -H \"Authorization: Bearer $VLLM_API_KEY\" -H \"Content-Type: application/json\" -d \"$BODY\" http://127.0.0.1:$PORTN/v1/chat/completions ) &\nexec vllm serve \"$MODEL\" --host 0.0.0.0 --port $PORTN --max-model-len 4096 --kv-cache-memory-bytes $((KVMB*1048576))\n'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "vllm/vllm-openai-cpu:v0.32.0@sha256:ffaba3989b9b96d95a576143c872a4110ce9800f5199b6a36eb27bdff1cbbe05"
                  },
                  "variables": {
                    "VLLM_API_KEY": {
                      "isOptional": false,
                      "defaultValue": "{{VLLM_API_KEY}}"
                    },
                    "VLLM_PUBLIC_URL": {
                      "isOptional": false,
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "VLLM_PRIVATE_URL": {
                      "isOptional": false,
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:8080"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "ce2badff-f9a2-45e1-9c15-1df70c12a86f": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-24T22:14:45.211Z",
  "generator_version": "0.1.0"
}
