{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a1e3bc9c-4510-4b90-8916-e8e140cc3332",
    "slug": "livekit-voice-agent",
    "name": "LiveKit Voice Agent — Self-Hosted WebRTC AI on Railway",
    "description": "Self-host LiveKit: OpenAI voice agent with WebRTC. No per-minute fees.",
    "url": "https://railway.com/deploy/livekit-voice-agent",
    "upstream": {
      "repo_url": "https://github.com/sahilrupani/LiveKit-Template"
    }
  },
  "services": [
    {
      "name": "Voice Agent",
      "source": {
        "repo": "https://github.com/sahilrupani/LiveKit-Template"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "LiveKit Server",
      "source": {
        "repo": "https://github.com/sahilrupani/LiveKit-Template"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "web-frontend",
      "source": {
        "repo": "https://github.com/sahilrupani/LiveKit-Template"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "tcp_ports": [
        6379
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "LIVEKIT_URL",
      "service": "Voice Agent",
      "description": "Provide a value for LIVEKIT_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "OPENAI_API_KEY",
      "service": "Voice Agent",
      "description": "Your OpenAI API key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LIVEKIT_API_KEY",
      "service": "Voice Agent",
      "description": "Provide a value for LIVEKIT_API_KEY.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIVEKIT_API_SECRET",
      "service": "Voice Agent",
      "description": "Provide a value for LIVEKIT_API_SECRET.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "LiveKit Server",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "REDIS_URL",
      "service": "LiveKit Server",
      "description": "Provide a value for REDIS_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIVEKIT_API_KEY",
      "service": "LiveKit Server",
      "description": "Provide a value for LIVEKIT_API_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LIVEKIT_API_SECRET",
      "service": "LiveKit Server",
      "description": "Provide a value for LIVEKIT_API_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LIVEKIT_NODE_IP_MODE",
      "service": "LiveKit Server",
      "description": "Provide a value for LIVEKIT_NODE_IP_MODE.",
      "secret": false,
      "strategy": "default",
      "default": "auto"
    },
    {
      "key": "LIVEKIT_URL",
      "service": "web-frontend",
      "description": "Provide a value for LIVEKIT_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LIVEKIT_API_KEY",
      "service": "web-frontend",
      "description": "Provide a value for LIVEKIT_API_KEY.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIVEKIT_API_SECRET",
      "service": "web-frontend",
      "description": "Provide a value for LIVEKIT_API_SECRET.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Provide a value for REDISHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Provide a value for REDISPORT.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Provide a value for REDISUSER.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis using the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Provide a value for REDISPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Provide a value for REDIS_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis externally",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "livekit-voice-agent"
      }
    },
    "cli": "railway deploy --template livekit-voice-agent",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a1e3bc9c-4510-4b90-8916-e8e140cc3332",
            "serializedConfig": {
              "services": {
                "2c91a556-50f7-4194-b99d-d20f84653601": {
                  "name": "Voice Agent",
                  "source": {
                    "repo": "sahilrupani/LiveKit-Template",
                    "branch": null,
                    "rootDirectory": "voice-agent"
                  },
                  "variables": {
                    "LIVEKIT_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "ws://${{livekit-server.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": false,
                      "description": "Your OpenAI API key",
                      "defaultValue": "{{OPENAI_API_KEY}}"
                    },
                    "LIVEKIT_API_KEY": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{livekit-server.LIVEKIT_API_KEY}}"
                    },
                    "LIVEKIT_API_SECRET": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{livekit-server.LIVEKIT_API_SECRET}}"
                    }
                  }
                },
                "355a3281-0ec9-41b9-be3b-9aae10001de4": {
                  "name": "LiveKit Server",
                  "source": {
                    "repo": "sahilrupani/LiveKit-Template",
                    "branch": null,
                    "rootDirectory": "livekit-server"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8080"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "LIVEKIT_API_KEY": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{LIVEKIT_API_KEY}}"
                    },
                    "LIVEKIT_API_SECRET": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{LIVEKIT_API_SECRET}}"
                    },
                    "LIVEKIT_NODE_IP_MODE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "auto"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "8af1b747-fa92-4710-9474-031cb0197973": {
                  "name": "web-frontend",
                  "source": {
                    "repo": "sahilrupani/LiveKit-Template",
                    "branch": null,
                    "rootDirectory": "web-frontend"
                  },
                  "variables": {
                    "LIVEKIT_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "wss://${{livekit-server.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LIVEKIT_API_KEY": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{livekit-server.LIVEKIT_API_KEY}}"
                    },
                    "LIVEKIT_API_SECRET": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{livekit-server.LIVEKIT_API_SECRET}}"
                    }
                  }
                },
                "b41bbc90-aa3e-41e1-ab91-b3863bdf8883": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\""
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Connection string for connecting to redis using the private network",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "description": "Connection string for connecting to redis externally",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_TCP_PROXY_DOMAIN }}:${{ RAILWAY_TCP_PROXY_PORT }}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6379": {}
                    }
                  },
                  "volumeMounts": {
                    "b41bbc90-aa3e-41e1-ab91-b3863bdf8883": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T11:03:36.976Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_eabedf88c52347e8bef9",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 146,
    "typical_build_seconds": 52,
    "typical_start_seconds": 10,
    "slowest_service": "Voice Agent"
  }
}
