{
  "manifest_version": "1.0.0",
  "template": {
    "id": "765b3e0c-163a-46a1-97f8-16ce8ef55867",
    "slug": "linkwarden-2",
    "name": "Linkwarden",
    "description": "Linkwarden — collaborative bookmark manager with web page archiving",
    "url": "https://railway.com/deploy/linkwarden-2",
    "upstream": {
      "image": "ghcr.io/linkwarden/linkwarden:v2.15.1"
    }
  },
  "services": [
    {
      "name": "linkwarden",
      "source": {
        "image": "ghcr.io/linkwarden/linkwarden:v2.15.1"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:16-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "linkwarden",
      "description": "Port Linkwarden listens on (default: 8080).",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "DATABASE_URL",
      "service": "linkwarden",
      "description": "PostgreSQL connection string. References the sibling Postgres service's DATABASE_URL so credentials stay in sync automatically.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXTAUTH_SECRET",
      "service": "linkwarden",
      "description": "Secret for NextAuth session encryption. Auto-generated random value.",
      "secret": true,
      "strategy": "default",
      "default": "${secret(32)}"
    },
    {
      "key": "LINKWARDEN_SECRET_KEY",
      "service": "linkwarden",
      "description": "Secret key used for encryption. Auto-generated random value.",
      "secret": true,
      "strategy": "default",
      "default": "${secret(32)}"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Postgres data directory inside the mounted volume. Must be a subpath of the volume mount path /var/lib/postgresql — this geometry places the volume's lost+found/ at /var/lib/postgresql/lost+found (outside PGDATA), so initdb sees an empty directory and proceeds. DO NOT change this without also changing the volume mount path.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Initial database created on first boot. Must match the database name in Linkwarden's DATABASE_URL.",
      "secret": false,
      "strategy": "default",
      "default": "linkwarden"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "PostgreSQL connection string. The Linkwarden app references this via ${{Postgres.DATABASE_URL}}.",
      "secret": false,
      "strategy": "default",
      "default": "postgresql://postgres:postgres@postgres.railway.internal:5432/linkwarden"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Postgres superuser name. Linkwarden connects with these credentials.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Postgres password. Default literal 'postgres' so a fresh marketplace deploy authenticates out of the box. Rotate this in the dashboard AND update the Linkwarden DATABASE_URL to match before production.",
      "secret": true,
      "strategy": "default",
      "default": "postgres"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "linkwarden-2"
      }
    },
    "cli": "railway deploy --template linkwarden-2",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "765b3e0c-163a-46a1-97f8-16ce8ef55867",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "1e15b64b-1443-4cf9-99c8-7dde6b1a9b3e": {
                  "icon": null,
                  "name": "linkwarden",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/linkwarden/linkwarden:v2.15.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Linkwarden listens on (default: 8080).",
                      "defaultValue": "8080"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string. References the sibling Postgres service's DATABASE_URL so credentials stay in sync automatically.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "NEXTAUTH_SECRET": {
                      "isOptional": false,
                      "description": "Secret for NextAuth session encryption. Auto-generated random value.",
                      "defaultValue": "${secret(32)}"
                    },
                    "LINKWARDEN_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Secret key used for encryption. Auto-generated random value.",
                      "defaultValue": "${secret(32)}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "7553a40b-cfdb-4d91-84c5-f068503bef44": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:16-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Postgres data directory inside the mounted volume. Must be a subpath of the volume mount path /var/lib/postgresql — this geometry places the volume's lost+found/ at /var/lib/postgresql/lost+found (outside PGDATA), so initdb sees an empty directory and proceeds. DO NOT change this without also changing the volume mount path.",
                      "defaultValue": "/var/lib/postgresql/data"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Initial database created on first boot. Must match the database name in Linkwarden's DATABASE_URL.",
                      "defaultValue": "linkwarden"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string. The Linkwarden app references this via ${{Postgres.DATABASE_URL}}.",
                      "defaultValue": "postgresql://postgres:postgres@postgres.railway.internal:5432/linkwarden"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres superuser name. Linkwarden connects with these credentials.",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password. Default literal 'postgres' so a fresh marketplace deploy authenticates out of the box. Rotate this in the dashboard AND update the Linkwarden DATABASE_URL to match before production.",
                      "defaultValue": "postgres"
                    }
                  },
                  "volumeMounts": {
                    "7553a40b-cfdb-4d91-84c5-f068503bef44": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-09T00:35:45.331Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_33c6f695375b48b88d5a",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 99,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "linkwarden"
  }
}
