{
  "manifest_version": "1.0.0",
  "template": {
    "id": "197b1840-62ad-4b44-8798-974936e177b9",
    "slug": "couchdb-obsidian-livesync",
    "name": "Couchdb Obsidian Livesync",
    "description": "CouchDB server that syncs your Obsidian notes between devices",
    "url": "https://railway.com/deploy/couchdb-obsidian-livesync",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/obsidian-livesync-railway"
    }
  },
  "services": [
    {
      "name": "couchdb",
      "source": {
        "repo": "https://github.com/gridalpha/obsidian-livesync-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/opt/couchdb/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "couchdb",
      "description": "Health endpoint port, keep private",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "COUCHDB_USER",
      "service": "couchdb",
      "description": "CouchDB admin username",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "COUCHDB_SECRET",
      "service": "couchdb",
      "description": "Session cookie signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "COUCHDB_DATABASE",
      "service": "couchdb",
      "description": "Vault database created at boot",
      "secret": false,
      "strategy": "default",
      "default": "obsidiannotes"
    },
    {
      "key": "COUCHDB_PASSWORD",
      "service": "couchdb",
      "description": "Admin password, also used by the plugin",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "COUCHDB_CORS_ORIGINS",
      "service": "couchdb",
      "description": "Obsidian desktop and mobile origins",
      "secret": false,
      "strategy": "default",
      "default": "app://obsidian.md,capacitor://localhost,http://localhost"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "couchdb",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "15"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "couchdb-obsidian-livesync"
      }
    },
    "cli": "railway deploy --template couchdb-obsidian-livesync",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "197b1840-62ad-4b44-8798-974936e177b9",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "49259a96-ab89-492f-a2d8-565fa6c78fec": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/couchdb.svg",
                  "name": "couchdb",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/obsidian-livesync-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Health endpoint port, keep private",
                      "defaultValue": "8080"
                    },
                    "COUCHDB_USER": {
                      "isOptional": false,
                      "description": "CouchDB admin username",
                      "defaultValue": "admin"
                    },
                    "COUCHDB_SECRET": {
                      "isOptional": false,
                      "description": "Session cookie signing key",
                      "defaultValue": "{{COUCHDB_SECRET}}"
                    },
                    "COUCHDB_DATABASE": {
                      "isOptional": false,
                      "description": "Vault database created at boot",
                      "defaultValue": "obsidiannotes"
                    },
                    "COUCHDB_PASSWORD": {
                      "isOptional": false,
                      "description": "Admin password, also used by the plugin",
                      "defaultValue": "{{COUCHDB_PASSWORD}}"
                    },
                    "COUCHDB_CORS_ORIGINS": {
                      "isOptional": false,
                      "description": "Obsidian desktop and mobile origins",
                      "defaultValue": "app://obsidian.md,capacitor://localhost,http://localhost"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:5984": {
                        "port": 5984
                      }
                    }
                  },
                  "volumeMounts": {
                    "49259a96-ab89-492f-a2d8-565fa6c78fec": {
                      "mountPath": "/opt/couchdb/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T04:14:46.774Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T16:14:02.232Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_76d4f78693854c31ac6b",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 127,
    "typical_build_seconds": 31,
    "typical_start_seconds": 10,
    "slowest_service": "couchdb"
  }
}
