{
  "manifest_version": "1.0.0",
  "template": {
    "id": "5dbc9b19-5459-4bae-8198-457bb24558b1",
    "slug": "database-neo4j",
    "name": "Neo4J",
    "description": "Graph database for storing and querying connected data",
    "url": "https://railway.com/deploy/database-neo4j",
    "upstream": {
      "image": "caddy:2-alpine"
    }
  },
  "services": [
    {
      "name": "Neo4j",
      "source": {
        "image": "neo4j:2026"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "tcp_ports": [
        7687
      ],
      "http": false
    },
    {
      "name": "Gateway",
      "source": {
        "image": "caddy:2-alpine"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Neo4j",
      "description": "Health check target port",
      "secret": false,
      "strategy": "default",
      "default": "7474"
    },
    {
      "key": "BOLT_URL",
      "service": "Neo4j",
      "description": "Private Bolt connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "NEO4J_AUTH",
      "service": "Neo4j",
      "description": "Initial credentials, empty store only",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BOLT_PASSWORD",
      "service": "Neo4j",
      "description": "Password for the neo4j user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "BOLT_USERNAME",
      "service": "Neo4j",
      "description": "Database username for consumers",
      "secret": false,
      "strategy": "default",
      "default": "neo4j"
    },
    {
      "key": "NEO4J_PLUGINS",
      "service": "Neo4j",
      "description": "Loads bundled APOC Core library",
      "secret": false,
      "strategy": "default",
      "default": "[\"apoc\"]"
    },
    {
      "key": "QUERY_API_URL",
      "service": "Neo4j",
      "description": "Cypher HTTP API endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEO4J_server_bolt_advertised__address",
      "service": "Neo4j",
      "description": "Bolt address given to clients",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "Gateway",
      "description": "Caddy listening port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "NEO4J_HOST",
      "service": "Gateway",
      "description": "Private hostname of Neo4j service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "database-neo4j"
      }
    },
    "cli": "railway deploy --template database-neo4j",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "5dbc9b19-5459-4bae-8198-457bb24558b1",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "6edcdea0-e388-487c-b99f-63036356935b": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/neo4j.svg",
                  "name": "Neo4j",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'M=$(cat /sys/fs/cgroup/memory.max 2>/dev/null || cat /sys/fs/cgroup/memory/memory.limit_in_bytes 2>/dev/null || echo max); case \"$M\" in \"\"|*[!0-9]*) M=8589934592;; esac; MB=$((M/1048576)); [ \"$MB\" -gt 131072 ] && MB=131072; H=$((MB*35/100)); P=$((MB*30/100)); [ \"$H\" -lt 512 ] && H=512; [ \"$H\" -gt 31744 ] && H=31744; [ \"$P\" -lt 256 ] && P=256; export NEO4J_server_memory_heap_initial__size=\"${H}m\"; export NEO4J_server_memory_heap_max__size=\"${H}m\"; export NEO4J_server_memory_pagecache_size=\"${P}m\"; echo \"railway: cgroup ${MB}MB -> heap ${H}m pagecache ${P}m\"; exec tini -s -g -- /startup/docker-entrypoint.sh neo4j'",
                    "healthcheckPath": "/",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "neo4j:2026"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Health check target port",
                      "defaultValue": "7474"
                    },
                    "BOLT_URL": {
                      "isOptional": false,
                      "description": "Private Bolt connection string",
                      "defaultValue": "bolt://${{RAILWAY_PRIVATE_DOMAIN}}:7687"
                    },
                    "NEO4J_AUTH": {
                      "isOptional": false,
                      "description": "Initial credentials, empty store only",
                      "defaultValue": "neo4j/${{BOLT_PASSWORD}}"
                    },
                    "BOLT_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the neo4j user",
                      "defaultValue": "{{BOLT_PASSWORD}}"
                    },
                    "BOLT_USERNAME": {
                      "isOptional": false,
                      "description": "Database username for consumers",
                      "defaultValue": "neo4j"
                    },
                    "NEO4J_PLUGINS": {
                      "isOptional": false,
                      "description": "Loads bundled APOC Core library",
                      "defaultValue": "[\"apoc\"]"
                    },
                    "QUERY_API_URL": {
                      "isOptional": false,
                      "description": "Cypher HTTP API endpoint",
                      "defaultValue": "https://${{Gateway.RAILWAY_PUBLIC_DOMAIN}}/db/neo4j/query/v2"
                    },
                    "NEO4J_server_bolt_advertised__address": {
                      "isOptional": false,
                      "description": "Bolt address given to clients",
                      "defaultValue": "${{Gateway.RAILWAY_PUBLIC_DOMAIN}}:443"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "7687": {}
                    }
                  },
                  "volumeMounts": {
                    "6edcdea0-e388-487c-b99f-63036356935b": {
                      "mountPath": "/data"
                    }
                  }
                },
                "b32b7d03-855f-4e66-842b-ef4b63002487": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/caddy.svg",
                  "name": "Gateway",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'H=\"$NEO4J_HOST\"; case \"$H\" in \"\"|:*) H=neo4j.railway.internal;; esac; P=\"${PORT:-8080}\"; printf \"%s\\n\" \"{\" \"admin off\" \"auto_https off\" \"servers {\" \"trusted_proxies static 100.64.0.0/10 fd00::/8\" \"}\" \"}\" \"\" \":$P {\" \"handle /healthz {\" \"respond 200\" \"}\" \"@ws header Upgrade *ebsocket*\" \"handle @ws {\" \"reverse_proxy $H:7687\" \"}\" \"handle {\" \"reverse_proxy $H:7474 {\" \"header_up X-Forwarded-Host {host}\" \"header_up X-Forwarded-Proto https\" \"}\" \"}\" \"}\" > /etc/caddy/Caddyfile; caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile; exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2-alpine"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Caddy listening port",
                      "defaultValue": "8080"
                    },
                    "NEO4J_HOST": {
                      "isOptional": false,
                      "description": "Private hostname of Neo4j service",
                      "defaultValue": "${{Neo4j.RAILWAY_PRIVATE_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-13T16:14:48.926Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-12T18:09:40.785Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_f38076d725ef46ecb6a1",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 48,
    "typical_build_seconds": 0,
    "typical_start_seconds": 17,
    "slowest_service": "Neo4j"
  }
}
