{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1b143196-e2eb-48f2-801b-1f9de9a9750a",
    "slug": "self-hosted-sentry-error-tracking-lean",
    "name": "Self-Hosted Sentry: Error Tracking (Lean); error-tracking, monitoring, observability, apm.",
    "description": "Run your own Sentry for error tracking. Lean, private, Postgres-backed.",
    "url": "https://railway.com/deploy/self-hosted-sentry-error-tracking-lean",
    "upstream": {
      "repo_url": "https://github.com/acewebs/sentry-railway"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "memcached",
      "source": {
        "image": "memcached:1.6.45-alpine"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "snuba-errors",
      "source": {
        "repo": "https://github.com/acewebs/sentry-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "sentry-relay",
      "source": {
        "repo": "https://github.com/acewebs/sentry-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "redis",
      "source": {
        "image": "redis:6.2.20-alpine"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "sentry-taskbroker",
      "source": {
        "repo": "https://github.com/acewebs/sentry-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/opt/sqlite",
      "http": false
    },
    {
      "name": "kafka",
      "source": {
        "repo": "https://github.com/acewebs/sentry-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/kafka/data",
      "http": false
    },
    {
      "name": "clickhouse",
      "source": {
        "repo": "https://github.com/acewebs/sentry-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "http": false
    },
    {
      "name": "postgres",
      "source": {
        "image": "postgres:14.23-bookworm"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "snuba-api",
      "source": {
        "repo": "https://github.com/acewebs/sentry-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "gateway",
      "source": {
        "repo": "https://github.com/acewebs/sentry-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "sentry-workers",
      "source": {
        "repo": "https://github.com/acewebs/sentry-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "sentry-web",
      "source": {
        "repo": "https://github.com/acewebs/sentry-railway"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "REDIS_HOST",
      "service": "snuba-errors",
      "description": "Hostname of the Redis service Snuba uses for state/caches.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SNUBA_SETTINGS",
      "service": "snuba-errors",
      "description": "Snuba settings profile; self_hosted matches the single-node Sentry stack.",
      "secret": false,
      "strategy": "default",
      "default": "self_hosted"
    },
    {
      "key": "CLICKHOUSE_HOST",
      "service": "snuba-errors",
      "description": "Hostname of the ClickHouse service this consumer writes rows into.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DEFAULT_BROKERS",
      "service": "snuba-errors",
      "description": "Kafka bootstrap server (host:port) the consumer reads processed events from.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "snuba-errors",
      "description": "ClickHouse default-user password; references the value generated on the clickhouse service.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "snuba-errors",
      "description": "Path to this service's Dockerfile in the repo.",
      "secret": false,
      "strategy": "default",
      "default": "railway/snuba-errors/Dockerfile"
    },
    {
      "key": "RELAY_CREDENTIALS_JSON",
      "service": "sentry-relay",
      "description": "Relay's matched keypair (secret+public+id); fixed template default, public_key must match sentry-web's whitelist.",
      "secret": false,
      "strategy": "default",
      "default": "{\"secret_key\":\"<...>\",\"public_key\":\"<matches sentry-web SENTRY_RELAY_WHITELIST_PK>\",\"id\":\"<...>\"}"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "sentry-relay",
      "description": "Path to this service's Dockerfile in the repo.",
      "secret": false,
      "strategy": "default",
      "default": "railway/relay/Dockerfile"
    },
    {
      "key": "TASKBROKER_DB_PATH",
      "service": "sentry-taskbroker",
      "description": "Path (inside the volume) to taskbroker's SQLite activation store.",
      "secret": false,
      "strategy": "default",
      "default": "/opt/sqlite/taskbroker-activations.sqlite"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "sentry-taskbroker",
      "description": "Path to this service's Dockerfile in the repo.",
      "secret": false,
      "strategy": "default",
      "default": "railway/taskbroker/Dockerfile"
    },
    {
      "key": "TASKBROKER_KAFKA_CLUSTERS__DEFAULT__ADDRESS",
      "service": "sentry-taskbroker",
      "description": "Kafka bootstrap address (host:port) taskbroker connects to.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CLUSTER_ID",
      "service": "kafka",
      "description": "KRaft cluster identifier; a fixed constant (must stay invariant for the volume's life).",
      "secret": false,
      "strategy": "default",
      "default": "MkU3OEVBNTcwNTJENDM2Qk"
    },
    {
      "key": "KAFKA_NODE_ID",
      "service": "kafka",
      "description": "KRaft node id for this broker.",
      "secret": false,
      "strategy": "default",
      "default": "1001"
    },
    {
      "key": "KAFKA_LOG_DIRS",
      "service": "kafka",
      "description": "Directory (inside the volume) for Kafka log segments.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/kafka/data/logs"
    },
    {
      "key": "KAFKA_LISTENERS",
      "service": "kafka",
      "description": "Sockets Kafka binds locally (broker + controller listeners).",
      "secret": false,
      "strategy": "default",
      "default": "PLAINTEXT://0.0.0.0:29092,INTERNAL://0.0.0.0:9093,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:29093"
    },
    {
      "key": "KAFKA_PROCESS_ROLES",
      "service": "kafka",
      "description": "KRaft roles this node runs (broker + controller).",
      "secret": false,
      "strategy": "default",
      "default": "broker,controller"
    },
    {
      "key": "KAFKA_MAX_REQUEST_SIZE",
      "service": "kafka",
      "description": "Max request size in bytes (raised for large event payloads).",
      "secret": false,
      "strategy": "default",
      "default": "50000000"
    },
    {
      "key": "KAFKA_MESSAGE_MAX_BYTES",
      "service": "kafka",
      "description": "Max message size in bytes (raised for large event payloads).",
      "secret": false,
      "strategy": "default",
      "default": "50000000"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "kafka",
      "description": "Path to this service's Dockerfile in the repo.",
      "secret": false,
      "strategy": "default",
      "default": "railway/kafka/Dockerfile"
    },
    {
      "key": "KAFKA_LOG4J_ROOT_LOGLEVEL",
      "service": "kafka",
      "description": "Kafka broker root log level.",
      "secret": false,
      "strategy": "default",
      "default": "WARN"
    },
    {
      "key": "KAFKA_LOG_RETENTION_HOURS",
      "service": "kafka",
      "description": "How long Kafka retains messages before deletion.",
      "secret": false,
      "strategy": "default",
      "default": "24"
    },
    {
      "key": "KAFKA_ADVERTISED_LISTENERS",
      "service": "kafka",
      "description": "Addresses Kafka advertises to clients; self-references this service's private domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "KAFKA_CONTROLLER_QUORUM_VOTERS",
      "service": "kafka",
      "description": "KRaft controller quorum (single node: this broker).",
      "secret": false,
      "strategy": "default",
      "default": "1001@127.0.0.1:29093"
    },
    {
      "key": "KAFKA_AUTO_CREATE_TOPICS_ENABLE",
      "service": "kafka",
      "description": "Allow Kafka to auto-create topics on first use.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "KAFKA_CONTROLLER_LISTENER_NAMES",
      "service": "kafka",
      "description": "Listener name used for the KRaft controller.",
      "secret": false,
      "strategy": "default",
      "default": "CONTROLLER"
    },
    {
      "key": "CONFLUENT_SUPPORT_METRICS_ENABLE",
      "service": "kafka",
      "description": "Disable Confluent telemetry/metrics reporting.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "KAFKA_INTER_BROKER_LISTENER_NAME",
      "service": "kafka",
      "description": "Listener used for inter-broker traffic.",
      "secret": false,
      "strategy": "default",
      "default": "PLAINTEXT"
    },
    {
      "key": "KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS",
      "service": "kafka",
      "description": "Partitions for the internal consumer-offsets topic (1 for single node).",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP",
      "service": "kafka",
      "description": "Security protocol per listener (all PLAINTEXT on the private network).",
      "secret": false,
      "strategy": "default",
      "default": "PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT"
    },
    {
      "key": "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR",
      "service": "kafka",
      "description": "Replication factor for internal topics (1 for single node).",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "clickhouse",
      "description": "Password for ClickHouse's default user; auto-generated per deploy, written into the server config via from_env and referenced by the Snuba services.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MAX_MEMORY_USAGE_RATIO",
      "service": "clickhouse",
      "description": "Fraction of container RAM ClickHouse may use for a single query (Altinity image tuning).",
      "secret": false,
      "strategy": "default",
      "default": "0.3"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "clickhouse",
      "description": "Path to this service's Dockerfile in the repo.",
      "secret": false,
      "strategy": "default",
      "default": "railway/clickhouse/Dockerfile"
    },
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Directory inside the volume where Postgres stores its data files.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_HOST_AUTH_METHOD",
      "service": "postgres",
      "description": "Auth mode for the stock image; trust = no password (safe: private network only).",
      "secret": false,
      "strategy": "default",
      "default": "trust"
    },
    {
      "key": "REDIS_HOST",
      "service": "snuba-api",
      "description": "Hostname of the Redis service Snuba uses for state/caches.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SNUBA_SETTINGS",
      "service": "snuba-api",
      "description": "Snuba settings profile; self_hosted matches the single-node Sentry stack.",
      "secret": false,
      "strategy": "default",
      "default": "self_hosted"
    },
    {
      "key": "CLICKHOUSE_HOST",
      "service": "snuba-api",
      "description": "Hostname of the ClickHouse service Snuba queries.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DEFAULT_BROKERS",
      "service": "snuba-api",
      "description": "Kafka bootstrap server (host:port) Snuba consumers connect to.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "UWSGI_MAX_REQUESTS",
      "service": "snuba-api",
      "description": "Recycle each uWSGI worker after this many requests (memory-leak guard).",
      "secret": false,
      "strategy": "default",
      "default": "10000"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "snuba-api",
      "description": "ClickHouse default-user password; references the value generated on the clickhouse service.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "UWSGI_DISABLE_LOGGING",
      "service": "snuba-api",
      "description": "Silence per-request uWSGI access logs to reduce noise.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "snuba-api",
      "description": "Path to this service's Dockerfile in the repo.",
      "secret": false,
      "strategy": "default",
      "default": "railway/snuba-api/Dockerfile"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "gateway",
      "description": "Path to this service's Dockerfile in the repo.",
      "secret": false,
      "strategy": "default",
      "default": "railway/nginx/Dockerfile"
    },
    {
      "key": "SNUBA",
      "service": "sentry-workers",
      "description": "URL of the Snuba API service (ClickHouse query layer).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SENTRY_CONF",
      "service": "sentry-workers",
      "description": "Directory holding sentry.conf.py / config.yml inside the image.",
      "secret": false,
      "strategy": "default",
      "default": "/etc/sentry"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "sentry-workers",
      "description": "Path to this service's Dockerfile in the repo.",
      "secret": false,
      "strategy": "default",
      "default": "railway/sentry-workers/Dockerfile"
    },
    {
      "key": "SENTRY_SYSTEM_SECRET_KEY",
      "service": "sentry-workers",
      "description": "Django SECRET_KEY; references the value generated on sentry-web (must match).",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SENTRY_EVENT_RETENTION_DAYS",
      "service": "sentry-workers",
      "description": "Days to retain events before the cleanup job deletes them.",
      "secret": false,
      "strategy": "default",
      "default": "90"
    },
    {
      "key": "SNUBA",
      "service": "sentry-web",
      "description": "URL of the Snuba API service (ClickHouse query layer).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SENTRY_CONF",
      "service": "sentry-web",
      "description": "Directory holding sentry.conf.py / config.yml inside the image.",
      "secret": false,
      "strategy": "default",
      "default": "/etc/sentry"
    },
    {
      "key": "SENTRY_URL_PREFIX",
      "service": "sentry-web",
      "description": "Public base URL; references the gateway's public domain (required for browser login/CSRF).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "sentry-web",
      "description": "Path to this service's Dockerfile in the repo.",
      "secret": false,
      "strategy": "default",
      "default": "railway/sentry/Dockerfile"
    },
    {
      "key": "SENTRY_SYSTEM_SECRET_KEY",
      "service": "sentry-web",
      "description": "Django SECRET_KEY; auto-generated per deploy, shared with sentry-workers.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SENTRY_RELAY_WHITELIST_PK",
      "service": "sentry-web",
      "description": "Relay's public key; must match the public_key in sentry-relay's RELAY_CREDENTIALS_JSON. Baked template default.",
      "secret": false,
      "strategy": "default",
      "default": "<relay public_key — matched pair with sentry-relay>"
    },
    {
      "key": "SENTRY_EVENT_RETENTION_DAYS",
      "service": "sentry-web",
      "description": "Days to retain events before the cleanup job deletes them.",
      "secret": false,
      "strategy": "default",
      "default": "90"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "self-hosted-sentry-error-tracking-lean"
      }
    },
    "cli": "railway deploy --template self-hosted-sentry-error-tracking-lean",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1b143196-e2eb-48f2-801b-1f9de9a9750a",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3f6423f5-1e4d-476f-bd3c-f62c2cfa192f": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/memcached.svg",
                  "name": "memcached",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "memcached:1.6.45-alpine"
                  },
                  "variables": {}
                },
                "5a3ea00a-042e-4c30-9c89-5ec3e7e5143f": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/clickhouse.svg",
                  "name": "snuba-errors",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/acewebs/sentry-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Hostname of the Redis service Snuba uses for state/caches.",
                      "defaultValue": "${{ redis.RAILWAY_PRIVATE_DOMAIN }}"
                    },
                    "SNUBA_SETTINGS": {
                      "isOptional": false,
                      "description": "Snuba settings profile; self_hosted matches the single-node Sentry stack.",
                      "defaultValue": "self_hosted"
                    },
                    "CLICKHOUSE_HOST": {
                      "isOptional": false,
                      "description": "Hostname of the ClickHouse service this consumer writes rows into.",
                      "defaultValue": "${{ clickhouse.RAILWAY_PRIVATE_DOMAIN }}"
                    },
                    "DEFAULT_BROKERS": {
                      "isOptional": false,
                      "description": "Kafka bootstrap server (host:port) the consumer reads processed events from.",
                      "defaultValue": "${{ kafka.RAILWAY_PRIVATE_DOMAIN }}:9092"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "ClickHouse default-user password; references the value generated on the clickhouse service.",
                      "defaultValue": "${{ clickhouse.CLICKHOUSE_PASSWORD }}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to this service's Dockerfile in the repo.",
                      "defaultValue": "railway/snuba-errors/Dockerfile"
                    }
                  }
                },
                "5a75ccfa-b0f2-4621-b746-de87bdc84529": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/sentry.svg",
                  "name": "sentry-relay",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/acewebs/sentry-railway",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "RELAY_CREDENTIALS_JSON": {
                      "isOptional": false,
                      "description": "Relay's matched keypair (secret+public+id); fixed template default, public_key must match sentry-web's whitelist.",
                      "defaultValue": "{\"secret_key\":\"<...>\",\"public_key\":\"<matches sentry-web SENTRY_RELAY_WHITELIST_PK>\",\"id\":\"<...>\"}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to this service's Dockerfile in the repo.",
                      "defaultValue": "railway/relay/Dockerfile"
                    }
                  }
                },
                "7c8926ba-7b50-4b3f-8f02-54b1f4e1fb1c": {
                  "icon": "https://devicons.railway.app/redis",
                  "name": "redis",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:6.2.20-alpine"
                  },
                  "variables": {},
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "8fcb5738-2cf2-495b-ba4e-72cc8c24da7f": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/sentry.svg",
                  "name": "sentry-taskbroker",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/acewebs/sentry-railway",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "TASKBROKER_DB_PATH": {
                      "isOptional": false,
                      "description": "Path (inside the volume) to taskbroker's SQLite activation store.",
                      "defaultValue": "/opt/sqlite/taskbroker-activations.sqlite"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to this service's Dockerfile in the repo.",
                      "defaultValue": "railway/taskbroker/Dockerfile"
                    },
                    "TASKBROKER_KAFKA_CLUSTERS__DEFAULT__ADDRESS": {
                      "isOptional": false,
                      "description": "Kafka bootstrap address (host:port) taskbroker connects to.",
                      "defaultValue": "${{ kafka.RAILWAY_PRIVATE_DOMAIN }}:9092"
                    }
                  },
                  "volumeMounts": {
                    "8fcb5738-2cf2-495b-ba4e-72cc8c24da7f": {
                      "mountPath": "/opt/sqlite"
                    }
                  }
                },
                "a778b87f-2232-40b2-8d73-0cbba82730a6": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/apache-kafka.svg",
                  "name": "kafka",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/acewebs/sentry-railway",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "CLUSTER_ID": {
                      "isOptional": false,
                      "description": "KRaft cluster identifier; a fixed constant (must stay invariant for the volume's life).",
                      "defaultValue": "MkU3OEVBNTcwNTJENDM2Qk"
                    },
                    "KAFKA_NODE_ID": {
                      "isOptional": false,
                      "description": "KRaft node id for this broker.",
                      "defaultValue": "1001"
                    },
                    "KAFKA_LOG_DIRS": {
                      "isOptional": false,
                      "description": "Directory (inside the volume) for Kafka log segments.",
                      "defaultValue": "/var/lib/kafka/data/logs"
                    },
                    "KAFKA_LISTENERS": {
                      "isOptional": false,
                      "description": "Sockets Kafka binds locally (broker + controller listeners).",
                      "defaultValue": "PLAINTEXT://0.0.0.0:29092,INTERNAL://0.0.0.0:9093,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:29093"
                    },
                    "KAFKA_PROCESS_ROLES": {
                      "isOptional": false,
                      "description": "KRaft roles this node runs (broker + controller).",
                      "defaultValue": "broker,controller"
                    },
                    "KAFKA_MAX_REQUEST_SIZE": {
                      "isOptional": false,
                      "description": "Max request size in bytes (raised for large event payloads).",
                      "defaultValue": "50000000"
                    },
                    "KAFKA_MESSAGE_MAX_BYTES": {
                      "isOptional": false,
                      "description": "Max message size in bytes (raised for large event payloads).",
                      "defaultValue": "50000000"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to this service's Dockerfile in the repo.",
                      "defaultValue": "railway/kafka/Dockerfile"
                    },
                    "KAFKA_LOG4J_ROOT_LOGLEVEL": {
                      "isOptional": false,
                      "description": "Kafka broker root log level.",
                      "defaultValue": "WARN"
                    },
                    "KAFKA_LOG_RETENTION_HOURS": {
                      "isOptional": false,
                      "description": "How long Kafka retains messages before deletion.",
                      "defaultValue": "24"
                    },
                    "KAFKA_ADVERTISED_LISTENERS": {
                      "isOptional": false,
                      "description": "Addresses Kafka advertises to clients; self-references this service's private domain.",
                      "defaultValue": "PLAINTEXT://127.0.0.1:29092,INTERNAL://${{ RAILWAY_PRIVATE_DOMAIN }}:9093,EXTERNAL://${{ RAILWAY_PRIVATE_DOMAIN }}:9092"
                    },
                    "KAFKA_CONTROLLER_QUORUM_VOTERS": {
                      "isOptional": false,
                      "description": "KRaft controller quorum (single node: this broker).",
                      "defaultValue": "1001@127.0.0.1:29093"
                    },
                    "KAFKA_AUTO_CREATE_TOPICS_ENABLE": {
                      "isOptional": false,
                      "description": "Allow Kafka to auto-create topics on first use.",
                      "defaultValue": "true"
                    },
                    "KAFKA_CONTROLLER_LISTENER_NAMES": {
                      "isOptional": false,
                      "description": "Listener name used for the KRaft controller.",
                      "defaultValue": "CONTROLLER"
                    },
                    "CONFLUENT_SUPPORT_METRICS_ENABLE": {
                      "isOptional": false,
                      "description": "Disable Confluent telemetry/metrics reporting.",
                      "defaultValue": "false"
                    },
                    "KAFKA_INTER_BROKER_LISTENER_NAME": {
                      "isOptional": false,
                      "description": "Listener used for inter-broker traffic.",
                      "defaultValue": "PLAINTEXT"
                    },
                    "KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS": {
                      "isOptional": false,
                      "description": "Partitions for the internal consumer-offsets topic (1 for single node).",
                      "defaultValue": "1"
                    },
                    "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP": {
                      "isOptional": false,
                      "description": "Security protocol per listener (all PLAINTEXT on the private network).",
                      "defaultValue": "PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT"
                    },
                    "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR": {
                      "isOptional": false,
                      "description": "Replication factor for internal topics (1 for single node).",
                      "defaultValue": "1"
                    }
                  },
                  "volumeMounts": {
                    "a778b87f-2232-40b2-8d73-0cbba82730a6": {
                      "mountPath": "/var/lib/kafka/data"
                    }
                  }
                },
                "a83b1f0b-bb80-4cb7-94ad-547328ff7000": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/clickhouse.svg",
                  "name": "clickhouse",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/acewebs/sentry-railway",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for ClickHouse's default user; auto-generated per deploy, written into the server config via from_env and referenced by the Snuba services.",
                      "defaultValue": "{{CLICKHOUSE_PASSWORD}}"
                    },
                    "MAX_MEMORY_USAGE_RATIO": {
                      "isOptional": false,
                      "description": "Fraction of container RAM ClickHouse may use for a single query (Altinity image tuning).",
                      "defaultValue": "0.3"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to this service's Dockerfile in the repo.",
                      "defaultValue": "railway/clickhouse/Dockerfile"
                    }
                  },
                  "volumeMounts": {
                    "a83b1f0b-bb80-4cb7-94ad-547328ff7000": {
                      "mountPath": "/var/lib/clickhouse"
                    }
                  }
                },
                "ae435d4e-3a4f-4242-918e-3ec378a5bd65": {
                  "icon": "https://devicons.railway.app/postgres",
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:14.23-bookworm"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Directory inside the volume where Postgres stores its data files.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_HOST_AUTH_METHOD": {
                      "isOptional": false,
                      "description": "Auth mode for the stock image; trust = no password (safe: private network only).",
                      "defaultValue": "trust"
                    }
                  },
                  "volumeMounts": {
                    "ae435d4e-3a4f-4242-918e-3ec378a5bd65": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "b5755375-abf1-4749-afe8-2e1c1116034a": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/clickhouse.svg",
                  "name": "snuba-api",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/acewebs/sentry-railway",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Hostname of the Redis service Snuba uses for state/caches.",
                      "defaultValue": "${{ redis.RAILWAY_PRIVATE_DOMAIN }}"
                    },
                    "SNUBA_SETTINGS": {
                      "isOptional": false,
                      "description": "Snuba settings profile; self_hosted matches the single-node Sentry stack.",
                      "defaultValue": "self_hosted"
                    },
                    "CLICKHOUSE_HOST": {
                      "isOptional": false,
                      "description": "Hostname of the ClickHouse service Snuba queries.",
                      "defaultValue": "${{ clickhouse.RAILWAY_PRIVATE_DOMAIN }}"
                    },
                    "DEFAULT_BROKERS": {
                      "isOptional": false,
                      "description": "Kafka bootstrap server (host:port) Snuba consumers connect to.",
                      "defaultValue": "${{ kafka.RAILWAY_PRIVATE_DOMAIN }}:9092"
                    },
                    "UWSGI_MAX_REQUESTS": {
                      "isOptional": false,
                      "description": "Recycle each uWSGI worker after this many requests (memory-leak guard).",
                      "defaultValue": "10000"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "ClickHouse default-user password; references the value generated on the clickhouse service.",
                      "defaultValue": "${{ clickhouse.CLICKHOUSE_PASSWORD }}"
                    },
                    "UWSGI_DISABLE_LOGGING": {
                      "isOptional": false,
                      "description": "Silence per-request uWSGI access logs to reduce noise.",
                      "defaultValue": "true"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to this service's Dockerfile in the repo.",
                      "defaultValue": "railway/snuba-api/Dockerfile"
                    }
                  }
                },
                "b7838b98-363d-417c-bb81-fd4eaeaf61db": {
                  "icon": "https://devicons.railway.app/nginx",
                  "name": "gateway",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/acewebs/sentry-railway",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to this service's Dockerfile in the repo.",
                      "defaultValue": "railway/nginx/Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "bf9be64b-1394-4d7e-a85e-40f7adae477b": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/sentry.svg",
                  "name": "sentry-workers",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/acewebs/sentry-railway",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "SNUBA": {
                      "isOptional": false,
                      "description": "URL of the Snuba API service (ClickHouse query layer).",
                      "defaultValue": "http://${{ snuba-api.RAILWAY_PRIVATE_DOMAIN }}:1218"
                    },
                    "SENTRY_CONF": {
                      "isOptional": false,
                      "description": "Directory holding sentry.conf.py / config.yml inside the image.",
                      "defaultValue": "/etc/sentry"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to this service's Dockerfile in the repo.",
                      "defaultValue": "railway/sentry-workers/Dockerfile"
                    },
                    "SENTRY_SYSTEM_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Django SECRET_KEY; references the value generated on sentry-web (must match).",
                      "defaultValue": "${{ sentry-web.SENTRY_SYSTEM_SECRET_KEY }}"
                    },
                    "SENTRY_EVENT_RETENTION_DAYS": {
                      "isOptional": false,
                      "description": "Days to retain events before the cleanup job deletes them.",
                      "defaultValue": "90"
                    }
                  }
                },
                "dbebc23c-b126-4558-bd85-6686682ada79": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/sentry.svg",
                  "name": "sentry-web",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/acewebs/sentry-railway",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "SNUBA": {
                      "isOptional": false,
                      "description": "URL of the Snuba API service (ClickHouse query layer).",
                      "defaultValue": "http://${{ snuba-api.RAILWAY_PRIVATE_DOMAIN }}:1218"
                    },
                    "SENTRY_CONF": {
                      "isOptional": false,
                      "description": "Directory holding sentry.conf.py / config.yml inside the image.",
                      "defaultValue": "/etc/sentry"
                    },
                    "SENTRY_URL_PREFIX": {
                      "isOptional": false,
                      "description": "Public base URL; references the gateway's public domain (required for browser login/CSRF).",
                      "defaultValue": "https://${{ gateway.RAILWAY_PUBLIC_DOMAIN }}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Path to this service's Dockerfile in the repo.",
                      "defaultValue": "railway/sentry/Dockerfile"
                    },
                    "SENTRY_SYSTEM_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Django SECRET_KEY; auto-generated per deploy, shared with sentry-workers.",
                      "defaultValue": "{{SENTRY_SYSTEM_SECRET_KEY}}"
                    },
                    "SENTRY_RELAY_WHITELIST_PK": {
                      "isOptional": false,
                      "description": "Relay's public key; must match the public_key in sentry-relay's RELAY_CREDENTIALS_JSON. Baked template default.",
                      "defaultValue": "<relay public_key — matched pair with sentry-relay>"
                    },
                    "SENTRY_EVENT_RETENTION_DAYS": {
                      "isOptional": false,
                      "description": "Days to retain events before the cleanup job deletes them.",
                      "defaultValue": "90"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 12,
    "needs_volume": true
  },
  "generated_at": "2026-09-08T11:54:27.954Z",
  "generator_version": "0.1.0"
}
