{
  "manifest_version": "1.0.0",
  "template": {
    "id": "abef64a7-4caa-4ff8-ab70-da05206d6f11",
    "slug": "triliumnext",
    "name": "TriliumNext",
    "description": "Securely self-host TriliumNext with persistent notes and tested recovery.",
    "url": "https://railway.com/deploy/triliumnext",
    "upstream": {
      "repo_url": "https://github.com/l4time/railway-triliumnext-template"
    }
  },
  "services": [
    {
      "name": "triliumnext",
      "source": {
        "repo": "https://github.com/l4time/railway-triliumnext-template"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/node/trilium-data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "triliumnext",
      "description": "Internal HTTP port; fixed at 3000 by the template.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "TRILIUM_OWNER_PASSWORD",
      "service": "triliumnext",
      "description": "Auto-generated TriliumNext owner password; save it securely.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "triliumnext"
      }
    },
    "cli": "railway deploy --template triliumnext",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "abef64a7-4caa-4ff8-ab70-da05206d6f11",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "902699ab-d020-496d-b1b9-e976bab5bf40": {
                  "icon": null,
                  "name": "triliumnext",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/readyz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/l4time/railway-triliumnext-template",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal HTTP port; fixed at 3000 by the template.",
                      "defaultValue": "3000"
                    },
                    "TRILIUM_OWNER_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated TriliumNext owner password; save it securely.",
                      "defaultValue": "{{TRILIUM_OWNER_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "902699ab-d020-496d-b1b9-e976bab5bf40": {
                      "mountPath": "/home/node/trilium-data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "triliumnext",
      "method": "GET",
      "path": "/readyz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T13:46:31.728Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_7274c266752840a08bb7",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 72,
    "typical_build_seconds": 20,
    "typical_start_seconds": 11,
    "slowest_service": "triliumnext"
  }
}
