{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2436d58d-c39c-4170-885c-fbc1027f802b",
    "slug": "lobechat",
    "name": "LobeChat | Multi-Model AI/LLM Support",
    "description": "Self Host Lobechat. Private AI chat with 40+ providers, RAG, plugins & more",
    "url": "https://railway.com/deploy/lobechat",
    "upstream": {
      "image": "rustfs/rustfs:latest"
    }
  },
  "services": [
    {
      "name": "PostgreSQL",
      "source": {
        "image": "paradedb/paradedb:latest-pg17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "RustFS Init",
      "source": {
        "image": "alpine:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "RustFS",
      "source": {
        "image": "rustfs/rustfs:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "LobeChat",
      "source": {
        "image": "lobehub/lobehub"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "PostgreSQL",
      "description": "Data dir (subdirectory of volume)",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "PostgreSQL",
      "description": "Default database name",
      "secret": false,
      "strategy": "default",
      "default": "lobechat"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "PostgreSQL",
      "description": "Database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RUSTFS_ACCESS_KEY",
      "service": "RustFS Init",
      "description": "S3 access key (matches RustFS)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RUSTFS_SECRET_KEY",
      "service": "RustFS Init",
      "description": "S3 secret key (matches RustFS)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "RustFS",
      "description": "Run as root for volume access",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "RUSTFS_ACCESS_KEY",
      "service": "RustFS",
      "description": "S3 access key",
      "secret": true,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "RUSTFS_SECRET_KEY",
      "service": "RustFS",
      "description": "S3 secret key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RUSTFS_CONSOLE_ENABLE",
      "service": "RustFS",
      "description": "Enable admin console",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "APP_URL",
      "service": "LobeChat",
      "description": "Public-facing application URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "REDIS_TLS",
      "service": "LobeChat",
      "description": "Disable Redis TLS (internal network)",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "REDIS_URL",
      "service": "LobeChat",
      "description": "Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_BUCKET",
      "service": "LobeChat",
      "description": "S3 bucket name",
      "secret": false,
      "strategy": "default",
      "default": "lobe"
    },
    {
      "key": "S3_SET_ACL",
      "service": "LobeChat",
      "description": "Disable S3 ACL setting",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "AUTH_SECRET",
      "service": "LobeChat",
      "description": "Session token signing secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "LobeChat",
      "description": "RustFS public URL for file storage",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "LobeChat",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PREFIX",
      "service": "LobeChat",
      "description": "Redis key prefix",
      "secret": false,
      "strategy": "default",
      "default": "lobechat"
    },
    {
      "key": "S3_ACCESS_KEY",
      "service": "LobeChat",
      "description": "S3 access key ID",
      "secret": true,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "INTERNAL_APP_URL",
      "service": "LobeChat",
      "description": "Internal server-to-server URL",
      "secret": false,
      "strategy": "default",
      "default": "http://localhost:3210"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "LobeChat",
      "description": "S3 access key ID (alias)",
      "secret": true,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "KEY_VAULTS_SECRET",
      "service": "LobeChat",
      "description": "Encryption key for user API vaults",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "S3_ENABLE_PATH_STYLE",
      "service": "LobeChat",
      "description": "Use path-style S3 URLs",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "LobeChat",
      "description": "S3 secret access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LLM_VISION_IMAGE_USE_BASE64",
      "service": "LobeChat",
      "description": "Send images as base64 to LLMs",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Internal Redis service hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Redis server listening port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis default authentication user",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Internal Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Redis password environment reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Password for Redis authentication",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public Redis connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "lobechat"
      }
    },
    "cli": "railway deploy --template lobechat",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2436d58d-c39c-4170-885c-fbc1027f802b",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2857a93a-fb91-48d9-8940-1b388047fed5": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "PostgreSQL",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "paradedb/paradedb:latest-pg17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data dir (subdirectory of volume)",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database name",
                      "defaultValue": "lobechat"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "2857a93a-fb91-48d9-8940-1b388047fed5": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "6f07964f-4ff0-4101-8925-cebce2775052": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/rustfs.svg",
                  "name": "RustFS Init",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'wget -q https://dl.min.io/client/mc/release/linux-amd64/mc -O /tmp/mc && chmod +x /tmp/mc && for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do /tmp/mc alias set rustfs http://RustFS.railway.internal:9000 $RUSTFS_ACCESS_KEY $RUSTFS_SECRET_KEY 2>/dev/null && break; sleep 5; done && /tmp/mc mb rustfs/lobe --ignore-existing && printf \"{\\\"Statement\\\":[{\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":[\\\"*\\\"]},\\\"Action\\\":[\\\"s3:GetObject\\\"],\\\"Resource\\\":[\\\"arn:aws:s3:::lobe/*\\\"]}],\\\"Version\\\":\\\"2012-10-17\\\"}\" > /tmp/bp.json && /tmp/mc anonymous set-json /tmp/bp.json rustfs/lobe && echo Init done && sleep infinity'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "alpine:latest"
                  },
                  "variables": {
                    "RUSTFS_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "S3 access key (matches RustFS)",
                      "defaultValue": "${{RustFS.RUSTFS_ACCESS_KEY}}"
                    },
                    "RUSTFS_SECRET_KEY": {
                      "isOptional": false,
                      "description": "S3 secret key (matches RustFS)",
                      "defaultValue": "${{RustFS.RUSTFS_SECRET_KEY}}"
                    }
                  }
                },
                "c63146e7-e20a-4d10-82ce-6e4f32238c76": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/rustfs.svg",
                  "name": "RustFS",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'mkdir -p /data/lobe && exec rustfs --access-key $RUSTFS_ACCESS_KEY --secret-key $RUSTFS_SECRET_KEY /data'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "rustfs/rustfs:latest"
                  },
                  "variables": {
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root for volume access",
                      "defaultValue": "0"
                    },
                    "RUSTFS_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "S3 access key",
                      "defaultValue": "admin"
                    },
                    "RUSTFS_SECRET_KEY": {
                      "isOptional": false,
                      "description": "S3 secret key",
                      "defaultValue": "{{RUSTFS_SECRET_KEY}}"
                    },
                    "RUSTFS_CONSOLE_ENABLE": {
                      "isOptional": false,
                      "description": "Enable admin console",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "c63146e7-e20a-4d10-82ce-6e4f32238c76": {
                      "mountPath": "/data"
                    }
                  }
                },
                "dcb029a2-c70c-498b-9736-d9f602de365b": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/lobe-chat.svg",
                  "name": "LobeChat",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "lobehub/lobehub"
                  },
                  "variables": {
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public-facing application URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "REDIS_TLS": {
                      "isOptional": false,
                      "description": "Disable Redis TLS (internal network)",
                      "defaultValue": "0"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection string",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "S3 bucket name",
                      "defaultValue": "lobe"
                    },
                    "S3_SET_ACL": {
                      "isOptional": false,
                      "description": "Disable S3 ACL setting",
                      "defaultValue": "0"
                    },
                    "AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Session token signing secret",
                      "defaultValue": "{{AUTH_SECRET}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "RustFS public URL for file storage",
                      "defaultValue": "https://${{RustFS.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "postgresql://postgres:${{PostgreSQL.POSTGRES_PASSWORD}}@${{PostgreSQL.RAILWAY_PRIVATE_DOMAIN}}:5432/lobechat"
                    },
                    "REDIS_PREFIX": {
                      "isOptional": false,
                      "description": "Redis key prefix",
                      "defaultValue": "lobechat"
                    },
                    "S3_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "S3 access key ID",
                      "defaultValue": "admin"
                    },
                    "INTERNAL_APP_URL": {
                      "isOptional": false,
                      "description": "Internal server-to-server URL",
                      "defaultValue": "http://localhost:3210"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "S3 access key ID (alias)",
                      "defaultValue": "admin"
                    },
                    "KEY_VAULTS_SECRET": {
                      "isOptional": false,
                      "description": "Encryption key for user API vaults",
                      "defaultValue": "{{KEY_VAULTS_SECRET}}"
                    },
                    "S3_ENABLE_PATH_STYLE": {
                      "isOptional": false,
                      "description": "Use path-style S3 URLs",
                      "defaultValue": "1"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "S3 secret access key",
                      "defaultValue": "${{RustFS.RUSTFS_SECRET_KEY}}"
                    },
                    "LLM_VISION_IMAGE_USE_BASE64": {
                      "isOptional": false,
                      "description": "Send images as base64 to LLMs",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "e7b30ff8-31a0-4813-94ec-4577e79a67d4": {
                  "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\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Internal Redis service hostname",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis server listening port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis default authentication user",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Internal Redis connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis password environment reference",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for Redis authentication",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public Redis connection URL",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "e7b30ff8-31a0-4813-94ec-4577e79a67d4": {
                      "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": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T16:14:56.866Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-20T14:12:52.703Z",
  "success_rate_30d": 0.3333,
  "validation": {
    "last_run_id": "run_b9045ac27a6a431b821f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "SUCCESS,SUCCESS,SUCCESS,SUCCESS,CRASHED"
      }
    ],
    "typical_ready_seconds": 102,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "LobeChat"
  }
}
