{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4388e0c3-4787-4c1e-9c2b-33b3d944cc8c",
    "slug": "litellm-source-20260617",
    "name": "litellm-source-20260617",
    "description": "LiteLLM AI gateway with Postgres keys, Redis cache, and spend controls.",
    "url": "https://railway.com/deploy/litellm-source-20260617",
    "upstream": {
      "image": "ghcr.io/berriai/litellm:main-stable"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "litellm",
      "source": {
        "image": "ghcr.io/berriai/litellm:main-stable"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "postgres",
      "source": {
        "image": "postgres:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "redis",
      "source": {
        "image": "redis:7"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "litellm",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "REDIS_HOST",
      "service": "litellm",
      "description": "Provide a value for REDIS_HOST.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "REDIS_PORT",
      "service": "litellm",
      "description": "Provide a value for REDIS_PORT.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DATABASE_URL",
      "service": "litellm",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "LITELLM_MODE",
      "service": "litellm",
      "description": "Provide a value for LITELLM_MODE.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "litellm",
      "description": "Provide a value for REDIS_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "LITELLM_SALT_KEY",
      "service": "litellm",
      "description": "Provide a value for LITELLM_SALT_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "STORE_MODEL_IN_DB",
      "service": "litellm",
      "description": "Provide a value for STORE_MODEL_IN_DB.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "LITELLM_MASTER_KEY",
      "service": "litellm",
      "description": "Provide a value for LITELLM_MASTER_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "USE_PRISMA_MIGRATE",
      "service": "litellm",
      "description": "Provide a value for USE_PRISMA_MIGRATE.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis",
      "description": "Provide a value for REDIS_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "redis",
      "description": "Provide a value for RAILWAY_RUN_UID.",
      "secret": false,
      "strategy": "ask_user"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "litellm-source-20260617"
      }
    },
    "cli": "railway deploy --template litellm-source-20260617",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4388e0c3-4787-4c1e-9c2b-33b3d944cc8c",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "44c45ddc-b0ce-4844-87bd-b3f8ca229c63": {
                  "icon": null,
                  "name": "litellm",
                  "deploy": {
                    "startCommand": "/bin/sh -lc 'cat > /tmp/litellm_config.yaml <<\"YAML\"\nmodel_list: []\ngeneral_settings:\n  master_key: os.environ/LITELLM_MASTER_KEY\n  database_url: os.environ/DATABASE_URL\n  store_model_in_db: true\n  proxy_batch_write_at: 60\n  database_connection_pool_limit: 10\nlitellm_settings:\n  cache: true\n  cache_params:\n    type: redis\n    host: os.environ/REDIS_HOST\n    port: os.environ/REDIS_PORT\n    password: os.environ/REDIS_PASSWORD\n  json_logs: true\n  set_verbose: false\nrouter_settings:\n  routing_strategy: simple-shuffle\n  redis_host: os.environ/REDIS_HOST\n  redis_port: os.environ/REDIS_PORT\n  redis_password: os.environ/REDIS_PASSWORD\nYAML\nexec litellm --config /tmp/litellm_config.yaml --port 4000 --num_workers 1'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/berriai/litellm:main-stable"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "defaultValue": "{{PORT}}"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_HOST}}"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_PORT}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "{{DATABASE_URL}}"
                    },
                    "LITELLM_MODE": {
                      "isOptional": false,
                      "defaultValue": "{{LITELLM_MODE}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "LITELLM_SALT_KEY": {
                      "isOptional": false,
                      "defaultValue": "{{LITELLM_SALT_KEY}}"
                    },
                    "STORE_MODEL_IN_DB": {
                      "isOptional": false,
                      "defaultValue": "{{STORE_MODEL_IN_DB}}"
                    },
                    "LITELLM_MASTER_KEY": {
                      "isOptional": false,
                      "defaultValue": "{{LITELLM_MASTER_KEY}}"
                    },
                    "USE_PRISMA_MIGRATE": {
                      "isOptional": false,
                      "defaultValue": "{{USE_PRISMA_MIGRATE}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "c142f804-555a-48ad-979e-df2c0e95f538": {
                  "icon": null,
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "defaultValue": "{{PGDATA}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_USER}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "c142f804-555a-48ad-979e-df2c0e95f538": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "e9b3ccaf-40c3-4c64-a669-6788cedfa383": {
                  "icon": null,
                  "name": "redis",
                  "deploy": {
                    "startCommand": "/bin/sh -lc 'exec redis-server --appendonly yes --dir /data --requirepass \"$REDIS_PASSWORD\" --maxmemory-policy noeviction'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:7"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "defaultValue": "{{RAILWAY_RUN_UID}}"
                    }
                  },
                  "volumeMounts": {
                    "e9b3ccaf-40c3-4c64-a669-6788cedfa383": {
                      "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": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0"
}
