{
  "manifest_version": "1.0.0",
  "template": {
    "id": "ce611e93-6912-4536-a6df-8ad6ba2b12ff",
    "slug": "kan-kanban-board",
    "name": "Kan | Open Source Trello Alternative",
    "description": "Open source Trello alternative: kanban boards, Postgres, attachments",
    "url": "https://railway.com/deploy/kan-kanban-board",
    "upstream": {
      "image": "ghcr.io/kanbn/kan:0.6.0"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:18.6-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Web",
      "source": {
        "image": "ghcr.io/kanbn/kan:0.6.0"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Migrate",
      "source": {
        "image": "ghcr.io/kanbn/kan-migrate:0.6.0"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Postgres data directory, one level below the mount point so the volume's lost+found never blocks initialisation.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database Kan uses; the connection strings point at this name.",
      "secret": false,
      "strategy": "default",
      "default": "kan_db"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database user created on first boot.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Database password, generated once. It is embedded in the connection URLs, so letters and digits only.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "Web",
      "description": "Port the Next.js server listens on. Railway routes traffic and the health check here.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "S3_REGION",
      "service": "Web",
      "description": "Bucket region.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "Web",
      "description": "Object storage endpoint for avatars and attachments (the Railway bucket).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_URL",
      "service": "Web",
      "description": "Postgres connection string over the private network. Kan requires Postgres — it is not MySQL-compatible.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "Web",
      "description": "Bucket access key.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "KAN_ADMIN_API_KEY",
      "service": "Web",
      "description": "Bearer key for Kan's admin REST API. Generated; most self-hosters never need it.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "Web",
      "description": "Signs session tokens (32+ chars). Changing it logs everyone out.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "S3_FORCE_PATH_STYLE",
      "service": "Web",
      "description": "Keep this on. Railway storage only sends CORS headers on the path-style endpoint, and the browser uploads attachments straight to the bucket — with virtual-hosted URLs every upload fails in the browser while curl still reports 200.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "NEXT_PUBLIC_BASE_URL",
      "service": "Web",
      "description": "Public URL of this instance — used for links, OAuth callbacks and the app's own API base. Set it to your own domain if you add one.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "Web",
      "description": "Bucket secret key.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BETTER_AUTH_TRUSTED_ORIGINS",
      "service": "Web",
      "description": "Origins allowed to hold a session. Must include your public URL; add a custom domain here too when you set one.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_ALLOW_CREDENTIALS",
      "service": "Web",
      "description": "Enables email + password sign-in. Set to false to force OAuth-only login.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "NEXT_PUBLIC_AVATAR_BUCKET_NAME",
      "service": "Web",
      "description": "Bucket holding user avatars.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_PUBLIC_ATTACHMENTS_BUCKET_NAME",
      "service": "Web",
      "description": "Bucket holding card attachments (the same bucket).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_PUBLIC_USE_VIRTUAL_HOSTED_URLS",
      "service": "Web",
      "description": "Keep false — it pairs with S3_FORCE_PATH_STYLE so the browser talks to the bucket over the CORS-enabled path-style endpoint.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "POSTGRES_URL",
      "service": "Migrate",
      "description": "Same private Postgres connection string. drizzle-kit applies any pending migrations and then this service stops — redeploy it after a Kan version bump to migrate again.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "kan-kanban-board"
      }
    },
    "cli": "railway deploy --template kan-kanban-board",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "ce611e93-6912-4536-a6df-8ad6ba2b12ff",
            "serializedConfig": {
              "buckets": {
                "c4d956e5-869a-43d0-bb19-eb11a68d955d": {
                  "name": "Attachments"
                }
              },
              "services": {
                "4186c305-6e85-4b85-aaa2-984c8a72e6c9": {
                  "icon": null,
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 2
                  },
                  "source": {
                    "image": "postgres:18.6-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Postgres data directory, one level below the mount point so the volume's lost+found never blocks initialisation.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database Kan uses; the connection strings point at this name.",
                      "defaultValue": "kan_db"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user created on first boot.",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password, generated once. It is embedded in the connection URLs, so letters and digits only.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "4186c305-6e85-4b85-aaa2-984c8a72e6c9": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "a1482fb9-84da-40bb-9d72-6fe9f90fa514": {
                  "icon": "https://cdn.jsdelivr.net/gh/kanbn/kan@56af094c505ed9ca3b3cb189e24f8f599c9cdd7f/apps/web/public/icon-512.png",
                  "name": "Web",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/login",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/kanbn/kan:0.6.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the Next.js server listens on. Railway routes traffic and the health check here.",
                      "defaultValue": "3000"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket region.",
                      "defaultValue": "${{Attachments.REGION}}"
                    },
                    "SMTP_HOST": {
                      "isOptional": true,
                      "description": "SMTP host for transactional email (invites, notifications). Optional; empty leaves email features off.",
                      "defaultValue": ""
                    },
                    "SMTP_PORT": {
                      "isOptional": true,
                      "description": "SMTP port, e.g. 465 (SSL) or 587 (STARTTLS).",
                      "defaultValue": ""
                    },
                    "SMTP_USER": {
                      "isOptional": true,
                      "description": "SMTP username.",
                      "defaultValue": ""
                    },
                    "EMAIL_FROM": {
                      "isOptional": true,
                      "description": "From address for outgoing email, e.g. \"Kan <hello@yourdomain.com>\".",
                      "defaultValue": ""
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Object storage endpoint for avatars and attachments (the Railway bucket).",
                      "defaultValue": "${{Attachments.ENDPOINT}}"
                    },
                    "POSTGRES_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string over the private network. Kan requires Postgres — it is not MySQL-compatible.",
                      "defaultValue": "postgresql://postgres:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/kan_db"
                    },
                    "SMTP_PASSWORD": {
                      "isOptional": true,
                      "description": "SMTP password.",
                      "defaultValue": ""
                    },
                    "GOOGLE_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Google OAuth client id, to offer Sign in with Google. Callback is your URL + /api/auth/callback/google.",
                      "defaultValue": ""
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Bucket access key.",
                      "defaultValue": "${{Attachments.ACCESS_KEY_ID}}"
                    },
                    "KAN_ADMIN_API_KEY": {
                      "isOptional": false,
                      "description": "Bearer key for Kan's admin REST API. Generated; most self-hosters never need it.",
                      "defaultValue": "{{KAN_ADMIN_API_KEY}}"
                    },
                    "TRELLO_APP_SECRET": {
                      "isOptional": true,
                      "description": "Trello API secret for the importer.",
                      "defaultValue": ""
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Signs session tokens (32+ chars). Changing it logs everyone out.",
                      "defaultValue": "{{BETTER_AUTH_SECRET}}"
                    },
                    "TRELLO_APP_API_KEY": {
                      "isOptional": true,
                      "description": "Trello API key, used only for the Trello board importer.",
                      "defaultValue": ""
                    },
                    "S3_FORCE_PATH_STYLE": {
                      "isOptional": false,
                      "description": "Keep this on. Railway storage only sends CORS headers on the path-style endpoint, and the browser uploads attachments straight to the bucket — with virtual-hosted URLs every upload fails in the browser while curl still reports 200.",
                      "defaultValue": "true"
                    },
                    "GOOGLE_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Google OAuth client secret.",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_BASE_URL": {
                      "isOptional": false,
                      "description": "Public URL of this instance — used for links, OAuth callbacks and the app's own API base. Set it to your own domain if you add one.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Bucket secret key.",
                      "defaultValue": "${{Attachments.SECRET_ACCESS_KEY}}"
                    },
                    "NEXT_PUBLIC_DISABLE_EMAIL": {
                      "isOptional": true,
                      "description": "Set to `true` to hide email-based features entirely when you are not configuring SMTP.",
                      "defaultValue": ""
                    },
                    "BETTER_AUTH_TRUSTED_ORIGINS": {
                      "isOptional": false,
                      "description": "Origins allowed to hold a session. Must include your public URL; add a custom domain here too when you set one.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_DISABLE_SIGN_UP": {
                      "isOptional": true,
                      "description": "Leave empty to allow registration. The first visitor to register becomes the workspace owner — set this to `true` once your account exists so nobody else can sign up.",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_ALLOW_CREDENTIALS": {
                      "isOptional": false,
                      "description": "Enables email + password sign-in. Set to false to force OAuth-only login.",
                      "defaultValue": "true"
                    },
                    "NEXT_PUBLIC_AVATAR_BUCKET_NAME": {
                      "isOptional": false,
                      "description": "Bucket holding user avatars.",
                      "defaultValue": "${{Attachments.BUCKET}}"
                    },
                    "NEXT_PUBLIC_ATTACHMENTS_BUCKET_NAME": {
                      "isOptional": false,
                      "description": "Bucket holding card attachments (the same bucket).",
                      "defaultValue": "${{Attachments.BUCKET}}"
                    },
                    "NEXT_PUBLIC_USE_VIRTUAL_HOSTED_URLS": {
                      "isOptional": false,
                      "description": "Keep false — it pairs with S3_FORCE_PATH_STYLE so the browser talks to the bucket over the CORS-enabled path-style endpoint.",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                },
                "cab9fd44-5fa4-4710-acef-e66615060c8e": {
                  "icon": null,
                  "name": "Migrate",
                  "deploy": {
                    "startCommand": "sh -c 'cd /db && for i in $(seq 1 60); do npx drizzle-kit migrate && exit 0; echo \"migrate: database not ready, retry $i/60\"; sleep 3; done; echo \"migrate: giving up after 60 attempts\"; exit 1'",
                    "healthcheckPath": null,
                    "restartPolicyType": "NEVER",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/kanbn/kan-migrate:0.6.0"
                  },
                  "variables": {
                    "POSTGRES_URL": {
                      "isOptional": false,
                      "description": "Same private Postgres connection string. drizzle-kit applies any pending migrations and then this service stops — redeploy it after a Kan version bump to migrate again.",
                      "defaultValue": "postgresql://postgres:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/kan_db"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Web",
      "method": "GET",
      "path": "/login",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-19T19:03:57.999Z",
  "success_rate_30d": 0.1667,
  "validation": {
    "last_run_id": "run_b394da7146d841929c6f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ],
    "typical_ready_seconds": 108,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Web"
  }
}
