{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4e7d25af-a028-4005-b916-f9882f712db4",
    "slug": "instantdb",
    "name": "InstantDB",
    "description": "Self-hosted InstantDB with Postgres and Railway Bucket object storage.",
    "url": "https://railway.com/deploy/instantdb",
    "upstream": {
      "image": "ghcr.io/instantdb/server:latest"
    }
  },
  "services": [
    {
      "name": "server",
      "source": {
        "image": "ghcr.io/instantdb/server:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/resources/config",
      "http": true
    },
    {
      "name": "dashboard",
      "source": {
        "image": "ghcr.io/instantdb/dashboard:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "postgres",
      "source": {
        "image": "ghcr.io/instantdb/postgresql:postgresql-16-pg-hint-plan"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "server",
      "description": "Port the backend listens on.",
      "secret": false,
      "strategy": "default",
      "default": "8888"
    },
    {
      "key": "JAVA_OPTS",
      "service": "server",
      "description": "JVM heap settings for the InstantDB backend.",
      "secret": false,
      "strategy": "default",
      "default": "-Xmx1024m -Xms256m"
    },
    {
      "key": "S3_BUCKET",
      "service": "server",
      "description": "Railway Bucket name for InstantDB storage objects.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AWS_REGION",
      "service": "server",
      "description": "Railway Bucket region.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "server",
      "description": "S3-compatible endpoint for the Railway Bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "server",
      "description": "Internal Postgres connection URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AWS_ACCESS_KEY_ID",
      "service": "server",
      "description": "Railway Bucket access key used by InstantDB object storage.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_PUBLIC_ENDPOINT",
      "service": "server",
      "description": "Public S3-compatible endpoint used when InstantDB creates signed URLs.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "INSTANT_BACKEND_URL",
      "service": "server",
      "description": "Public URL of this InstantDB backend service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "WAL_HISTORY_STORAGE",
      "service": "server",
      "description": "Store WAL history in Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "pg"
    },
    {
      "key": "AWS_SECRET_ACCESS_KEY",
      "service": "server",
      "description": "Railway Bucket secret access key used by InstantDB object storage.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "INSTANT_DASHBOARD_URL",
      "service": "server",
      "description": "Public URL of the InstantDB dashboard service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "INSTANT_APP_EMAIL_SENDER_NAME",
      "service": "server",
      "description": "Sender name for app emails.",
      "secret": false,
      "strategy": "default",
      "default": "Instant"
    },
    {
      "key": "INSTANT_TEAM_EMAIL_SENDER_NAME",
      "service": "server",
      "description": "Sender name for team emails.",
      "secret": false,
      "strategy": "default",
      "default": "Instant"
    },
    {
      "key": "INSTANT_DASHBOARD_EMAIL_SENDER_NAME",
      "service": "server",
      "description": "Sender name for dashboard emails.",
      "secret": false,
      "strategy": "default",
      "default": "Instant"
    },
    {
      "key": "PORT",
      "service": "dashboard",
      "description": "Port the dashboard listens on.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "INSTANT_BACKEND_URL",
      "service": "dashboard",
      "description": "Public URL of the InstantDB backend service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Location where Postgres initializes data inside the mounted Railway volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "postgres",
      "description": "Private network hostname for Postgres.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "postgres",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "postgres",
      "description": "Postgres user used by Railway data tooling.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "postgres",
      "description": "Database name used by Railway data tooling.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "postgres",
      "description": "Postgres password used by Railway data tooling.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Default database created by the Postgres image.",
      "secret": false,
      "strategy": "default",
      "default": "instant"
    },
    {
      "key": "DATABASE_URL",
      "service": "postgres",
      "description": "Internal Postgres connection URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "Default Postgres user created by the Postgres image.",
      "secret": false,
      "strategy": "default",
      "default": "instant"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Generated Postgres password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "instantdb"
      }
    },
    "cli": "railway deploy --template instantdb",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4e7d25af-a028-4005-b916-f9882f712db4",
            "serializedConfig": {
              "buckets": {
                "7f960b4e-3fcd-4012-93d5-b40c694c036f": {
                  "name": "instantdb-storage"
                }
              },
              "services": {
                "28856997-25fa-47c4-b9ac-b3d1d1b4b1cb": {
                  "icon": "https://instantdb.com/img/icon/android-chrome-192x192.png",
                  "name": "server",
                  "deploy": {
                    "healthcheckPath": "/",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 300
                  },
                  "source": {
                    "image": "ghcr.io/instantdb/server:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the backend listens on.",
                      "defaultValue": "8888"
                    },
                    "JAVA_OPTS": {
                      "isOptional": false,
                      "description": "JVM heap settings for the InstantDB backend.",
                      "defaultValue": "-Xmx1024m -Xms256m"
                    },
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "Railway Bucket name for InstantDB storage objects.",
                      "defaultValue": "${{instantdb-storage.BUCKET}}"
                    },
                    "AWS_REGION": {
                      "isOptional": false,
                      "description": "Railway Bucket region.",
                      "defaultValue": "${{instantdb-storage.REGION}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "S3-compatible endpoint for the Railway Bucket.",
                      "defaultValue": "${{instantdb-storage.ENDPOINT}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Internal Postgres connection URL.",
                      "defaultValue": "${{postgres.DATABASE_URL}}"
                    },
                    "POSTMARK_TOKEN": {
                      "isOptional": true,
                      "description": "Optional Postmark token. If omitted, magic-code emails are logged by the server.",
                      "defaultValue": ""
                    },
                    "STRIPE_API_KEY": {
                      "isOptional": true,
                      "description": "Optional Stripe API key for billing-related InstantDB features.",
                      "defaultValue": ""
                    },
                    "AWS_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Railway Bucket access key used by InstantDB object storage.",
                      "defaultValue": "${{instantdb-storage.ACCESS_KEY_ID}}"
                    },
                    "S3_PUBLIC_ENDPOINT": {
                      "isOptional": false,
                      "description": "Public S3-compatible endpoint used when InstantDB creates signed URLs.",
                      "defaultValue": "${{instantdb-storage.ENDPOINT}}"
                    },
                    "INSTANT_BACKEND_URL": {
                      "isOptional": false,
                      "description": "Public URL of this InstantDB backend service.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "WAL_HISTORY_STORAGE": {
                      "isOptional": false,
                      "description": "Store WAL history in Postgres.",
                      "defaultValue": "pg"
                    },
                    "AWS_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Railway Bucket secret access key used by InstantDB object storage.",
                      "defaultValue": "${{instantdb-storage.SECRET_ACCESS_KEY}}"
                    },
                    "INSTANT_DASHBOARD_URL": {
                      "isOptional": false,
                      "description": "Public URL of the InstantDB dashboard service.",
                      "defaultValue": "https://${{dashboard.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "INSTANT_EMAIL_REPLY_TO": {
                      "isOptional": true,
                      "description": "Optional reply-to email address for InstantDB emails.",
                      "defaultValue": ""
                    },
                    "INSTANT_APP_EMAIL_SENDER_NAME": {
                      "isOptional": true,
                      "description": "Sender name for app emails.",
                      "defaultValue": "Instant"
                    },
                    "INSTANT_APP_EMAIL_SENDER_EMAIL": {
                      "isOptional": true,
                      "description": "Optional sender email for app emails when Postmark is configured.",
                      "defaultValue": ""
                    },
                    "INSTANT_TEAM_EMAIL_SENDER_NAME": {
                      "isOptional": true,
                      "description": "Sender name for team emails.",
                      "defaultValue": "Instant"
                    },
                    "INSTANT_TEAM_EMAIL_SENDER_EMAIL": {
                      "isOptional": true,
                      "description": "Optional sender email for team emails when Postmark is configured.",
                      "defaultValue": ""
                    },
                    "INSTANT_DASHBOARD_EMAIL_SENDER_NAME": {
                      "isOptional": true,
                      "description": "Sender name for dashboard emails.",
                      "defaultValue": "Instant"
                    },
                    "INSTANT_DASHBOARD_EMAIL_SENDER_EMAIL": {
                      "isOptional": true,
                      "description": "Optional sender email for dashboard emails when Postmark is configured.",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8888": {
                        "port": 8888
                      }
                    }
                  },
                  "volumeMounts": {
                    "28856997-25fa-47c4-b9ac-b3d1d1b4b1cb": {
                      "mountPath": "/app/resources/config"
                    }
                  }
                },
                "8c727f1a-0d01-4fe0-bdd1-ef7ed4f09089": {
                  "icon": "https://instantdb.com/img/icon/android-chrome-192x192.png",
                  "name": "dashboard",
                  "deploy": {
                    "healthcheckPath": "/dash",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 300
                  },
                  "source": {
                    "image": "ghcr.io/instantdb/dashboard:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the dashboard listens on.",
                      "defaultValue": "3000"
                    },
                    "INSTANT_BACKEND_URL": {
                      "isOptional": false,
                      "description": "Public URL of the InstantDB backend service.",
                      "defaultValue": "https://${{server.RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                },
                "af3c2d51-157d-4e2e-82ff-cadf198a7b00": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data",
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "image": "ghcr.io/instantdb/postgresql:postgresql-16-pg-hint-plan"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where Postgres initializes data inside the mounted Railway volume.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private network hostname for Postgres.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres port.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Postgres user used by Railway data tooling.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Database name used by Railway data tooling.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password used by Railway data tooling.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created by the Postgres image.",
                      "defaultValue": "instant"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Internal Postgres connection URL.",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{POSTGRES_DB}}?sslmode=disable"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Default Postgres user created by the Postgres image.",
                      "defaultValue": "instant"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated Postgres password.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "af3c2d51-157d-4e2e-82ff-cadf198a7b00": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "server",
      "method": "GET",
      "path": "/",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-09T06:06:09.705Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_0574ae599c254107a104",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 133,
    "typical_build_seconds": 0,
    "typical_start_seconds": 30,
    "slowest_service": "server"
  }
}
