{
  "manifest_version": "1.0.0",
  "template": {
    "id": "0076a661-10f9-445b-93b6-7cc4594cef6a",
    "slug": "open-excalidraw",
    "name": "open-excalidraw",
    "description": "Self-hostable collaborative drawing built on Excalidraw",
    "url": "https://railway.com/deploy/open-excalidraw",
    "upstream": {
      "image": "ghcr.io/strangenoob/open-excalidraw:latest"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "app",
      "source": {
        "image": "ghcr.io/strangenoob/open-excalidraw:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/assets",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "PostgreSQL data directory inside the mounted volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private-network hostname of this service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "PostgreSQL listen port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "psql client user; follows POSTGRES_USER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "psql client database; follows POSTGRES_DB.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "psql client password; follows POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Name of the database created on first start.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private-network connection string composed from the credentials above; the app service references it.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser name used to initialize the database; PGUSER and the connection URLs reference it.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity in days of the generated self-signed TLS certificate.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password; generated fresh for each deployment.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Grace period for clean shutdown during redeploys.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "app",
      "description": "Port Railway probes for healthchecks; matches the app's listen port (APP_PORT default 3000).",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "S3_REGION",
      "service": "app",
      "description": "Bucket region; \"auto\" works for R2, use the real region for AWS/B2/Spaces/Wasabi.",
      "secret": false,
      "strategy": "default",
      "default": "auto"
    },
    {
      "key": "SMTP_FROM",
      "service": "app",
      "description": "From header for outgoing mail; use a domain your SMTP provider allows.",
      "secret": false,
      "strategy": "default",
      "default": "Open Excalidraw <noreply@example.com>"
    },
    {
      "key": "SMTP_PORT",
      "service": "app",
      "description": "SMTP port; 587 for STARTTLS, 465 with SMTP_SECURE=true.",
      "secret": false,
      "strategy": "default",
      "default": "587"
    },
    {
      "key": "SMTP_SECURE",
      "service": "app",
      "description": "true for implicit TLS (port 465); false for STARTTLS.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "APP_BASE_URL",
      "service": "app",
      "description": "Public origin of the deployment; used for auth callbacks, share links, and socket-origin checks. Defaults to the generated Railway domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "app",
      "description": "PostgreSQL connection string; references the bundled Postgres service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "STORAGE_DRIVER",
      "service": "app",
      "description": "Binary asset storage driver: \"local\" volume or \"s3\" for any S3-compatible bucket.",
      "secret": false,
      "strategy": "default",
      "default": "local"
    },
    {
      "key": "ADMIN_RESET_TOKEN",
      "service": "app",
      "description": "Operator token for the SMTP-less password recovery flow; generated at deploy time.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "app",
      "description": "Session and auth signing secret; generated at deploy time.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "STORAGE_LOCAL_PATH",
      "service": "app",
      "description": "Asset directory for the local driver; must match the volume mount path.",
      "secret": false,
      "strategy": "default",
      "default": "/data/assets"
    },
    {
      "key": "S3_FORCE_PATH_STYLE",
      "service": "app",
      "description": "true for MinIO and other path-style-only endpoints.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "open-excalidraw"
      }
    },
    "cli": "railway deploy --template open-excalidraw",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "0076a661-10f9-445b-93b6-7cc4594cef6a",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "d0b33364-6005-42da-affd-f2aa2701d118": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "PostgreSQL data directory inside the mounted volume.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private-network hostname of this service.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "PostgreSQL listen port.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "psql client user; follows POSTGRES_USER.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "psql client database; follows POSTGRES_DB.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "psql client password; follows POSTGRES_PASSWORD.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Name of the database created on first start.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private-network connection string composed from the credentials above; the app service references it.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser name used to initialize the database; PGUSER and the connection URLs reference it.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity in days of the generated self-signed TLS certificate.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password; generated fresh for each deployment.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Grace period for clean shutdown during redeploys.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "d0b33364-6005-42da-affd-f2aa2701d118": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "eb68004a-8190-4967-81bb-c09b51c11434": {
                  "icon": "https://raw.githubusercontent.com/StrangeNoob/open-excalidraw/main/apps/web/public/icon-512.png",
                  "name": "app",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health/ready",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/strangenoob/open-excalidraw:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway probes for healthchecks; matches the app's listen port (APP_PORT default 3000).",
                      "defaultValue": "3000"
                    },
                    "S3_BUCKET": {
                      "isOptional": true,
                      "description": "S3-compatible asset storage: set STORAGE_DRIVER=s3 plus these to replace the local volume (STORAGE_LOCAL_PATH is then unused).",
                      "defaultValue": ""
                    },
                    "S3_REGION": {
                      "isOptional": true,
                      "description": "Bucket region; \"auto\" works for R2, use the real region for AWS/B2/Spaces/Wasabi.",
                      "defaultValue": "auto"
                    },
                    "SMTP_FROM": {
                      "isOptional": true,
                      "description": "From header for outgoing mail; use a domain your SMTP provider allows.",
                      "defaultValue": "Open Excalidraw <noreply@example.com>"
                    },
                    "SMTP_HOST": {
                      "isOptional": true,
                      "description": "Optional SMTP for verification, invitation, and password-reset emails; blank keeps the manual-link flow via ADMIN_RESET_TOKEN.",
                      "defaultValue": ""
                    },
                    "SMTP_PORT": {
                      "isOptional": true,
                      "description": "SMTP port; 587 for STARTTLS, 465 with SMTP_SECURE=true.",
                      "defaultValue": "587"
                    },
                    "SMTP_USER": {
                      "isOptional": true,
                      "description": "SMTP username.",
                      "defaultValue": ""
                    },
                    "S3_ENDPOINT": {
                      "isOptional": true,
                      "description": "Endpoint URL; omit for AWS S3. R2: https://<account_id>.r2.cloudflarestorage.com, B2: https://s3.<region>.backblazeb2.com, MinIO: http://<host>:9000.",
                      "defaultValue": ""
                    },
                    "SMTP_SECURE": {
                      "isOptional": true,
                      "description": "true for implicit TLS (port 465); false for STARTTLS.",
                      "defaultValue": "false"
                    },
                    "ADMIN_EMAILS": {
                      "isOptional": true,
                      "description": "Comma-separated emails allowed on the admin page (user list, disable/delete, instance counts). Blank disables admin entirely. The admin account's email must be VERIFIED: via the SMTP verification email or a Google/GitHub/OIDC sign-in.",
                      "defaultValue": ""
                    },
                    "APP_BASE_URL": {
                      "isOptional": false,
                      "description": "Public origin of the deployment; used for auth callbacks, share links, and socket-origin checks. Defaults to the generated Railway domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string; references the bundled Postgres service.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "SMTP_PASSWORD": {
                      "isOptional": true,
                      "description": "SMTP password or API key.",
                      "defaultValue": ""
                    },
                    "OIDC_CLIENT_ID": {
                      "isOptional": true,
                      "description": "OIDC client id; all three OIDC values must be set to enable SSO.",
                      "defaultValue": ""
                    },
                    "STORAGE_DRIVER": {
                      "isOptional": false,
                      "description": "Binary asset storage driver: \"local\" volume or \"s3\" for any S3-compatible bucket.",
                      "defaultValue": "local"
                    },
                    "OIDC_ISSUER_URL": {
                      "isOptional": true,
                      "description": "Optional generic OIDC SSO (Keycloak, Authentik, Authelia, ...). Issuer base URL or full discovery URL; HTTPS required.",
                      "defaultValue": ""
                    },
                    "GITHUB_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Optional GitHub OAuth sign-in; create an OAuth app with callback ${APP_BASE_URL}/api/auth/callback/github.",
                      "defaultValue": ""
                    },
                    "GOOGLE_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Optional Google OAuth sign-in; create credentials at console.cloud.google.com with redirect ${APP_BASE_URL}/api/auth/callback/google.",
                      "defaultValue": ""
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": true,
                      "description": "Access key for the bucket.",
                      "defaultValue": ""
                    },
                    "ADMIN_RESET_TOKEN": {
                      "isOptional": false,
                      "description": "Operator token for the SMTP-less password recovery flow; generated at deploy time.",
                      "defaultValue": "{{ADMIN_RESET_TOKEN}}"
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Session and auth signing secret; generated at deploy time.",
                      "defaultValue": "{{BETTER_AUTH_SECRET}}"
                    },
                    "OIDC_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "OIDC client secret.",
                      "defaultValue": ""
                    },
                    "OIDC_PROVIDER_NAME": {
                      "isOptional": true,
                      "description": "Sign-in button label, e.g. \"Keycloak\"; defaults to \"SSO\".",
                      "defaultValue": ""
                    },
                    "STORAGE_LOCAL_PATH": {
                      "description": "Asset directory for the local driver; must match the volume mount path.",
                      "defaultValue": "/data/assets"
                    },
                    "S3_FORCE_PATH_STYLE": {
                      "isOptional": true,
                      "description": "true for MinIO and other path-style-only endpoints.",
                      "defaultValue": "false"
                    },
                    "GITHUB_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Secret for the GitHub OAuth app; both values must be set to enable the provider.",
                      "defaultValue": ""
                    },
                    "GOOGLE_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Secret for the Google OAuth client; both values must be set to enable the provider.",
                      "defaultValue": ""
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": true,
                      "description": "Secret key for the bucket.",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "eb68004a-8190-4967-81bb-c09b51c11434": {
                      "mountPath": "/data/assets"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "app",
      "method": "GET",
      "path": "/health/ready",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-11T16:14:44.435Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-11T05:05:12.594Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_b87f017da08c4057b291",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 88,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "app"
  }
}
