{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1b41c49f-5c48-4f60-80be-8a1b957e6053",
    "slug": "dify-self-hosted-openai-gpts-alternative",
    "name": "Dify (Self-Hosted OpenAI GPTs Alternative)",
    "description": "Open-source Coze & OpenAI GPTs alternative. [Updated Aug '26]",
    "url": "https://railway.com/deploy/dify-self-hosted-openai-gpts-alternative",
    "upstream": {
      "image": "langgenius/dify-api:1.16.0"
    }
  },
  "services": [
    {
      "name": "worker",
      "source": {
        "image": "langgenius/dify-api:1.16.0"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "dify-api",
      "source": {
        "image": "langgenius/dify-api:1.16.0"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "dify-web",
      "source": {
        "image": "langgenius/dify-web:1.16.0"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "pgvector",
      "source": {
        "image": "pgvector/pgvector:pg16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "squid",
      "source": {
        "image": "ubuntu/squid:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "minio",
      "source": {
        "image": "minio/minio:RELEASE.2025-04-08T15-41-24Z"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "redis",
      "source": {
        "image": "redis:6-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "dify-sandbox",
      "source": {
        "image": "langgenius/dify-sandbox:0.2.15"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "dify-plugin-daemon",
      "source": {
        "image": "langgenius/dify-plugin-daemon:0.6.3-local"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/storage",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "MODE",
      "service": "worker",
      "description": "Process role for this service (api or worker)",
      "secret": false,
      "strategy": "default",
      "default": "worker"
    },
    {
      "key": "DB_HOST",
      "service": "worker",
      "description": "PostgreSQL private host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PORT",
      "service": "worker",
      "description": "PostgreSQL port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "DB_TYPE",
      "service": "worker",
      "description": "Database engine type",
      "secret": false,
      "strategy": "default",
      "default": "postgresql"
    },
    {
      "key": "REDIS_DB",
      "service": "worker",
      "description": "Redis database index",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "LOG_LEVEL",
      "service": "worker",
      "description": "Application log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "S3_REGION",
      "service": "worker",
      "description": "S3 region",
      "secret": false,
      "strategy": "default",
      "default": "us-east-1"
    },
    {
      "key": "DEPLOY_ENV",
      "service": "worker",
      "description": "Deployment environment label",
      "secret": false,
      "strategy": "default",
      "default": "PRODUCTION"
    },
    {
      "key": "REDIS_HOST",
      "service": "worker",
      "description": "Redis private host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PORT",
      "service": "worker",
      "description": "Redis port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "SECRET_KEY",
      "service": "worker",
      "description": "Secret used to sign sessions and tokens",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_DATABASE",
      "service": "worker",
      "description": "PostgreSQL database name",
      "secret": false,
      "strategy": "default",
      "default": "dify"
    },
    {
      "key": "DB_PASSWORD",
      "service": "worker",
      "description": "PostgreSQL password (referenced from the database service)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_SSL_MODE",
      "service": "worker",
      "description": "PostgreSQL SSL mode",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "DB_USERNAME",
      "service": "worker",
      "description": "PostgreSQL user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "worker",
      "description": "MinIO/S3 endpoint URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "STORAGE_TYPE",
      "service": "worker",
      "description": "File storage backend (S3/MinIO)",
      "secret": false,
      "strategy": "default",
      "default": "s3"
    },
    {
      "key": "VECTOR_STORE",
      "service": "worker",
      "description": "Vector store backend",
      "secret": false,
      "strategy": "default",
      "default": "pgvector"
    },
    {
      "key": "PGVECTOR_HOST",
      "service": "worker",
      "description": "pgvector host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGVECTOR_PORT",
      "service": "worker",
      "description": "pgvector port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGVECTOR_USER",
      "service": "worker",
      "description": "pgvector user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "REDIS_USE_SSL",
      "service": "worker",
      "description": "Whether to connect to Redis over SSL",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "S3_ACCESS_KEY",
      "service": "worker",
      "description": "S3 access key",
      "secret": true,
      "strategy": "default",
      "default": "minio"
    },
    {
      "key": "S3_SECRET_KEY",
      "service": "worker",
      "description": "S3 secret key (MinIO root password)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BROKER_USE_SSL",
      "service": "worker",
      "description": "Whether the Celery broker uses SSL",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CELERY_BACKEND",
      "service": "worker",
      "description": "Celery result backend",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "worker",
      "description": "Redis password (referenced from the Redis service)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_BUCKET_NAME",
      "service": "worker",
      "description": "S3 bucket for Dify files",
      "secret": false,
      "strategy": "default",
      "default": "dify"
    },
    {
      "key": "MARKETPLACE_URL",
      "service": "worker",
      "description": "Dify marketplace URL",
      "secret": false,
      "strategy": "default",
      "default": "https://marketplace.dify.ai"
    },
    {
      "key": "S3_ADDRESS_STYLE",
      "service": "worker",
      "description": "S3 addressing style (path or virtual)",
      "secret": false,
      "strategy": "default",
      "default": "path"
    },
    {
      "key": "CELERY_BROKER_URL",
      "service": "worker",
      "description": "Celery broker connection string (Redis)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MIGRATION_ENABLED",
      "service": "worker",
      "description": "Run database migrations on boot (api only)",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "PGVECTOR_DATABASE",
      "service": "worker",
      "description": "pgvector database name",
      "secret": false,
      "strategy": "default",
      "default": "dify"
    },
    {
      "key": "PGVECTOR_PASSWORD",
      "service": "worker",
      "description": "pgvector password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PLUGIN_DAEMON_KEY",
      "service": "worker",
      "description": "Key shared with the plugin daemon",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PLUGIN_DAEMON_URL",
      "service": "worker",
      "description": "Plugin daemon internal URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MARKETPLACE_API_URL",
      "service": "worker",
      "description": "Dify marketplace API URL",
      "secret": false,
      "strategy": "default",
      "default": "https://marketplace.dify.ai"
    },
    {
      "key": "MARKETPLACE_ENABLED",
      "service": "worker",
      "description": "Enable the Dify plugin marketplace",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SSRF_PROXY_HTTP_URL",
      "service": "worker",
      "description": "SSRF proxy HTTP URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SQLALCHEMY_POOL_SIZE",
      "service": "worker",
      "description": "SQLAlchemy connection pool size",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "SSRF_PROXY_HTTPS_URL",
      "service": "worker",
      "description": "SSRF proxy HTTPS URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CODE_EXECUTION_API_KEY",
      "service": "worker",
      "description": "API key shared with the sandbox service",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_USE_AWS_MANAGED_IAM",
      "service": "worker",
      "description": "Use AWS-managed IAM for S3 auth",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CODE_EXECUTION_ENDPOINT",
      "service": "worker",
      "description": "Dify sandbox code-execution endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGVECTOR_MAX_CONNECTION",
      "service": "worker",
      "description": "Maximum pgvector connections",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "PGVECTOR_MIN_CONNECTION",
      "service": "worker",
      "description": "Minimum pgvector connections",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PLUGIN_MAX_PACKAGE_SIZE",
      "service": "worker",
      "description": "Maximum plugin package size in bytes",
      "secret": false,
      "strategy": "default",
      "default": "52428800"
    },
    {
      "key": "SQLALCHEMY_POOL_RECYCLE",
      "service": "worker",
      "description": "Seconds before a pooled DB connection is recycled",
      "secret": false,
      "strategy": "default",
      "default": "3600"
    },
    {
      "key": "INNER_API_KEY_FOR_PLUGIN",
      "service": "worker",
      "description": "Inner API key for plugin-to-API calls",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VECTOR_INDEX_NAME_PREFIX",
      "service": "worker",
      "description": "Prefix for vector index names",
      "secret": false,
      "strategy": "default",
      "default": "Vector_index"
    },
    {
      "key": "CODE_EXECUTION_SSL_VERIFY",
      "service": "worker",
      "description": "Verify SSL on code-execution calls",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "MODE",
      "service": "dify-api",
      "description": "Process role for this service (api or worker)",
      "secret": false,
      "strategy": "default",
      "default": "api"
    },
    {
      "key": "PORT",
      "service": "dify-api",
      "description": "HTTP port Railway routes the public domain to",
      "secret": false,
      "strategy": "default",
      "default": "5001"
    },
    {
      "key": "DB_HOST",
      "service": "dify-api",
      "description": "PostgreSQL private host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PORT",
      "service": "dify-api",
      "description": "PostgreSQL port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "DB_TYPE",
      "service": "dify-api",
      "description": "Database engine type",
      "secret": false,
      "strategy": "default",
      "default": "postgresql"
    },
    {
      "key": "REDIS_DB",
      "service": "dify-api",
      "description": "Redis database index",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "DIFY_PORT",
      "service": "dify-api",
      "description": "Port the Dify API listens on",
      "secret": false,
      "strategy": "default",
      "default": "5001"
    },
    {
      "key": "FILES_URL",
      "service": "dify-api",
      "description": "Public URL used for file downloads",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LOG_LEVEL",
      "service": "dify-api",
      "description": "Application log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "S3_REGION",
      "service": "dify-api",
      "description": "S3 region",
      "secret": false,
      "strategy": "default",
      "default": "us-east-1"
    },
    {
      "key": "DEPLOY_ENV",
      "service": "dify-api",
      "description": "Deployment environment label",
      "secret": false,
      "strategy": "default",
      "default": "PRODUCTION"
    },
    {
      "key": "REDIS_HOST",
      "service": "dify-api",
      "description": "Redis private host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PORT",
      "service": "dify-api",
      "description": "Redis port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "SECRET_KEY",
      "service": "dify-api",
      "description": "Secret used to sign sessions and tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "APP_API_URL",
      "service": "dify-api",
      "description": "Public URL of the app/backend API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "APP_WEB_URL",
      "service": "dify-api",
      "description": "Public URL for published apps",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_DATABASE",
      "service": "dify-api",
      "description": "PostgreSQL database name",
      "secret": false,
      "strategy": "default",
      "default": "dify"
    },
    {
      "key": "DB_PASSWORD",
      "service": "dify-api",
      "description": "PostgreSQL password (referenced from the database service)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_SSL_MODE",
      "service": "dify-api",
      "description": "PostgreSQL SSL mode",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "DB_USERNAME",
      "service": "dify-api",
      "description": "PostgreSQL user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "dify-api",
      "description": "MinIO/S3 endpoint URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "STORAGE_TYPE",
      "service": "dify-api",
      "description": "File storage backend (S3/MinIO)",
      "secret": false,
      "strategy": "default",
      "default": "s3"
    },
    {
      "key": "VECTOR_STORE",
      "service": "dify-api",
      "description": "Vector store backend",
      "secret": false,
      "strategy": "default",
      "default": "pgvector"
    },
    {
      "key": "PGVECTOR_HOST",
      "service": "dify-api",
      "description": "pgvector host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGVECTOR_PORT",
      "service": "dify-api",
      "description": "pgvector port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGVECTOR_USER",
      "service": "dify-api",
      "description": "pgvector user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "REDIS_USE_SSL",
      "service": "dify-api",
      "description": "Whether to connect to Redis over SSL",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "S3_ACCESS_KEY",
      "service": "dify-api",
      "description": "S3 access key",
      "secret": true,
      "strategy": "default",
      "default": "minio"
    },
    {
      "key": "S3_SECRET_KEY",
      "service": "dify-api",
      "description": "S3 secret key (MinIO root password)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BROKER_USE_SSL",
      "service": "dify-api",
      "description": "Whether the Celery broker uses SSL",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CELERY_BACKEND",
      "service": "dify-api",
      "description": "Celery result backend",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "dify-api",
      "description": "Redis password (referenced from the Redis service)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_BUCKET_NAME",
      "service": "dify-api",
      "description": "S3 bucket for Dify files",
      "secret": false,
      "strategy": "default",
      "default": "dify"
    },
    {
      "key": "CONSOLE_API_URL",
      "service": "dify-api",
      "description": "Public URL of the console API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CONSOLE_WEB_URL",
      "service": "dify-api",
      "description": "Public URL of the web console",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MARKETPLACE_URL",
      "service": "dify-api",
      "description": "Dify marketplace URL",
      "secret": false,
      "strategy": "default",
      "default": "https://marketplace.dify.ai"
    },
    {
      "key": "SERVICE_API_URL",
      "service": "dify-api",
      "description": "Public URL of the service API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "S3_ADDRESS_STYLE",
      "service": "dify-api",
      "description": "S3 addressing style (path or virtual)",
      "secret": false,
      "strategy": "default",
      "default": "path"
    },
    {
      "key": "CELERY_BROKER_URL",
      "service": "dify-api",
      "description": "Celery broker connection string (Redis)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DIFY_BIND_ADDRESS",
      "service": "dify-api",
      "description": "Address the API server binds to",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "MIGRATION_ENABLED",
      "service": "dify-api",
      "description": "Run database migrations on boot (api only)",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PGVECTOR_DATABASE",
      "service": "dify-api",
      "description": "pgvector database name",
      "secret": false,
      "strategy": "default",
      "default": "dify"
    },
    {
      "key": "PGVECTOR_PASSWORD",
      "service": "dify-api",
      "description": "pgvector password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PLUGIN_DAEMON_KEY",
      "service": "dify-api",
      "description": "Key shared with the plugin daemon",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PLUGIN_DAEMON_URL",
      "service": "dify-api",
      "description": "Plugin daemon internal URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "INTERNAL_FILES_URL",
      "service": "dify-api",
      "description": "Internal URL for file access between services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MARKETPLACE_API_URL",
      "service": "dify-api",
      "description": "Dify marketplace API URL",
      "secret": false,
      "strategy": "default",
      "default": "https://marketplace.dify.ai"
    },
    {
      "key": "MARKETPLACE_ENABLED",
      "service": "dify-api",
      "description": "Enable the Dify plugin marketplace",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SSRF_PROXY_HTTP_URL",
      "service": "dify-api",
      "description": "SSRF proxy HTTP URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SQLALCHEMY_POOL_SIZE",
      "service": "dify-api",
      "description": "SQLAlchemy connection pool size",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "SSRF_PROXY_HTTPS_URL",
      "service": "dify-api",
      "description": "SSRF proxy HTTPS URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CODE_EXECUTION_API_KEY",
      "service": "dify-api",
      "description": "API key shared with the sandbox service",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_USE_AWS_MANAGED_IAM",
      "service": "dify-api",
      "description": "Use AWS-managed IAM for S3 auth",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CODE_EXECUTION_ENDPOINT",
      "service": "dify-api",
      "description": "Dify sandbox code-execution endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGVECTOR_MAX_CONNECTION",
      "service": "dify-api",
      "description": "Maximum pgvector connections",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "PGVECTOR_MIN_CONNECTION",
      "service": "dify-api",
      "description": "Minimum pgvector connections",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PLUGIN_MAX_PACKAGE_SIZE",
      "service": "dify-api",
      "description": "Maximum plugin package size in bytes",
      "secret": false,
      "strategy": "default",
      "default": "52428800"
    },
    {
      "key": "SQLALCHEMY_POOL_RECYCLE",
      "service": "dify-api",
      "description": "Seconds before a pooled DB connection is recycled",
      "secret": false,
      "strategy": "default",
      "default": "3600"
    },
    {
      "key": "INNER_API_KEY_FOR_PLUGIN",
      "service": "dify-api",
      "description": "Inner API key for plugin-to-API calls",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VECTOR_INDEX_NAME_PREFIX",
      "service": "dify-api",
      "description": "Prefix for vector index names",
      "secret": false,
      "strategy": "default",
      "default": "Vector_index"
    },
    {
      "key": "CODE_EXECUTION_SSL_VERIFY",
      "service": "dify-api",
      "description": "Verify SSL on code-execution calls",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CONSOLE_CORS_ALLOW_ORIGINS",
      "service": "dify-api",
      "description": "Allowed CORS origins for the console",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "PLUGIN_REMOTE_INSTALL_HOST",
      "service": "dify-api",
      "description": "Plugin daemon host for remote install",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PLUGIN_REMOTE_INSTALL_PORT",
      "service": "dify-api",
      "description": "Plugin daemon port for remote install",
      "secret": false,
      "strategy": "default",
      "default": "5003"
    },
    {
      "key": "WEB_API_CORS_ALLOW_ORIGINS",
      "service": "dify-api",
      "description": "Allowed CORS origins for the web API",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "PORT",
      "service": "dify-web",
      "description": "HTTP port Railway routes the public domain to",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "HOSTNAME",
      "service": "dify-web",
      "description": "Host the web server binds to",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "APP_API_URL",
      "service": "dify-web",
      "description": "Public URL of the app/backend API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CONSOLE_API_URL",
      "service": "dify-web",
      "description": "Public URL of the console API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MARKETPLACE_URL",
      "service": "dify-web",
      "description": "Dify marketplace URL",
      "secret": false,
      "strategy": "default",
      "default": "https://marketplace.dify.ai"
    },
    {
      "key": "MARKETPLACE_API_URL",
      "service": "dify-web",
      "description": "Dify marketplace API URL",
      "secret": false,
      "strategy": "default",
      "default": "https://marketplace.dify.ai"
    },
    {
      "key": "NEXT_TELEMETRY_DISABLED",
      "service": "dify-web",
      "description": "Disable Next.js telemetry",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PGDATA",
      "service": "pgvector",
      "description": "PostgreSQL data directory (subdir avoids init error)",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "pgvector",
      "description": "Primary Dify database name",
      "secret": false,
      "strategy": "default",
      "default": "dify"
    },
    {
      "key": "POSTGRES_USER",
      "service": "pgvector",
      "description": "PostgreSQL superuser name",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "pgvector",
      "description": "Auto-generated PostgreSQL password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MINIO_ROOT_USER",
      "service": "minio",
      "description": "MinIO root username",
      "secret": false,
      "strategy": "default",
      "default": "minio"
    },
    {
      "key": "MINIO_ROOT_PASSWORD",
      "service": "minio",
      "description": "Auto-generated MinIO root password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis",
      "description": "Redis password (referenced from the Redis service)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "API_KEY",
      "service": "dify-sandbox",
      "description": "Auto-generated key the API uses to call the sandbox",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "GIN_MODE",
      "service": "dify-sandbox",
      "description": "Gin web framework run mode",
      "secret": false,
      "strategy": "default",
      "default": "release"
    },
    {
      "key": "HTTP_PROXY",
      "service": "dify-sandbox",
      "description": "HTTP proxy for sandboxed outbound calls",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "HTTPS_PROXY",
      "service": "dify-sandbox",
      "description": "HTTPS proxy for sandboxed outbound calls",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SANDBOX_PORT",
      "service": "dify-sandbox",
      "description": "Port the sandbox service listens on",
      "secret": false,
      "strategy": "default",
      "default": "8194"
    },
    {
      "key": "ENABLE_NETWORK",
      "service": "dify-sandbox",
      "description": "Allow network access from sandboxed code",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "WORKER_TIMEOUT",
      "service": "dify-sandbox",
      "description": "Sandbox worker timeout in seconds",
      "secret": false,
      "strategy": "default",
      "default": "15"
    },
    {
      "key": "DB_HOST",
      "service": "dify-plugin-daemon",
      "description": "PostgreSQL private host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PORT",
      "service": "dify-plugin-daemon",
      "description": "PostgreSQL port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "DB_TYPE",
      "service": "dify-plugin-daemon",
      "description": "Database engine type",
      "secret": false,
      "strategy": "default",
      "default": "postgresql"
    },
    {
      "key": "REDIS_HOST",
      "service": "dify-plugin-daemon",
      "description": "Redis private host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PORT",
      "service": "dify-plugin-daemon",
      "description": "Redis port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "SERVER_KEY",
      "service": "dify-plugin-daemon",
      "description": "Auto-generated plugin daemon server key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DB_DATABASE",
      "service": "dify-plugin-daemon",
      "description": "PostgreSQL database name",
      "secret": false,
      "strategy": "default",
      "default": "dify_plugin"
    },
    {
      "key": "DB_PASSWORD",
      "service": "dify-plugin-daemon",
      "description": "PostgreSQL password (referenced from the database service)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_SSL_MODE",
      "service": "dify-plugin-daemon",
      "description": "PostgreSQL SSL mode",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "DB_USERNAME",
      "service": "dify-plugin-daemon",
      "description": "PostgreSQL user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SERVER_PORT",
      "service": "dify-plugin-daemon",
      "description": "Plugin daemon HTTP port",
      "secret": false,
      "strategy": "default",
      "default": "5002"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "dify-plugin-daemon",
      "description": "Redis password (referenced from the Redis service)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DIFY_INNER_API_KEY",
      "service": "dify-plugin-daemon",
      "description": "Auto-generated inner API key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DIFY_INNER_API_URL",
      "service": "dify-plugin-daemon",
      "description": "Internal URL of the Dify API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PLUGIN_STORAGE_TYPE",
      "service": "dify-plugin-daemon",
      "description": "Plugin storage backend",
      "secret": false,
      "strategy": "default",
      "default": "local"
    },
    {
      "key": "PLUGIN_WORKING_PATH",
      "service": "dify-plugin-daemon",
      "description": "Working directory for plugins",
      "secret": false,
      "strategy": "default",
      "default": "/app/storage/cwd"
    },
    {
      "key": "PLUGIN_INSTALLED_PATH",
      "service": "dify-plugin-daemon",
      "description": "Subdirectory for installed plugins",
      "secret": false,
      "strategy": "default",
      "default": "plugin"
    },
    {
      "key": "MAX_PLUGIN_PACKAGE_SIZE",
      "service": "dify-plugin-daemon",
      "description": "Maximum plugin package size in bytes",
      "secret": false,
      "strategy": "default",
      "default": "52428800"
    },
    {
      "key": "PLUGIN_MEDIA_CACHE_PATH",
      "service": "dify-plugin-daemon",
      "description": "Subdirectory for plugin media cache",
      "secret": false,
      "strategy": "default",
      "default": "assets"
    },
    {
      "key": "PYTHON_ENV_INIT_TIMEOUT",
      "service": "dify-plugin-daemon",
      "description": "Timeout for Python env init (seconds)",
      "secret": false,
      "strategy": "default",
      "default": "120"
    },
    {
      "key": "FORCE_VERIFYING_SIGNATURE",
      "service": "dify-plugin-daemon",
      "description": "Require plugin signature verification",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PLUGIN_PACKAGE_CACHE_PATH",
      "service": "dify-plugin-daemon",
      "description": "Subdirectory for plugin package cache",
      "secret": false,
      "strategy": "default",
      "default": "plugin_packages"
    },
    {
      "key": "PLUGIN_STORAGE_LOCAL_ROOT",
      "service": "dify-plugin-daemon",
      "description": "Local root path for plugin storage",
      "secret": false,
      "strategy": "default",
      "default": "/app/storage"
    },
    {
      "key": "PLUGIN_MAX_EXECUTION_TIMEOUT",
      "service": "dify-plugin-daemon",
      "description": "Maximum plugin execution time (seconds)",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "PLUGIN_REMOTE_INSTALLING_HOST",
      "service": "dify-plugin-daemon",
      "description": "Bind host for remote plugin install",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "PLUGIN_REMOTE_INSTALLING_PORT",
      "service": "dify-plugin-daemon",
      "description": "Port for remote plugin install",
      "secret": false,
      "strategy": "default",
      "default": "5003"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "dify-self-hosted-openai-gpts-alternative"
      }
    },
    "cli": "railway deploy --template dify-self-hosted-openai-gpts-alternative",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1b41c49f-5c48-4f60-80be-8a1b957e6053",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "0ead0c81-6ac2-4271-a517-51ee783265bb": {
                  "icon": null,
                  "name": "worker",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "langgenius/dify-api:1.16.0"
                  },
                  "variables": {
                    "MODE": {
                      "isOptional": false,
                      "description": "Process role for this service (api or worker)",
                      "defaultValue": "worker"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "PostgreSQL private host",
                      "defaultValue": "${{pgvector.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "PostgreSQL port",
                      "defaultValue": "5432"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "Database engine type",
                      "defaultValue": "postgresql"
                    },
                    "REDIS_DB": {
                      "isOptional": false,
                      "description": "Redis database index",
                      "defaultValue": "0"
                    },
                    "LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Application log verbosity",
                      "defaultValue": "INFO"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "S3 region",
                      "defaultValue": "us-east-1"
                    },
                    "DEPLOY_ENV": {
                      "isOptional": false,
                      "description": "Deployment environment label",
                      "defaultValue": "PRODUCTION"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis private host",
                      "defaultValue": "${{redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis port",
                      "defaultValue": "6379"
                    },
                    "SECRET_KEY": {
                      "isOptional": false,
                      "description": "Secret used to sign sessions and tokens",
                      "defaultValue": "${{dify-api.SECRET_KEY}}"
                    },
                    "DB_DATABASE": {
                      "isOptional": false,
                      "description": "PostgreSQL database name",
                      "defaultValue": "dify"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "PostgreSQL password (referenced from the database service)",
                      "defaultValue": "${{pgvector.POSTGRES_PASSWORD}}"
                    },
                    "DB_SSL_MODE": {
                      "isOptional": false,
                      "description": "PostgreSQL SSL mode",
                      "defaultValue": "disable"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "PostgreSQL user",
                      "defaultValue": "postgres"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "MinIO/S3 endpoint URL",
                      "defaultValue": "http://${{minio.RAILWAY_PRIVATE_DOMAIN}}:9000"
                    },
                    "STORAGE_TYPE": {
                      "isOptional": false,
                      "description": "File storage backend (S3/MinIO)",
                      "defaultValue": "s3"
                    },
                    "VECTOR_STORE": {
                      "isOptional": false,
                      "description": "Vector store backend",
                      "defaultValue": "pgvector"
                    },
                    "PGVECTOR_HOST": {
                      "isOptional": false,
                      "description": "pgvector host",
                      "defaultValue": "${{pgvector.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGVECTOR_PORT": {
                      "isOptional": false,
                      "description": "pgvector port",
                      "defaultValue": "5432"
                    },
                    "PGVECTOR_USER": {
                      "isOptional": false,
                      "description": "pgvector user",
                      "defaultValue": "postgres"
                    },
                    "REDIS_USE_SSL": {
                      "isOptional": false,
                      "description": "Whether to connect to Redis over SSL",
                      "defaultValue": "false"
                    },
                    "S3_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "S3 access key",
                      "defaultValue": "minio"
                    },
                    "S3_SECRET_KEY": {
                      "isOptional": false,
                      "description": "S3 secret key (MinIO root password)",
                      "defaultValue": "${{minio.MINIO_ROOT_PASSWORD}}"
                    },
                    "BROKER_USE_SSL": {
                      "isOptional": false,
                      "description": "Whether the Celery broker uses SSL",
                      "defaultValue": "false"
                    },
                    "CELERY_BACKEND": {
                      "isOptional": false,
                      "description": "Celery result backend",
                      "defaultValue": "redis"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password (referenced from the Redis service)",
                      "defaultValue": "${{redis.REDIS_PASSWORD}}"
                    },
                    "S3_BUCKET_NAME": {
                      "isOptional": false,
                      "description": "S3 bucket for Dify files",
                      "defaultValue": "dify"
                    },
                    "MARKETPLACE_URL": {
                      "isOptional": false,
                      "description": "Dify marketplace URL",
                      "defaultValue": "https://marketplace.dify.ai"
                    },
                    "S3_ADDRESS_STYLE": {
                      "isOptional": false,
                      "description": "S3 addressing style (path or virtual)",
                      "defaultValue": "path"
                    },
                    "CELERY_BROKER_URL": {
                      "isOptional": false,
                      "description": "Celery broker connection string (Redis)",
                      "defaultValue": "redis://:${{redis.REDIS_PASSWORD}}@${{redis.RAILWAY_PRIVATE_DOMAIN}}:6379/1"
                    },
                    "MIGRATION_ENABLED": {
                      "isOptional": false,
                      "description": "Run database migrations on boot (api only)",
                      "defaultValue": "false"
                    },
                    "PGVECTOR_DATABASE": {
                      "isOptional": false,
                      "description": "pgvector database name",
                      "defaultValue": "dify"
                    },
                    "PGVECTOR_PASSWORD": {
                      "isOptional": false,
                      "description": "pgvector password",
                      "defaultValue": "${{pgvector.POSTGRES_PASSWORD}}"
                    },
                    "PLUGIN_DAEMON_KEY": {
                      "isOptional": false,
                      "description": "Key shared with the plugin daemon",
                      "defaultValue": "${{dify-plugin-daemon.SERVER_KEY}}"
                    },
                    "PLUGIN_DAEMON_URL": {
                      "isOptional": false,
                      "description": "Plugin daemon internal URL",
                      "defaultValue": "http://${{dify-plugin-daemon.RAILWAY_PRIVATE_DOMAIN}}:5002"
                    },
                    "MARKETPLACE_API_URL": {
                      "isOptional": false,
                      "description": "Dify marketplace API URL",
                      "defaultValue": "https://marketplace.dify.ai"
                    },
                    "MARKETPLACE_ENABLED": {
                      "isOptional": false,
                      "description": "Enable the Dify plugin marketplace",
                      "defaultValue": "true"
                    },
                    "SSRF_PROXY_HTTP_URL": {
                      "isOptional": false,
                      "description": "SSRF proxy HTTP URL",
                      "defaultValue": "http://${{squid.RAILWAY_PRIVATE_DOMAIN}}:3128"
                    },
                    "SQLALCHEMY_POOL_SIZE": {
                      "isOptional": false,
                      "description": "SQLAlchemy connection pool size",
                      "defaultValue": "30"
                    },
                    "SSRF_PROXY_HTTPS_URL": {
                      "isOptional": false,
                      "description": "SSRF proxy HTTPS URL",
                      "defaultValue": "http://${{squid.RAILWAY_PRIVATE_DOMAIN}}:3128"
                    },
                    "CODE_EXECUTION_API_KEY": {
                      "isOptional": false,
                      "description": "API key shared with the sandbox service",
                      "defaultValue": "${{dify-sandbox.API_KEY}}"
                    },
                    "S3_USE_AWS_MANAGED_IAM": {
                      "isOptional": false,
                      "description": "Use AWS-managed IAM for S3 auth",
                      "defaultValue": "false"
                    },
                    "CODE_EXECUTION_ENDPOINT": {
                      "isOptional": false,
                      "description": "Dify sandbox code-execution endpoint",
                      "defaultValue": "http://${{dify-sandbox.RAILWAY_PRIVATE_DOMAIN}}:8194"
                    },
                    "PGVECTOR_MAX_CONNECTION": {
                      "isOptional": false,
                      "description": "Maximum pgvector connections",
                      "defaultValue": "5"
                    },
                    "PGVECTOR_MIN_CONNECTION": {
                      "isOptional": false,
                      "description": "Minimum pgvector connections",
                      "defaultValue": "1"
                    },
                    "PLUGIN_MAX_PACKAGE_SIZE": {
                      "isOptional": false,
                      "description": "Maximum plugin package size in bytes",
                      "defaultValue": "52428800"
                    },
                    "SQLALCHEMY_POOL_RECYCLE": {
                      "isOptional": false,
                      "description": "Seconds before a pooled DB connection is recycled",
                      "defaultValue": "3600"
                    },
                    "INNER_API_KEY_FOR_PLUGIN": {
                      "isOptional": false,
                      "description": "Inner API key for plugin-to-API calls",
                      "defaultValue": "${{dify-plugin-daemon.DIFY_INNER_API_KEY}}"
                    },
                    "VECTOR_INDEX_NAME_PREFIX": {
                      "isOptional": false,
                      "description": "Prefix for vector index names",
                      "defaultValue": "Vector_index"
                    },
                    "CODE_EXECUTION_SSL_VERIFY": {
                      "isOptional": false,
                      "description": "Verify SSL on code-execution calls",
                      "defaultValue": "false"
                    }
                  }
                },
                "1c116dd6-9b8c-498a-900b-3ab1ecae126e": {
                  "icon": null,
                  "name": "dify-api",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "langgenius/dify-api:1.16.0"
                  },
                  "variables": {
                    "MODE": {
                      "isOptional": false,
                      "description": "Process role for this service (api or worker)",
                      "defaultValue": "api"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Railway routes the public domain to",
                      "defaultValue": "5001"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "PostgreSQL private host",
                      "defaultValue": "${{pgvector.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "PostgreSQL port",
                      "defaultValue": "5432"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "Database engine type",
                      "defaultValue": "postgresql"
                    },
                    "REDIS_DB": {
                      "isOptional": false,
                      "description": "Redis database index",
                      "defaultValue": "0"
                    },
                    "DIFY_PORT": {
                      "isOptional": false,
                      "description": "Port the Dify API listens on",
                      "defaultValue": "5001"
                    },
                    "FILES_URL": {
                      "isOptional": false,
                      "description": "Public URL used for file downloads",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Application log verbosity",
                      "defaultValue": "INFO"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "S3 region",
                      "defaultValue": "us-east-1"
                    },
                    "DEPLOY_ENV": {
                      "isOptional": false,
                      "description": "Deployment environment label",
                      "defaultValue": "PRODUCTION"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis private host",
                      "defaultValue": "${{redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis port",
                      "defaultValue": "6379"
                    },
                    "SECRET_KEY": {
                      "isOptional": false,
                      "description": "Secret used to sign sessions and tokens",
                      "defaultValue": "{{SECRET_KEY}}"
                    },
                    "APP_API_URL": {
                      "isOptional": false,
                      "description": "Public URL of the app/backend API",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "APP_WEB_URL": {
                      "isOptional": false,
                      "description": "Public URL for published apps",
                      "defaultValue": "https://${{dify-web.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_DATABASE": {
                      "isOptional": false,
                      "description": "PostgreSQL database name",
                      "defaultValue": "dify"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "PostgreSQL password (referenced from the database service)",
                      "defaultValue": "${{pgvector.POSTGRES_PASSWORD}}"
                    },
                    "DB_SSL_MODE": {
                      "isOptional": false,
                      "description": "PostgreSQL SSL mode",
                      "defaultValue": "disable"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "PostgreSQL user",
                      "defaultValue": "postgres"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "MinIO/S3 endpoint URL",
                      "defaultValue": "http://${{minio.RAILWAY_PRIVATE_DOMAIN}}:9000"
                    },
                    "STORAGE_TYPE": {
                      "isOptional": false,
                      "description": "File storage backend (S3/MinIO)",
                      "defaultValue": "s3"
                    },
                    "VECTOR_STORE": {
                      "isOptional": false,
                      "description": "Vector store backend",
                      "defaultValue": "pgvector"
                    },
                    "PGVECTOR_HOST": {
                      "isOptional": false,
                      "description": "pgvector host",
                      "defaultValue": "${{pgvector.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGVECTOR_PORT": {
                      "isOptional": false,
                      "description": "pgvector port",
                      "defaultValue": "5432"
                    },
                    "PGVECTOR_USER": {
                      "isOptional": false,
                      "description": "pgvector user",
                      "defaultValue": "postgres"
                    },
                    "REDIS_USE_SSL": {
                      "isOptional": false,
                      "description": "Whether to connect to Redis over SSL",
                      "defaultValue": "false"
                    },
                    "S3_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "S3 access key",
                      "defaultValue": "minio"
                    },
                    "S3_SECRET_KEY": {
                      "isOptional": false,
                      "description": "S3 secret key (MinIO root password)",
                      "defaultValue": "${{minio.MINIO_ROOT_PASSWORD}}"
                    },
                    "BROKER_USE_SSL": {
                      "isOptional": false,
                      "description": "Whether the Celery broker uses SSL",
                      "defaultValue": "false"
                    },
                    "CELERY_BACKEND": {
                      "isOptional": false,
                      "description": "Celery result backend",
                      "defaultValue": "redis"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password (referenced from the Redis service)",
                      "defaultValue": "${{redis.REDIS_PASSWORD}}"
                    },
                    "S3_BUCKET_NAME": {
                      "isOptional": false,
                      "description": "S3 bucket for Dify files",
                      "defaultValue": "dify"
                    },
                    "CONSOLE_API_URL": {
                      "isOptional": false,
                      "description": "Public URL of the console API",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CONSOLE_WEB_URL": {
                      "isOptional": false,
                      "description": "Public URL of the web console",
                      "defaultValue": "https://${{dify-web.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "MARKETPLACE_URL": {
                      "isOptional": false,
                      "description": "Dify marketplace URL",
                      "defaultValue": "https://marketplace.dify.ai"
                    },
                    "SERVICE_API_URL": {
                      "isOptional": false,
                      "description": "Public URL of the service API",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "S3_ADDRESS_STYLE": {
                      "isOptional": false,
                      "description": "S3 addressing style (path or virtual)",
                      "defaultValue": "path"
                    },
                    "CELERY_BROKER_URL": {
                      "isOptional": false,
                      "description": "Celery broker connection string (Redis)",
                      "defaultValue": "redis://:${{redis.REDIS_PASSWORD}}@${{redis.RAILWAY_PRIVATE_DOMAIN}}:6379/1"
                    },
                    "DIFY_BIND_ADDRESS": {
                      "isOptional": false,
                      "description": "Address the API server binds to",
                      "defaultValue": "0.0.0.0"
                    },
                    "MIGRATION_ENABLED": {
                      "isOptional": false,
                      "description": "Run database migrations on boot (api only)",
                      "defaultValue": "true"
                    },
                    "PGVECTOR_DATABASE": {
                      "isOptional": false,
                      "description": "pgvector database name",
                      "defaultValue": "dify"
                    },
                    "PGVECTOR_PASSWORD": {
                      "isOptional": false,
                      "description": "pgvector password",
                      "defaultValue": "${{pgvector.POSTGRES_PASSWORD}}"
                    },
                    "PLUGIN_DAEMON_KEY": {
                      "isOptional": false,
                      "description": "Key shared with the plugin daemon",
                      "defaultValue": "${{dify-plugin-daemon.SERVER_KEY}}"
                    },
                    "PLUGIN_DAEMON_URL": {
                      "isOptional": false,
                      "description": "Plugin daemon internal URL",
                      "defaultValue": "http://${{dify-plugin-daemon.RAILWAY_PRIVATE_DOMAIN}}:5002"
                    },
                    "INTERNAL_FILES_URL": {
                      "isOptional": false,
                      "description": "Internal URL for file access between services",
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:5001"
                    },
                    "MARKETPLACE_API_URL": {
                      "isOptional": false,
                      "description": "Dify marketplace API URL",
                      "defaultValue": "https://marketplace.dify.ai"
                    },
                    "MARKETPLACE_ENABLED": {
                      "isOptional": false,
                      "description": "Enable the Dify plugin marketplace",
                      "defaultValue": "true"
                    },
                    "SSRF_PROXY_HTTP_URL": {
                      "isOptional": false,
                      "description": "SSRF proxy HTTP URL",
                      "defaultValue": "http://${{squid.RAILWAY_PRIVATE_DOMAIN}}:3128"
                    },
                    "SQLALCHEMY_POOL_SIZE": {
                      "isOptional": false,
                      "description": "SQLAlchemy connection pool size",
                      "defaultValue": "30"
                    },
                    "SSRF_PROXY_HTTPS_URL": {
                      "isOptional": false,
                      "description": "SSRF proxy HTTPS URL",
                      "defaultValue": "http://${{squid.RAILWAY_PRIVATE_DOMAIN}}:3128"
                    },
                    "CODE_EXECUTION_API_KEY": {
                      "isOptional": false,
                      "description": "API key shared with the sandbox service",
                      "defaultValue": "${{dify-sandbox.API_KEY}}"
                    },
                    "S3_USE_AWS_MANAGED_IAM": {
                      "isOptional": false,
                      "description": "Use AWS-managed IAM for S3 auth",
                      "defaultValue": "false"
                    },
                    "CODE_EXECUTION_ENDPOINT": {
                      "isOptional": false,
                      "description": "Dify sandbox code-execution endpoint",
                      "defaultValue": "http://${{dify-sandbox.RAILWAY_PRIVATE_DOMAIN}}:8194"
                    },
                    "PGVECTOR_MAX_CONNECTION": {
                      "isOptional": false,
                      "description": "Maximum pgvector connections",
                      "defaultValue": "5"
                    },
                    "PGVECTOR_MIN_CONNECTION": {
                      "isOptional": false,
                      "description": "Minimum pgvector connections",
                      "defaultValue": "1"
                    },
                    "PLUGIN_MAX_PACKAGE_SIZE": {
                      "isOptional": false,
                      "description": "Maximum plugin package size in bytes",
                      "defaultValue": "52428800"
                    },
                    "SQLALCHEMY_POOL_RECYCLE": {
                      "isOptional": false,
                      "description": "Seconds before a pooled DB connection is recycled",
                      "defaultValue": "3600"
                    },
                    "INNER_API_KEY_FOR_PLUGIN": {
                      "isOptional": false,
                      "description": "Inner API key for plugin-to-API calls",
                      "defaultValue": "${{dify-plugin-daemon.DIFY_INNER_API_KEY}}"
                    },
                    "VECTOR_INDEX_NAME_PREFIX": {
                      "isOptional": false,
                      "description": "Prefix for vector index names",
                      "defaultValue": "Vector_index"
                    },
                    "CODE_EXECUTION_SSL_VERIFY": {
                      "isOptional": false,
                      "description": "Verify SSL on code-execution calls",
                      "defaultValue": "false"
                    },
                    "CONSOLE_CORS_ALLOW_ORIGINS": {
                      "isOptional": false,
                      "description": "Allowed CORS origins for the console",
                      "defaultValue": "*"
                    },
                    "PLUGIN_REMOTE_INSTALL_HOST": {
                      "isOptional": false,
                      "description": "Plugin daemon host for remote install",
                      "defaultValue": "${{dify-plugin-daemon.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PLUGIN_REMOTE_INSTALL_PORT": {
                      "isOptional": false,
                      "description": "Plugin daemon port for remote install",
                      "defaultValue": "5003"
                    },
                    "WEB_API_CORS_ALLOW_ORIGINS": {
                      "isOptional": false,
                      "description": "Allowed CORS origins for the web API",
                      "defaultValue": "*"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "27ba63b2-a895-474f-9ecc-197adda0e5b3": {
                  "icon": null,
                  "name": "dify-web",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "langgenius/dify-web:1.16.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Railway routes the public domain to",
                      "defaultValue": "3000"
                    },
                    "HOSTNAME": {
                      "isOptional": false,
                      "description": "Host the web server binds to",
                      "defaultValue": "0.0.0.0"
                    },
                    "APP_API_URL": {
                      "isOptional": false,
                      "description": "Public URL of the app/backend API",
                      "defaultValue": "https://${{dify-api.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CONSOLE_API_URL": {
                      "isOptional": false,
                      "description": "Public URL of the console API",
                      "defaultValue": "https://${{dify-api.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "MARKETPLACE_URL": {
                      "isOptional": false,
                      "description": "Dify marketplace URL",
                      "defaultValue": "https://marketplace.dify.ai"
                    },
                    "MARKETPLACE_API_URL": {
                      "isOptional": false,
                      "description": "Dify marketplace API URL",
                      "defaultValue": "https://marketplace.dify.ai"
                    },
                    "NEXT_TELEMETRY_DISABLED": {
                      "isOptional": false,
                      "description": "Disable Next.js telemetry",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "88773136-c724-483e-977d-065f87707538": {
                  "icon": null,
                  "name": "pgvector",
                  "deploy": {
                    "startCommand": "sh -c \"echo 'CREATE DATABASE dify_plugin;' > /docker-entrypoint-initdb.d/10-dify-plugin.sql; exec docker-entrypoint.sh postgres\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "pgvector/pgvector:pg16"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "PostgreSQL data directory (subdir avoids init error)",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Primary Dify database name",
                      "defaultValue": "dify"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "PostgreSQL superuser name",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated PostgreSQL password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "88773136-c724-483e-977d-065f87707538": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "8c1eb83e-567d-4aaf-9b9c-c952b622c316": {
                  "icon": null,
                  "name": "squid",
                  "deploy": {
                    "startCommand": "sh -c \"printf 'http_port 3128\\nacl all src all\\nhttp_access allow all\\ncoredump_dir /var/spool/squid\\ndns_v4_first on\\nrequest_timeout 2 minutes\\n' > /etc/squid/squid.conf && exec /usr/sbin/squid -f /etc/squid/squid.conf -NYC 1\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ubuntu/squid:latest"
                  },
                  "variables": {}
                },
                "b1cfed5a-c1b3-4078-b17b-88b3e8a08fb8": {
                  "icon": null,
                  "name": "minio",
                  "deploy": {
                    "startCommand": "sh -c 'mkdir -p /data/dify && minio server --address \":9000\" --console-address \":9001\" /data'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "minio/minio:RELEASE.2025-04-08T15-41-24Z"
                  },
                  "variables": {
                    "MINIO_ROOT_USER": {
                      "isOptional": false,
                      "description": "MinIO root username",
                      "defaultValue": "minio"
                    },
                    "MINIO_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated MinIO root password",
                      "defaultValue": "{{MINIO_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "b1cfed5a-c1b3-4078-b17b-88b3e8a08fb8": {
                      "mountPath": "/data"
                    }
                  }
                },
                "c49556cd-3a0e-4839-990f-4e6740a63d0b": {
                  "icon": null,
                  "name": "redis",
                  "deploy": {
                    "startCommand": "sh -c 'redis-server --requirepass \"$REDIS_PASSWORD\"'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:6-alpine"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password (referenced from the Redis service)",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "c49556cd-3a0e-4839-990f-4e6740a63d0b": {
                      "mountPath": "/data"
                    }
                  }
                },
                "e8b7acb8-164f-4a17-9d44-d8af12616b5d": {
                  "icon": null,
                  "name": "dify-sandbox",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "langgenius/dify-sandbox:0.2.15"
                  },
                  "variables": {
                    "API_KEY": {
                      "isOptional": false,
                      "description": "Auto-generated key the API uses to call the sandbox",
                      "defaultValue": "{{API_KEY}}"
                    },
                    "GIN_MODE": {
                      "isOptional": false,
                      "description": "Gin web framework run mode",
                      "defaultValue": "release"
                    },
                    "HTTP_PROXY": {
                      "isOptional": false,
                      "description": "HTTP proxy for sandboxed outbound calls",
                      "defaultValue": "http://${{squid.RAILWAY_PRIVATE_DOMAIN}}:3128"
                    },
                    "HTTPS_PROXY": {
                      "isOptional": false,
                      "description": "HTTPS proxy for sandboxed outbound calls",
                      "defaultValue": "http://${{squid.RAILWAY_PRIVATE_DOMAIN}}:3128"
                    },
                    "SANDBOX_PORT": {
                      "isOptional": false,
                      "description": "Port the sandbox service listens on",
                      "defaultValue": "8194"
                    },
                    "ENABLE_NETWORK": {
                      "isOptional": false,
                      "description": "Allow network access from sandboxed code",
                      "defaultValue": "true"
                    },
                    "WORKER_TIMEOUT": {
                      "isOptional": false,
                      "description": "Sandbox worker timeout in seconds",
                      "defaultValue": "15"
                    }
                  }
                },
                "f9189bab-b8fe-48ad-9377-1272def4bd3f": {
                  "icon": null,
                  "name": "dify-plugin-daemon",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "langgenius/dify-plugin-daemon:0.6.3-local"
                  },
                  "variables": {
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "PostgreSQL private host",
                      "defaultValue": "${{pgvector.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "PostgreSQL port",
                      "defaultValue": "5432"
                    },
                    "DB_TYPE": {
                      "isOptional": false,
                      "description": "Database engine type",
                      "defaultValue": "postgresql"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis private host",
                      "defaultValue": "${{redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis port",
                      "defaultValue": "6379"
                    },
                    "SERVER_KEY": {
                      "isOptional": false,
                      "description": "Auto-generated plugin daemon server key",
                      "defaultValue": "{{SERVER_KEY}}"
                    },
                    "DB_DATABASE": {
                      "isOptional": false,
                      "description": "PostgreSQL database name",
                      "defaultValue": "dify_plugin"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "PostgreSQL password (referenced from the database service)",
                      "defaultValue": "${{pgvector.POSTGRES_PASSWORD}}"
                    },
                    "DB_SSL_MODE": {
                      "isOptional": false,
                      "description": "PostgreSQL SSL mode",
                      "defaultValue": "disable"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "PostgreSQL user",
                      "defaultValue": "postgres"
                    },
                    "SERVER_PORT": {
                      "isOptional": false,
                      "description": "Plugin daemon HTTP port",
                      "defaultValue": "5002"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password (referenced from the Redis service)",
                      "defaultValue": "${{redis.REDIS_PASSWORD}}"
                    },
                    "DIFY_INNER_API_KEY": {
                      "isOptional": false,
                      "description": "Auto-generated inner API key",
                      "defaultValue": "{{DIFY_INNER_API_KEY}}"
                    },
                    "DIFY_INNER_API_URL": {
                      "isOptional": false,
                      "description": "Internal URL of the Dify API",
                      "defaultValue": "http://${{dify-api.RAILWAY_PRIVATE_DOMAIN}}:5001"
                    },
                    "PLUGIN_STORAGE_TYPE": {
                      "isOptional": false,
                      "description": "Plugin storage backend",
                      "defaultValue": "local"
                    },
                    "PLUGIN_WORKING_PATH": {
                      "isOptional": false,
                      "description": "Working directory for plugins",
                      "defaultValue": "/app/storage/cwd"
                    },
                    "PLUGIN_INSTALLED_PATH": {
                      "isOptional": false,
                      "description": "Subdirectory for installed plugins",
                      "defaultValue": "plugin"
                    },
                    "MAX_PLUGIN_PACKAGE_SIZE": {
                      "isOptional": false,
                      "description": "Maximum plugin package size in bytes",
                      "defaultValue": "52428800"
                    },
                    "PLUGIN_MEDIA_CACHE_PATH": {
                      "isOptional": false,
                      "description": "Subdirectory for plugin media cache",
                      "defaultValue": "assets"
                    },
                    "PYTHON_ENV_INIT_TIMEOUT": {
                      "isOptional": false,
                      "description": "Timeout for Python env init (seconds)",
                      "defaultValue": "120"
                    },
                    "FORCE_VERIFYING_SIGNATURE": {
                      "isOptional": false,
                      "description": "Require plugin signature verification",
                      "defaultValue": "true"
                    },
                    "PLUGIN_PACKAGE_CACHE_PATH": {
                      "isOptional": false,
                      "description": "Subdirectory for plugin package cache",
                      "defaultValue": "plugin_packages"
                    },
                    "PLUGIN_STORAGE_LOCAL_ROOT": {
                      "isOptional": false,
                      "description": "Local root path for plugin storage",
                      "defaultValue": "/app/storage"
                    },
                    "PLUGIN_MAX_EXECUTION_TIMEOUT": {
                      "isOptional": false,
                      "description": "Maximum plugin execution time (seconds)",
                      "defaultValue": "600"
                    },
                    "PLUGIN_REMOTE_INSTALLING_HOST": {
                      "isOptional": false,
                      "description": "Bind host for remote plugin install",
                      "defaultValue": "0.0.0.0"
                    },
                    "PLUGIN_REMOTE_INSTALLING_PORT": {
                      "isOptional": false,
                      "description": "Port for remote plugin install",
                      "defaultValue": "5003"
                    }
                  },
                  "volumeMounts": {
                    "f9189bab-b8fe-48ad-9377-1272def4bd3f": {
                      "mountPath": "/app/storage"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 9,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-19T16:03:37.931Z",
  "success_rate_30d": 0.1667,
  "validation": {
    "last_run_id": "run_0c68150597d3493cbae2",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "QUEUED,DEPLOYING,DEPLOYING,FAILED,QUEUED,QUEUED,DEPLOYING,DEPLOYING,QUEUED"
      }
    ],
    "typical_ready_seconds": 77,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "worker"
  }
}
