{
  "manifest_version": "1.0.0",
  "template": {
    "id": "69e23ba2-bcc3-4496-8419-78bde9e3d56d",
    "slug": "kept",
    "name": "Kept",
    "description": "Home inventory: where everything is, with photos, QR labels, AI and MCP",
    "url": "https://railway.com/deploy/kept",
    "upstream": {
      "image": "ghcr.io/keptinventory/kept:1.12.5"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Kept",
      "source": {
        "image": "ghcr.io/keptinventory/kept:1.12.5"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "pgvector/pgvector:0.8.6-pg18-bookworm"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Kept",
      "description": "Pins Railway's injected PORT so the healthcheck probes the right port.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "KEPT_PORT",
      "service": "Kept",
      "description": "Port Kept listens on and the public domain targets.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "KEPT_CONFIG_DIR",
      "service": "Kept",
      "description": "Where Kept keeps generated config. On the volume so it survives redeploys.",
      "secret": false,
      "strategy": "default",
      "default": "/data/config"
    },
    {
      "key": "KEPT_PUBLIC_URL",
      "service": "Kept",
      "description": "The address people open Kept at; links and label QR codes are built from it. Change it if you add a custom domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "KEPT_SECRET_KEY",
      "service": "Kept",
      "description": "Encrypts stored secrets (AI provider keys, backup settings). Back it up; lose it and those values are unreadable.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "KEPT_SETUP_CODE",
      "service": "Kept",
      "description": "First-run setup code. Open your Kept URL and enter it to create the admin account.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Kept",
      "description": "Run as root so Kept can write to the Railway volume.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "KEPT_AUTH_SECRET",
      "service": "Kept",
      "description": "Signs sessions and tokens. Changing it signs everyone out.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "KEPT_DATABASE_URL",
      "service": "Kept",
      "description": "Request login (row-level security applies).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "KEPT_TRUSTED_PROXIES",
      "service": "Kept",
      "description": "Railway's edge proxy range, so Kept sees each visitor's real address for rate limiting.",
      "secret": false,
      "strategy": "default",
      "default": "100.64.0.0/10"
    },
    {
      "key": "KEPT_AUTH_DATABASE_URL",
      "service": "Kept",
      "description": "Authentication login.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "KEPT_OWNER_DATABASE_URL",
      "service": "Kept",
      "description": "Schema owner login, used by migrations and backups.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "KEPT_SYSTEM_DATABASE_URL",
      "service": "Kept",
      "description": "Background jobs login.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database Kept uses.",
      "secret": false,
      "strategy": "default",
      "default": "kept"
    },
    {
      "key": "KEPT_INIT_SQL",
      "service": "Postgres",
      "description": "Creates Kept's four database logins and extensions on the first boot of an empty database (upstream docker/initdb-prod/01-roles.sh). Ignored afterwards.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser name.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password. Kept never uses it.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "KEPT_DB_APP_PASSWORD",
      "service": "Postgres",
      "description": "Password of kept_app. Set once at first boot.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "KEPT_DB_AUTH_PASSWORD",
      "service": "Postgres",
      "description": "Password of kept_auth. Set once at first boot.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "KEPT_DB_OWNER_PASSWORD",
      "service": "Postgres",
      "description": "Password of kept_owner (schema owner). Set once at first boot; changing it later breaks the connection.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "KEPT_DB_SYSTEM_PASSWORD",
      "service": "Postgres",
      "description": "Password of kept_system. Set once at first boot.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to shut down cleanly.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "kept"
      }
    },
    "cli": "railway deploy --template kept",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "69e23ba2-bcc3-4496-8419-78bde9e3d56d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "57b02e3b-afc7-443d-92ee-aa3b00228235": {
                  "icon": "https://raw.githubusercontent.com/keptinventory/kept/v1.12.5/apps/web/public/icon-512.png",
                  "name": "Kept",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"until kept migrate; do echo kept migrate failed, retrying in 5s; sleep 5; done; exec node --import /app/apps/server/dist/observability/tracing.js /app/apps/server/dist/main.js\"",
                    "healthcheckPath": "/readyz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/keptinventory/kept:1.12.5"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Pins Railway's injected PORT so the healthcheck probes the right port.",
                      "defaultValue": "8080"
                    },
                    "KEPT_PORT": {
                      "isOptional": false,
                      "description": "Port Kept listens on and the public domain targets.",
                      "defaultValue": "8080"
                    },
                    "KEPT_CONFIG_DIR": {
                      "isOptional": false,
                      "description": "Where Kept keeps generated config. On the volume so it survives redeploys.",
                      "defaultValue": "/data/config"
                    },
                    "KEPT_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "The address people open Kept at; links and label QR codes are built from it. Change it if you add a custom domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "KEPT_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Encrypts stored secrets (AI provider keys, backup settings). Back it up; lose it and those values are unreadable.",
                      "defaultValue": "{{KEPT_SECRET_KEY}}"
                    },
                    "KEPT_SETUP_CODE": {
                      "isOptional": false,
                      "description": "First-run setup code. Open your Kept URL and enter it to create the admin account.",
                      "defaultValue": "{{KEPT_SETUP_CODE}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so Kept can write to the Railway volume.",
                      "defaultValue": "0"
                    },
                    "KEPT_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Signs sessions and tokens. Changing it signs everyone out.",
                      "defaultValue": "{{KEPT_AUTH_SECRET}}"
                    },
                    "KEPT_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Request login (row-level security applies).",
                      "defaultValue": "postgres://kept_app:${{Postgres.KEPT_DB_APP_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/kept"
                    },
                    "KEPT_TRUSTED_PROXIES": {
                      "isOptional": false,
                      "description": "Railway's edge proxy range, so Kept sees each visitor's real address for rate limiting.",
                      "defaultValue": "100.64.0.0/10"
                    },
                    "KEPT_AUTH_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Authentication login.",
                      "defaultValue": "postgres://kept_auth:${{Postgres.KEPT_DB_AUTH_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/kept"
                    },
                    "KEPT_OWNER_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Schema owner login, used by migrations and backups.",
                      "defaultValue": "postgres://kept_owner:${{Postgres.KEPT_DB_OWNER_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/kept"
                    },
                    "KEPT_SYSTEM_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Background jobs login.",
                      "defaultValue": "postgres://kept_system:${{Postgres.KEPT_DB_SYSTEM_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/kept"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "aef660f4-6dc7-4673-9a5b-daf642a42459": {
                      "mountPath": "/data"
                    }
                  }
                },
                "62e64239-6693-48d2-aefd-6c4017ad2635": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"mkdir -p /docker-entrypoint-initdb.d && printenv KEPT_INIT_SQL > /docker-entrypoint-initdb.d/01-kept-roles.sql && exec docker-entrypoint.sh postgres\"",
                    "requiredMountPath": "/var/lib/postgresql"
                  },
                  "source": {
                    "image": "pgvector/pgvector:0.8.6-pg18-bookworm"
                  },
                  "variables": {
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database Kept uses.",
                      "defaultValue": "kept"
                    },
                    "KEPT_INIT_SQL": {
                      "isOptional": false,
                      "description": "Creates Kept's four database logins and extensions on the first boot of an empty database (upstream docker/initdb-prod/01-roles.sh). Ignored afterwards.",
                      "defaultValue": "CREATE ROLE kept_owner LOGIN PASSWORD '${{KEPT_DB_OWNER_PASSWORD}}' NOSUPERUSER NOCREATEROLE NOCREATEDB NOBYPASSRLS; CREATE ROLE kept_app LOGIN PASSWORD '${{KEPT_DB_APP_PASSWORD}}' NOSUPERUSER NOCREATEROLE NOCREATEDB NOBYPASSRLS; CREATE ROLE kept_auth LOGIN PASSWORD '${{KEPT_DB_AUTH_PASSWORD}}' NOSUPERUSER NOCREATEROLE NOCREATEDB NOBYPASSRLS; CREATE ROLE kept_system LOGIN PASSWORD '${{KEPT_DB_SYSTEM_PASSWORD}}' NOSUPERUSER NOCREATEROLE NOCREATEDB NOBYPASSRLS; ALTER ROLE kept_app SET statement_timeout = '15s'; ALTER ROLE kept_app SET idle_in_transaction_session_timeout = '30s'; ALTER DATABASE kept OWNER TO kept_owner; CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE EXTENSION IF NOT EXISTS unaccent; CREATE EXTENSION IF NOT EXISTS vector; ALTER SCHEMA public OWNER TO kept_owner;"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser name.",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password. Kept never uses it.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "KEPT_DB_APP_PASSWORD": {
                      "isOptional": false,
                      "description": "Password of kept_app. Set once at first boot.",
                      "defaultValue": "{{KEPT_DB_APP_PASSWORD}}"
                    },
                    "KEPT_DB_AUTH_PASSWORD": {
                      "isOptional": false,
                      "description": "Password of kept_auth. Set once at first boot.",
                      "defaultValue": "{{KEPT_DB_AUTH_PASSWORD}}"
                    },
                    "KEPT_DB_OWNER_PASSWORD": {
                      "isOptional": false,
                      "description": "Password of kept_owner (schema owner). Set once at first boot; changing it later breaks the connection.",
                      "defaultValue": "{{KEPT_DB_OWNER_PASSWORD}}"
                    },
                    "KEPT_DB_SYSTEM_PASSWORD": {
                      "isOptional": false,
                      "description": "Password of kept_system. Set once at first boot.",
                      "defaultValue": "{{KEPT_DB_SYSTEM_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to shut down cleanly.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "16133667-ee17-450c-a5ef-7dc19f62a042": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Kept",
      "method": "GET",
      "path": "/readyz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-24T22:14:45.211Z",
  "generator_version": "0.1.0"
}
