{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c9cd5455-5142-404c-a3e9-942298c0549e",
    "slug": "trilium",
    "name": "Trilium",
    "description": "Notion Alternative. Hierarchical notes, canvas, mind maps & more",
    "url": "https://railway.com/deploy/trilium",
    "upstream": {
      "image": "triliumnext/trilium:latest"
    }
  },
  "services": [
    {
      "name": "trilium",
      "source": {
        "image": "triliumnext/trilium:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/node/trilium-data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "trilium",
      "description": "Health-check target port, keep identical",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "trilium",
      "description": "Cap Node heap below container limit",
      "secret": false,
      "strategy": "default",
      "default": "--max-old-space-size=4096"
    },
    {
      "key": "TRILIUM_DATA_DIR",
      "service": "trilium",
      "description": "Data directory, matches volume mount",
      "secret": false,
      "strategy": "default",
      "default": "/home/node/trilium-data"
    },
    {
      "key": "TRILIUM_NETWORK_PORT",
      "service": "trilium",
      "description": "Application listen port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TRILIUM_GENERAL_INSTANCENAME",
      "service": "trilium",
      "description": "Instance label for sync and title",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "trilium",
      "description": "Let SQLite writes finish on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "TRILIUM_NETWORK_TRUSTEDREVERSEPROXY",
      "service": "trilium",
      "description": "Trust Railway edge proxy hops",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0/1,128.0.0.0/1,::/1,8000::/1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "trilium"
      }
    },
    "cli": "railway deploy --template trilium",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c9cd5455-5142-404c-a3e9-942298c0549e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "a9166829-08c8-4fbb-bb69-84808213f6f5": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/triliumnext.svg",
                  "name": "trilium",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "triliumnext/trilium:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Health-check target port, keep identical",
                      "defaultValue": "8080"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Cap Node heap below container limit",
                      "defaultValue": "--max-old-space-size=4096"
                    },
                    "TRILIUM_DATA_DIR": {
                      "isOptional": false,
                      "description": "Data directory, matches volume mount",
                      "defaultValue": "/home/node/trilium-data"
                    },
                    "TRILIUM_NETWORK_PORT": {
                      "isOptional": false,
                      "description": "Application listen port",
                      "defaultValue": "8080"
                    },
                    "TRILIUM_GENERAL_INSTANCENAME": {
                      "isOptional": false,
                      "description": "Instance label for sync and title",
                      "defaultValue": "railway"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Let SQLite writes finish on redeploy",
                      "defaultValue": "30"
                    },
                    "TRILIUM_NETWORK_TRUSTEDREVERSEPROXY": {
                      "isOptional": false,
                      "description": "Trust Railway edge proxy hops",
                      "defaultValue": "0.0.0.0/1,128.0.0.0/1,::/1,8000::/1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "a9166829-08c8-4fbb-bb69-84808213f6f5": {
                      "mountPath": "/home/node/trilium-data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "trilium",
      "method": "GET",
      "path": "/",
      "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-19T17:19:59.358Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_9accda568cb9407b8450",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 106,
    "typical_build_seconds": 0,
    "typical_start_seconds": 5,
    "slowest_service": "trilium"
  }
}
