{
  "manifest_version": "1.0.0",
  "template": {
    "id": "df7f9a82-1e75-4bc5-8889-01e88aff94fe",
    "slug": "flowise-or-build-ai-agents-w-db",
    "name": "Flowise | Build AI Agents [Postgres Included]",
    "description": "[Jun '26] Low-code developer tool for building LLM Applications",
    "url": "https://railway.com/deploy/flowise-or-build-ai-agents-w-db",
    "upstream": {
      "image": "flowiseai/flowise"
    }
  },
  "services": [
    {
      "name": "FlowiseAI",
      "source": {
        "image": "flowiseai/flowise"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "FlowiseAI",
      "description": "Port where the Flowise web app listens for connections.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "LOG_PATH",
      "service": "FlowiseAI",
      "description": "Path to save Flowise log files.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "API_KEY_PATH",
      "service": "FlowiseAI",
      "description": "Location to store API keys securely.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_HOST",
      "service": "FlowiseAI",
      "description": "Hostname of the PostgreSQL database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_NAME",
      "service": "FlowiseAI",
      "description": "Name of the database Flowise uses.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_PORT",
      "service": "FlowiseAI",
      "description": "Port to connect to PostgreSQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_TYPE",
      "service": "FlowiseAI",
      "description": "Type of database Flowise is connecting to.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "DATABASE_USER",
      "service": "FlowiseAI",
      "description": "Username for PostgreSQL authentication.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SECRETKEY_PATH",
      "service": "FlowiseAI",
      "description": "Path to store encryption keys for Flowise securely.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "FLOWISE_PASSWORD",
      "service": "FlowiseAI",
      "description": "Default passwordfor Flowise login. Can be changed in variables.",
      "secret": true,
      "strategy": "default",
      "default": "user"
    },
    {
      "key": "FLOWISE_USERNAME",
      "service": "FlowiseAI",
      "description": "Default username for Flowise login. Can be changed in variables.",
      "secret": false,
      "strategy": "default",
      "default": "1234"
    },
    {
      "key": "BLOB_STORAGE_PATH",
      "service": "FlowiseAI",
      "description": "Path to store uploaded files, models, and binary data.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_PASSWORD",
      "service": "FlowiseAI",
      "description": "Password for PostgreSQL authentication.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Path for PostgreSQL internal data storage. Can remain default.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private host address of PostgreSQL for internal connections.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port PostgreSQL listens on. Default is 5432.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "PostgreSQL username.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Name of the database used by PostgreSQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for the PostgreSQL user.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "The main PostgreSQL database name.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Connection URL for internal access.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Default user created for database access (postgres)",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Duration (in days) for PostgreSQL SSL certificate validity.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password for PostgreSQL user.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public-facing URL for the PostgreSQL database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time Railway waits before shutting down a deployment to drain connections.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "flowise-or-build-ai-agents-w-db"
      }
    },
    "cli": "railway deploy --template flowise-or-build-ai-agents-w-db",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "df7f9a82-1e75-4bc5-8889-01e88aff94fe",
            "serializedConfig": {
              "services": {
                "31facae7-d3ef-4573-b663-094d1f9d3ff9": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/flowise.svg",
                  "name": "FlowiseAI",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "flowiseai/flowise"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port where the Flowise web app listens for connections.",
                      "defaultValue": "8080"
                    },
                    "LOG_PATH": {
                      "isOptional": false,
                      "description": "Path to save Flowise log files.",
                      "defaultValue": "${{RAILWAY_VOLUME_NAME}}"
                    },
                    "API_KEY_PATH": {
                      "isOptional": false,
                      "description": "Location to store API keys securely.",
                      "defaultValue": "${{RAILWAY_VOLUME_NAME}}"
                    },
                    "DATABASE_HOST": {
                      "isOptional": false,
                      "description": "Hostname of the PostgreSQL database.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DATABASE_NAME": {
                      "isOptional": false,
                      "description": "Name of the database Flowise uses.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "DATABASE_PORT": {
                      "isOptional": false,
                      "description": "Port to connect to PostgreSQL.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DATABASE_TYPE": {
                      "isOptional": false,
                      "description": "Type of database Flowise is connecting to.",
                      "defaultValue": "postgres"
                    },
                    "DATABASE_USER": {
                      "isOptional": false,
                      "description": "Username for PostgreSQL authentication.",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "SECRETKEY_PATH": {
                      "isOptional": false,
                      "description": "Path to store encryption keys for Flowise securely.",
                      "defaultValue": "${{RAILWAY_VOLUME_NAME}}"
                    },
                    "FLOWISE_PASSWORD": {
                      "isOptional": false,
                      "description": "Default passwordfor Flowise login. Can be changed in variables.",
                      "defaultValue": "user"
                    },
                    "FLOWISE_USERNAME": {
                      "isOptional": false,
                      "description": "Default username for Flowise login. Can be changed in variables.",
                      "defaultValue": "1234"
                    },
                    "BLOB_STORAGE_PATH": {
                      "isOptional": false,
                      "description": "Path to store uploaded files, models, and binary data.",
                      "defaultValue": "${{RAILWAY_VOLUME_NAME}}"
                    },
                    "DATABASE_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for PostgreSQL authentication.",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "31facae7-d3ef-4573-b663-094d1f9d3ff9": {
                      "mountPath": "/data"
                    }
                  }
                },
                "43fd2c7a-a983-49e2-9775-db60413d5864": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Path for PostgreSQL internal data storage. Can remain default.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private host address of PostgreSQL for internal connections.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port PostgreSQL listens on. Default is 5432.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "PostgreSQL username.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Name of the database used by PostgreSQL.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for the PostgreSQL user.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "The main PostgreSQL database name.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Connection URL for internal access.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Default user created for database access (postgres)",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Duration (in days) for PostgreSQL SSL certificate validity.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for PostgreSQL user.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public-facing URL for the PostgreSQL database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time Railway waits before shutting down a deployment to drain connections.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "43fd2c7a-a983-49e2-9775-db60413d5864": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-21T01:32:20.700Z",
  "success_rate_30d": 0.8333,
  "validation": {
    "last_run_id": "run_d3aff2eb7c2c48d7a8c1",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": false,
        "detail": "1 service(s) crashed within 30s"
      }
    ],
    "typical_ready_seconds": 97,
    "typical_build_seconds": 0,
    "typical_start_seconds": 30,
    "slowest_service": "FlowiseAI"
  }
}
