{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b6ee3d43-6f37-4b19-b7b5-b139cc056811",
    "slug": "librechat-meilisearch-rag",
    "name": "LibreChat + Meilisearch + RAG",
    "description": "LibreChat with Meilisearch search and a keyless RAG API for file chat",
    "url": "https://railway.com/deploy/librechat-meilisearch-rag",
    "upstream": {
      "image": "ghcr.io/danny-avila/librechat:v0.8.7"
    }
  },
  "services": [
    {
      "name": "LibreChat",
      "source": {
        "image": "ghcr.io/danny-avila/librechat:v0.8.7"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/uploads",
      "http": true
    },
    {
      "name": "Meilisearch",
      "source": {
        "image": "getmeili/meilisearch:v1.35.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/meili_data",
      "http": false
    },
    {
      "name": "MongoDB",
      "source": {
        "image": "mongo:8.0.20"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/db",
      "http": false
    },
    {
      "name": "RAG-API",
      "source": {
        "image": "ghcr.io/danny-avila/librechat-rag-api-dev:v0.8.0"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "VectorDB",
      "source": {
        "image": "pgvector/pgvector:pg16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "HOST",
      "service": "LibreChat",
      "description": "Provide a value for HOST.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "PORT",
      "service": "LibreChat",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3080"
    },
    {
      "key": "SEARCH",
      "service": "LibreChat",
      "description": "Provide a value for SEARCH.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "CREDS_IV",
      "service": "LibreChat",
      "description": "32-char hex initialization vector paired with CREDS_KEY. Required.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAG_PORT",
      "service": "LibreChat",
      "description": "Provide a value for RAG_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "CREDS_KEY",
      "service": "LibreChat",
      "description": "64-char hex key used to encrypt stored API credentials. Required - app crashes if missing.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MONGO_URI",
      "service": "LibreChat",
      "description": "Provide a value for MONGO_URI.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GOOGLE_KEY",
      "service": "LibreChat",
      "description": "Set to your Google AI key to enable Gemini models, or leave as user_provided.",
      "secret": true,
      "strategy": "default",
      "default": "user_provided"
    },
    {
      "key": "JWT_SECRET",
      "service": "LibreChat",
      "description": "Signing secret for access tokens. Required.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEILI_HOST",
      "service": "LibreChat",
      "description": "Provide a value for MEILI_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAG_API_URL",
      "service": "LibreChat",
      "description": "Internal URL of the RAG API service. Enables document upload + retrieval-augmented chat.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DOMAIN_CLIENT",
      "service": "LibreChat",
      "description": "Provide a value for DOMAIN_CLIENT.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DOMAIN_SERVER",
      "service": "LibreChat",
      "description": "Provide a value for DOMAIN_SERVER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "OPENAI_API_KEY",
      "service": "LibreChat",
      "description": "Set to your OpenAI key to enable OpenAI models, or leave as user_provided to let users enter their own.",
      "secret": true,
      "strategy": "default",
      "default": "user_provided"
    },
    {
      "key": "MEILI_MASTER_KEY",
      "service": "LibreChat",
      "description": "Provide a value for MEILI_MASTER_KEY.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOW_EMAIL_LOGIN",
      "service": "LibreChat",
      "description": "Provide a value for ALLOW_EMAIL_LOGIN.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ANTHROPIC_API_KEY",
      "service": "LibreChat",
      "description": "Set to your Anthropic key to enable Claude models, or leave as user_provided.",
      "secret": true,
      "strategy": "default",
      "default": "user_provided"
    },
    {
      "key": "ALLOW_REGISTRATION",
      "service": "LibreChat",
      "description": "Provide a value for ALLOW_REGISTRATION.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "JWT_REFRESH_SECRET",
      "service": "LibreChat",
      "description": "Signing secret for refresh tokens. Required.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEILI_NO_ANALYTICS",
      "service": "LibreChat",
      "description": "Provide a value for MEILI_NO_ANALYTICS.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PORT",
      "service": "Meilisearch",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "7700"
    },
    {
      "key": "MEILI_ENV",
      "service": "Meilisearch",
      "description": "Provide a value for MEILI_ENV.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "MEILI_HTTP_ADDR",
      "service": "Meilisearch",
      "description": "Provide a value for MEILI_HTTP_ADDR.",
      "secret": false,
      "strategy": "default",
      "default": "[::]:7700"
    },
    {
      "key": "MEILI_MASTER_KEY",
      "service": "Meilisearch",
      "description": "Provide a value for MEILI_MASTER_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEILI_NO_ANALYTICS",
      "service": "Meilisearch",
      "description": "Provide a value for MEILI_NO_ANALYTICS.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DB_HOST",
      "service": "RAG-API",
      "description": "Provide a value for DB_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PORT",
      "service": "RAG-API",
      "description": "Provide a value for DB_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "RAG_HOST",
      "service": "RAG-API",
      "description": "Bind address. '::' makes the API reachable over Railway's IPv6 private network.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "RAG_PORT",
      "service": "RAG-API",
      "description": "Provide a value for RAG_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "POSTGRES_DB",
      "service": "RAG-API",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "RAG-API",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "EMBEDDINGS_MODEL",
      "service": "RAG-API",
      "description": "Local embedding model downloaded on first boot. Only used when EMBEDDINGS_PROVIDER=huggingface.",
      "secret": false,
      "strategy": "default",
      "default": "sentence-transformers/all-MiniLM-L6-v2"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "RAG-API",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "EMBEDDINGS_PROVIDER",
      "service": "RAG-API",
      "description": "Embeds documents with a local model (sentence-transformers) so the stack needs NO API key out of the box. Set to 'openai' (and provide RAG_OPENAI_API_KEY) for faster/higher-quality cloud embeddings.",
      "secret": false,
      "strategy": "default",
      "default": "huggingface"
    },
    {
      "key": "PGDATA",
      "service": "VectorDB",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "VectorDB",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "default",
      "default": "librechat"
    },
    {
      "key": "POSTGRES_USER",
      "service": "VectorDB",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "librechat"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "VectorDB",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "librechat-meilisearch-rag"
      }
    },
    "cli": "railway deploy --template librechat-meilisearch-rag",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b6ee3d43-6f37-4b19-b7b5-b139cc056811",
            "serializedConfig": {
              "services": {
                "0a6f793a-1e65-430f-a3f3-f217a5b2d6c9": {
                  "icon": "https://raw.githubusercontent.com/danny-avila/LibreChat/main/client/public/assets/logo.svg",
                  "name": "LibreChat",
                  "deploy": {
                    "healthcheckPath": "/health",
                    "requiredMountPath": "/app/uploads",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 5
                  },
                  "source": {
                    "image": "ghcr.io/danny-avila/librechat:v0.8.7"
                  },
                  "variables": {
                    "HOST": {
                      "defaultValue": "0.0.0.0"
                    },
                    "PORT": {
                      "defaultValue": "3080"
                    },
                    "SEARCH": {
                      "defaultValue": "true"
                    },
                    "CREDS_IV": {
                      "description": "32-char hex initialization vector paired with CREDS_KEY. Required.",
                      "defaultValue": "{{CREDS_IV}}"
                    },
                    "RAG_PORT": {
                      "defaultValue": "8000"
                    },
                    "CREDS_KEY": {
                      "description": "64-char hex key used to encrypt stored API credentials. Required - app crashes if missing.",
                      "defaultValue": "{{CREDS_KEY}}"
                    },
                    "MONGO_URI": {
                      "defaultValue": "mongodb://${{MongoDB.RAILWAY_PRIVATE_DOMAIN}}:27017/LibreChat"
                    },
                    "GOOGLE_KEY": {
                      "isOptional": true,
                      "description": "Set to your Google AI key to enable Gemini models, or leave as user_provided.",
                      "defaultValue": "user_provided"
                    },
                    "JWT_SECRET": {
                      "description": "Signing secret for access tokens. Required.",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "MEILI_HOST": {
                      "defaultValue": "http://${{Meilisearch.RAILWAY_PRIVATE_DOMAIN}}:7700"
                    },
                    "RAG_API_URL": {
                      "description": "Internal URL of the RAG API service. Enables document upload + retrieval-augmented chat.",
                      "defaultValue": "http://${{RAG-API.RAILWAY_PRIVATE_DOMAIN}}:8000"
                    },
                    "DOMAIN_CLIENT": {
                      "defaultValue": "https://${{LibreChat.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DOMAIN_SERVER": {
                      "defaultValue": "https://${{LibreChat.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Set to your OpenAI key to enable OpenAI models, or leave as user_provided to let users enter their own.",
                      "defaultValue": "user_provided"
                    },
                    "MEILI_MASTER_KEY": {
                      "defaultValue": "${{Meilisearch.MEILI_MASTER_KEY}}"
                    },
                    "ALLOW_EMAIL_LOGIN": {
                      "defaultValue": "true"
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Set to your Anthropic key to enable Claude models, or leave as user_provided.",
                      "defaultValue": "user_provided"
                    },
                    "ALLOW_REGISTRATION": {
                      "defaultValue": "true"
                    },
                    "JWT_REFRESH_SECRET": {
                      "description": "Signing secret for refresh tokens. Required.",
                      "defaultValue": "{{JWT_REFRESH_SECRET}}"
                    },
                    "MEILI_NO_ANALYTICS": {
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "librechat-dom": {
                        "port": 3080
                      }
                    }
                  },
                  "volumeMounts": {
                    "01b434bb-e707-4f29-93d0-8a26073fecf7": {
                      "mountPath": "/app/uploads"
                    }
                  }
                },
                "13f2a3b4-7910-488c-94fa-d658daf8acff": {
                  "icon": "https://cdn.simpleicons.org/meilisearch",
                  "name": "Meilisearch",
                  "deploy": {
                    "healthcheckPath": "/health",
                    "requiredMountPath": "/meili_data",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 100,
                    "restartPolicyMaxRetries": 5
                  },
                  "source": {
                    "image": "getmeili/meilisearch:v1.35.1"
                  },
                  "variables": {
                    "PORT": {
                      "defaultValue": "7700"
                    },
                    "MEILI_ENV": {
                      "defaultValue": "production"
                    },
                    "MEILI_HTTP_ADDR": {
                      "defaultValue": "[::]:7700"
                    },
                    "MEILI_MASTER_KEY": {
                      "defaultValue": "{{MEILI_MASTER_KEY}}"
                    },
                    "MEILI_NO_ANALYTICS": {
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "32466dcf-ab4d-44d9-a240-af090d6175c7": {
                      "mountPath": "/meili_data"
                    }
                  }
                },
                "30a3fb0f-805e-4a44-ad13-52adf6a4fbf8": {
                  "icon": "https://devicons.railway.app/i/mongodb.svg",
                  "name": "MongoDB",
                  "deploy": {
                    "startCommand": "mongod --ipv6 --bind_ip ::,0.0.0.0 --setParameter diagnosticDataCollectionEnabled=false",
                    "requiredMountPath": "/data/db",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 5
                  },
                  "source": {
                    "image": "mongo:8.0.20"
                  },
                  "variables": {},
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "adbbbc44-8045-4427-aac4-90856cc7d94e": {
                      "mountPath": "/data/db"
                    }
                  }
                },
                "69c7d17d-1307-403e-98f7-377f9e82760d": {
                  "icon": "https://raw.githubusercontent.com/danny-avila/LibreChat/main/client/public/assets/logo.svg",
                  "name": "RAG-API",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 5
                  },
                  "source": {
                    "image": "ghcr.io/danny-avila/librechat-rag-api-dev:v0.8.0"
                  },
                  "variables": {
                    "DB_HOST": {
                      "defaultValue": "${{VectorDB.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PORT": {
                      "defaultValue": "5432"
                    },
                    "RAG_HOST": {
                      "description": "Bind address. '::' makes the API reachable over Railway's IPv6 private network.",
                      "defaultValue": "::"
                    },
                    "RAG_PORT": {
                      "defaultValue": "8000"
                    },
                    "POSTGRES_DB": {
                      "defaultValue": "${{VectorDB.POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "defaultValue": "${{VectorDB.POSTGRES_USER}}"
                    },
                    "EMBEDDINGS_MODEL": {
                      "description": "Local embedding model downloaded on first boot. Only used when EMBEDDINGS_PROVIDER=huggingface.",
                      "defaultValue": "sentence-transformers/all-MiniLM-L6-v2"
                    },
                    "POSTGRES_PASSWORD": {
                      "defaultValue": "${{VectorDB.POSTGRES_PASSWORD}}"
                    },
                    "RAG_OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Only needed if you switch EMBEDDINGS_PROVIDER to 'openai'. Leave blank to use the default keyless local embeddings.",
                      "defaultValue": ""
                    },
                    "EMBEDDINGS_PROVIDER": {
                      "description": "Embeds documents with a local model (sentence-transformers) so the stack needs NO API key out of the box. Set to 'openai' (and provide RAG_OPENAI_API_KEY) for faster/higher-quality cloud embeddings.",
                      "defaultValue": "huggingface"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  }
                },
                "a81f401d-b1a6-4c2c-b6a3-1abb2644f23e": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "VectorDB",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh postgres -c \"listen_addresses=*\"",
                    "requiredMountPath": "/var/lib/postgresql/data",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 5
                  },
                  "source": {
                    "image": "pgvector/pgvector:pg16"
                  },
                  "variables": {
                    "PGDATA": {
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "defaultValue": "librechat"
                    },
                    "POSTGRES_USER": {
                      "defaultValue": "librechat"
                    },
                    "POSTGRES_PASSWORD": {
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "1b189c1e-a52b-4c7b-81ea-d3ed8fcc322e": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "LibreChat",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T04:14:46.774Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-21T02:06:59.279Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_772662dc790646fc827f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 193,
    "typical_build_seconds": 0,
    "typical_start_seconds": 41,
    "slowest_service": "LibreChat"
  }
}
